Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: parameter display twice Post Reply Post New Topic
Author Message
dennis0027
Newbie
Newbie


Joined: 06 Jun 2011
Online Status: Offline
Posts: 2
Quote dennis0027 Replybullet Topic: parameter display twice
    Posted: 22 Dec 2011 at 11:48am
Hello,
 
A Sales table contains date, customer and amount.
Trying to create a report that, based on the start date and end date, user is presented a list of custmers. Based on the selected customers, the report shows only the transactions for the selected customer within the date ranges.
 
I use the 'Command' with query like
select * from Sales where date between {?StartDate} AND {?EndDate}+1
 
Then the record selection looks like {Command.customer} = {?cusomers}
 
However, the start date and end date parameters display twice. Any way to make it display only once? 
 
Thanks.
 
Dennis
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Dec 2011 at 3:51am
This is a common occurrance when using parameters in the Command object, and I think it goes to what CR designed commands to do...but I digress.
 
I think that the way around this is to remove the where clause in the command object, and instead apply it in the Report/Selection Formulas/Record section.  The formula would look something like:
 
local datetimevar ed:=DateAdd("d",1,{?EndDate});
{table.field} in {?StartDate} to ed;
 
HTH
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.017 seconds.