parameters to Crystal Reports

buffy13

New Member
Hello,
I have a question about passing parameters to Crystal Reports. The first parameter (a name)I pass to Crystal it accepts and then in mijn viewer I can see the document with the selected parameter. But when I pass a second parameter (a date) with it, Crystal doesn't accept this parameter. What could be the problem? I have 2 parameter fields in my Crystal Report. And how to you pass parameters for a range of values?
Thanx!
 
Hello,
This problem occured because u've to pass the parametre with the good type, if it's a date u've to pass a date and not a string with the date :
Example :
DEFINE VARIABLE c-date AS CHARACTER NO-UNDO.
DEFINE VARIABLE d-date AS DATE NO-UNDO INITIAL TODAY.

c-date = STRING(d-date,"99/99/9999").

this will return error if u're param is define as date on crystal

ch-CRparflds:AddCurrentValue(c-date).

this will return error if u're param is define as date on crystal
ch-CRparflds:AddCurrentValue(d-date).


so i think it's better always pass string param because u'll not be able to
now if "1568484" is an integer or a string at the moment u send param
 
Thank you that helped a lot.

I still have one more question: I know you use 'ch-CRparflds:AddCurrentValue(d-date)' to pass a single date to a report. but how do you pass a range of date to a report?
 
re,
i think u've to use AddCurrentRange method. U'll find documentation about it on crystal help developper files . I didn't use it yet so i think u'll find all u need on rdc section.
 
Back
Top