Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Regarding Parameter Values Post Reply Post New Topic
Author Message
jason stratom
Newbie
Newbie


Joined: 17 Feb 2011
Location: India
Online Status: Offline
Posts: 21
Quote jason stratom Replybullet Topic: Regarding Parameter Values
     Posted: 16 Jun 2011 at 1:56am
Dear all,

            Am creating a crystal report for SAP B1 A/P invoice .....I have to pick up and show the documents on the date basis....How to set two parameter values on for the from date and the other for to date...


Regards,
Jason
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Jun 2011 at 3:12am
create 2 parameters for the report, then in the record selection criteria, something like:
{table.datefield}>={@fromDate} and {table.datefield} <= {@toDate}
 
or
 
{table.datefield} in {@fromDate} to {@toDate}  // look for 'in' in CR help
 
either of these will return TRUE for dates you want and FALSE for ones you don't, which is exactly what the criteria formula is expecting, true to keep and false to discard.
 
HTH
IP IP Logged
susanr
Newbie
Newbie
Avatar

Joined: 15 Jun 2011
Online Status: Offline
Posts: 10
Quote susanr Replybullet Posted: 16 Jun 2011 at 3:30am

my formula looks like:

{table date field} in {?Date from} to {?Date to}
 
the ?Date from and ?date to have got to be typed exactly the same as the created parameters, otherwise you'll get an error message
Susan
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Jun 2011 at 4:43am
Why type???  Just select them from the list of items, then they will always match as CR does the typing for you.
 
I forget the ? or @ as I rarely have to type them, just select the correct item from the list.
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 16 Jun 2011 at 4:51am
I believe susanr is referring to the Command rather than parameter selection.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Jun 2011 at 5:25am
Ah...if you are using parameter values in the Command object, you will be prompted repeatedly.
 
I think that this is because Commands were designed to retrieve data for parameter selection(it's only a theory as to their reason, but it seems to fit)...but since they are taking parameters to gather the data, they get confused and constantly ask for input.
 
What you could do is not use the parameters in the Command and instead add filters to the subreports based on the parameters.  Then you can link the subreport parameter to the main report parameter and only be prompted once per run instead of more times.
IP IP Logged
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