Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Optional Parameter Post Reply Post New Topic
Author Message
rob1986
Newbie
Newbie


Joined: 21 Feb 2011
Online Status: Offline
Posts: 2
Quote rob1986 Replybullet Topic: Optional Parameter
     Posted: 21 Feb 2011 at 3:04am
right i have this report and a parameter which prompts the user to enter a works order number, what i want is for the user to be able to enter a number in the parameter, or just ignore it and click ok to see the results for every works order number. How is this done becuase i dont see anything obvious, this is in crystal reports version 11
thanks
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 21 Feb 2011 at 4:37am
You could make the Default Value of the Parameter "ALL" and then in the select expert, make it so "ALL" returns all values. Something like:
 
({?WorkOrderNumber}='ALL'
and
{table.workordernumber}={table.workordernumber})
     else
          {table.workordernumber}={?WorkOrderNumber}
|< /\ '][' ( )
IP IP Logged
rob1986
Newbie
Newbie


Joined: 21 Feb 2011
Online Status: Offline
Posts: 2
Quote rob1986 Replybullet Posted: 21 Feb 2011 at 5:48am

thanks mate but i have already found an easy solution for this, so il write it up incase anyone else needs help.

i created 2 parameters one called works order number from, and works order number to. In the properties of the 2nd parameter i put the default value to zzzzzzz . So now the user can enter a range of works order numbers, or just one, or completely ignore the parameter and just click ok and see all records :)
 
IP IP Logged
lwr1
Newbie
Newbie


Joined: 28 Jul 2011
Location: United States
Online Status: Offline
Posts: 1
Quote lwr1 Replybullet Posted: 28 Jul 2011 at 1:15pm
I have a similiar situation. I have a report generated in house via another dept where the developer has 2 required date fields with 2 optional string fields.
 
In ASP.Net3.5(vb) I have checked the two optionals are passed as "" but keep getting error of invalid parameter. I have double checked paramter names and everything matches accroding to report spec in the sql tables.
 
Could this be because of no default values in place on the report when user doen'ts enter the text info into the ASP.Net app. The report was created Crystal 9.
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