| Author |
Message |
brije1982
Newbie
Joined: 01 Jun 2017
Online Status: Offline
Posts: 2
|

Topic: Crystal Report - 8 question???? Posted: 06 Jun 2017 at 4:51am |
|
Hello everyone,
I am new to this forum. I hope I get something out of this. I am very new to crystal report 8 and build and customize few reports. Now, I am stuck in between my modifying open order by customer report. My questions is "How do I right formula in select expert that pulls all data when date field is blank?" Here's what I did so far.
1) I created new parameters = fromdate and todate. 2) I put that parameters inside the report. 3) I selected that field in a select expert and added a formula in formula editor. 4) The formula goes something like this; {Orderdates.Releasedate} in {?fromdate} to {?todate} With this formula it only pulls data between that range but when I leave it blank it shows error message. Please advise me to a right path.
Thanks, Brijesh
|
IP Logged |
|
|
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 06 Jun 2017 at 6:38am |
|
I do not believe you can have optional prompts in CR 8. You may be able to get creative with a formula. You did say date field, I believe you meant that you want to pull in all dates when the date prompt(s) are blanks. I have not used CR 8 for a number of years, so I will have to experiment a bit.
|
IP Logged |
|
brije1982
Newbie
Joined: 01 Jun 2017
Online Status: Offline
Posts: 2
|

Posted: 06 Jun 2017 at 6:41am |
|
Yes I want to pull all dates when you leave the field blank.
|
IP Logged |
|
Sastry
Moderator
Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
|

Posted: 13 Jul 2017 at 3:13am |
|
Hi
CR 8 will not support optional parameter concept i.e. leaving blank parameters. But you can do below to over come this :
Put default value for your From & To date parameters like 01/01/1900
use below as record selection formula :
If {?Fromdate} = date(1900,01,01) and {Todate} = date(1900,01,01) Then true
else
{Orderdates.Releasedate} in {?fromdate} to {?todate}
This should work.
Thanks,
Sastry
Edited by Sastry - 13 Jul 2017 at 3:13am
|
|
Thanks,
Sastry
|
IP Logged |
|
|
|