Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Crystal Report - 8 question???? Post Reply Post New Topic
Author Message
brije1982
Newbie
Newbie


Joined: 01 Jun 2017
Online Status: Offline
Posts: 2
Quote brije1982 Replybullet 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 IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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 IP Logged
brije1982
Newbie
Newbie


Joined: 01 Jun 2017
Online Status: Offline
Posts: 2
Quote brije1982 Replybullet Posted: 06 Jun 2017 at 6:41am
Yes I want to pull all dates when you leave the field blank.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet 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 IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.