Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Parameter Input Criteria

Status
Not open for further replies.

HyperHeidi

Technical User
Sep 25, 2002
8
CA
Hello,

I am have been searching how to do the following on the NET and finally gave in and had to ask:

Scenario: I have both range parameters and discrete parameters being entered by the user. I need to display the selection criteria that the user inputted into the report.

For example:
User selects a parameter range of vendors from MacDonald Stationary - Smithson Pens Ulimited
User selects a discrete parameter of items of Blue Gel Pens

I need to display a legend on the report showing
Vendors: MacDonal Stationary - Smithson Pens Unlimited
Item: Blue Gel Pens

My parameters are called {?Vendor} & {?Item} my table is called {My.Table}

Can someone tell me what the code would look like please.

Thank you in advance
Hyper Heidi
 
I'll address a few means to do this:

To quickly display the complete set of choices for a multi parm (254 chars max):

join({?vendor},", ")

A more elaborate means is the following formula which displays only if they've chosen something (you could substitute min and max as in the next example):

stringvar strLabel := 'Vendor';
stringvar array strSelections := {?Vendor};
if strSelections[1] <> ''
then
strLabel+&quot;: &quot; + join(strSelections,&quot;, &quot;) + chr(13)

To show the min and max:

+&quot;Vendors chosen: &quot;+ minimum({?vendor})+&quot; - &quot;+ maximum{?vendor})

-k kai@informeddatadecisions.com
 
Hi Synapsevampire

I put the following code into Crystal:

stringvar strLabel := 'Fiscal Year';
stringvar array strSelections := {?FYear};
if strSelections[1] <> ''
then
strLabel+&quot;: &quot; + join(strSelections,&quot;, &quot;) + chr(13)

And when I check to see if the code will work I get the following error: &quot;A string array is required here&quot; & the cursor stops in front of {?Fyear}; on line 2

What am I missing...I am using crystal reports version 8.5

Thank you in advance
Hyper Heidi
 
Hi SynapseVampire,

I apologize but thsi si still not working...let me giove you some more background and you can tell me where I am going wrong:

I have 1 parameter Fiscal Year {?FiscYear} - Under Options I selected Range
I am comparing this to APIBD.FiscYr
APIBD.FisYr has 5 fiscal years

When I run the report under start with I select 2002 and have Include Value checked
Then under End of Range I select 2003 and have checked Include Value

On my report I want to print Fiscal Year: 2002-2003 as my output
When put lbl.fiscYr: {?FiscYear} I get nothing because my parameter is a range
When I try to create the code you gave me above I get the error about arrays that I questioned you about.

Do you have any idea where ia m going wrong???? I am ready to cry and tear my hair out since I have no training and MUST get this report done! I really appreciate your help! I wish I could send you a coffee and donut!
Heidi Thank you in advance
Hyper Heidi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top