Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Parameter Question Post Reply Post New Topic
Author Message
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Topic: Parameter Question
     Posted: 05 Sep 2013 at 6:50am
I haven't had the need to use many parameters in my reports and I am having a problem getting one to work. I have a formula in my report that looks at hours in a pay period. I need a parameter that lets them choose wether they want to look at the current or previous one. Here is the formula that I have in the select statement that looks at the transactions in the previous pay period:
 
{VP_TOTALS.APPLYDATE} in {VP_TOTALS.PREVPAYPERIODSTART}  to {VP_TOTALS.PREVPAYPERIODEND
 
and this is the one that looks at the current one:
 
{VP_TOTALS.APPLYDATE}  in {VP_TOTALS.CURRPAYPERIODSTART}  to {VP_TOTALS.CURRPAYPERIODEND}
 
 
for some reason I cant get my brain in gear to set up a parameter that works that allows them to choose.
 
Thanks
KevV 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Sep 2013 at 8:00am
make a param with 2 options
current
previous
 
your select statement will simply be adding in this option with each of your parts and parenthesis to keep them toagther then an OR bewteen the two options
 
({?Param}="previous" and {VP_TOTALS.APPLYDATE} in {VP_TOTALS.PREVPAYPERIODSTART}  to {VP_TOTALS.PREVPAYPERIODEND})
OR
({?Param}="current" and {VP_TOTALS.APPLYDATE}  in {VP_TOTALS.CURRPAYPERIODSTART}  to {VP_TOTALS.CURRPAYPERIODEND})
 
IP IP Logged
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Posted: 05 Sep 2013 at 8:50am

That did it. I knew it was something simple. I had everything but the () around the whole statement.

 
Thanks again
KevV
IP IP Logged
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Posted: 10 Sep 2013 at 6:26am
I have one more piece in my report I cant seem to get to work. I hae some formulas that SUM up some paycodes. If the SUM is 0 I don't want it to show. I have tried this in the suppress formula but it still shows a total of 0.00.
 
{#Sunday Double Time_SU}   =-0.00 or
{#Sunday Double Time_SU}  =0.00 or
isnull({#Sunday Double Time_SU}) or
{#Sunday Double Time_SU}   = previous({#Sunday Double Time_SU})
 
Any suggestions.
 
Thanks
KevV
 
 
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