Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Default Parameters in Crystal Report

Hi all visitors

I have created one crystal report and now i want to set the parameters to my report by using parameters in Crystal Report( the parameters not from sql).My parameters are datetime datatype. in my report, i create one formula( get date from DocDate field from sql).How can i set the default "Todate" parameter as current date?

Best Regards,

Former Member
Former Member replied

Hi,

So all of the seleciton is done using selecct expert. They have alot of default values there...but if you go to advanced then you can do much more still. So if you just want to only use the currentdate then you can just do something like

date({IT_ChangeManagement.Deployment Date/Time}) = currentdate

In the above case there would be no parameters needed and would show the currentdates information. You could of course do a varity of >= or <= using the above method.

If you want more flexability then you could create a parameter or two . Here is an example. This is again done in select expert....

if {?Start Date} <= date("01/01/2000") then

(

date({IT_ChangeManagement.Deployment Date/Time}) = currentdate

)

else

(

{IT_ChangeManagement.Deployment Date/Time} >= {?Start Date} and

{IT_ChangeManagement.Deployment Date/Time} <= {?End Date}

)

The above defaults to the current date if the start date is older than 2000, otherwise it uses the start & end date parmeters.

Make sense?

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question