Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Passing Date Parameters into the report Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Topic: Passing Date Parameters into the report
    Posted: 01 Mar 2011 at 12:22pm
Hello Folks,
                   I have a report that i have created using the COMMAND option.Basically am retreiving the Count for all the batches with status.
I actually am bringing in the date from the batch id
i.e batch id is like 201029110038 which means YYYYDDMM0038.
I have a formula to extract the month part as below which am using it as Date criteria
 
@Extract = Right(left({Command.CPS_REQUEST_BATCH_ID},8),2)
 
Finally am creating the formulas to get the Counts as below and placing them in the RF
If @Extract = 11 and Status = 'Y' then Count(Batchid).
 
My requirement is i want to run the report only for a particular year such as 2010 or 2011.AM getting confused in having the logic created i.e passing the date parameters.
Can anyone have any ideas on how to start?
 
Regards,
Nav
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2011 at 4:41am
do you want to pass a date range, a year value or something else?
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 02 Mar 2011 at 5:38am
Hi there. am looking more for a specific Year. i.e. user shud be entering either 2009,2010 or 2011 etc
 
Regards,
Nav
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2011 at 6:09am
one option,
create a param called 'year' as numeric with min and max values to force a user to stay in the rang you want
use that in the select expert as
{?year} = tonumber(left({Command.CPS_REQUEST_BATCH_ID},4))
 
or if you just want to leave it a string make a param 'year' as a string type
select statement as
{?year} = left({Command.CPS_REQUEST_BATCH_ID},4)
 


Edited by DBlank - 02 Mar 2011 at 6:09am
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 02 Mar 2011 at 6:49am

You da man that worked. I cant believe that i missed this simple logic.But anywayz thanks

IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 02 Mar 2011 at 12:10pm
Hi,
       I have another question which you might have a solution. In the Report Footer I have placed the cumulative total for each month.
i.e Jan   feb     mar     apr     may
             100     0         0          0
 
 
Is there anyway that i can suppress the totals which are after february?? Because they would all be zeros.
May be using something like
 month(currentdate) = 03 > Extract then supress? Am not quite sure.
 
I dont want to display apr and may and next month i want to show totals until april and suppress all other month and so on.
 
 
Regards,
Nav
 
 
 


Edited by Nav522 - 02 Mar 2011 at 12:15pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Mar 2011 at 5:34am
How did you insert the summary? Running Totals, Cross tab, formula fields or something else?
Do you want all zeros suppressed or just all future months?
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 03 Mar 2011 at 6:54am

The summary are basically formula fields.Basically i need all the futures to be suppressed.

 
 
Regards,
Nav
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Mar 2011 at 6:55am
can you give me an example of one formula?
are there only 12 - one per month of this year?
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 03 Mar 2011 at 7:50am
I have 12 for each month. Basically am having these formulas in the detail section and suppress the detail. Finally doing a summmary of this formulas in the report footer
 
@janC =
If {@Extract} = '01' and {Command.REQ_STATUS} = 'D' then ({Command.COUNT(1)})
IP IP Logged
Page  of 2 Next >>
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.