Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Make a Number Parameter optional when running repo Post Reply Post New Topic
Author Message
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Topic: Make a Number Parameter optional when running repo
    Posted: 16 Aug 2007 at 8:19am
I have a report with a number parameter and want to be able to provide the user the option to not select that parameter when running the report.
Report for instance has 4 parameters, Work Order #, Activity, Start and End Date
The Work Order number is a Number type parameter
 
I tried accomplishing this my doing the following:  1)Changed the date type of the WO# parameter from number to String 2)  changing the code in the Report Selection formula by adding ToText around the field that is a number.

IF {@IF {@

   ToText({HISTORY.HISTKEY})  = {?WONO}
 
The report does not return any data an I am not sure what is wrong.  Any clues would be appreciated.  TY in advance.

IF {@

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Aug 2007 at 10:52pm
Check how ToText() is formatting the number. You probably want to do
ToText({History.HistKey},"#") = {?WONO}


This makes sure that it doesn't add decimals to the text conversion.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.016 seconds.