Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Multiple Parameters for the same string Post Reply Post New Topic
Author Message
SunnyA84
Newbie
Newbie
Avatar

Joined: 05 Nov 2010
Online Status: Offline
Posts: 5
Quote SunnyA84 Replybullet Topic: Multiple Parameters for the same string
     Posted: 21 May 2011 at 9:19am
Dear Experts,
 
i need your help please.
 
I am creating a crystal report and nearly there.
however I am having a trouble creating  a "free text field" parameters.
 
example : currently it looks like
 
ColourCode(string)   Products(string)          Costs(free text field parameter)
    1                                Bike                          500$ 
    2                                Bike                          500$
    3                                Bike                          500$
       
the cost amount is entered when it prompts for the paramtere value while running the report. here the value is 500 $ for all Bikes.
 
however i want to enter different amounts for the  same product (Bike) or i want the report to prompt for different value to enter for each Bike.
e.g.
 
ColourCode(string)   Products(string)          Costs(free text field parameter)
    1                                Bike                          500$ 
    2                                Bike                          400$
    3                                Bike                          200$
 
Can you please suggest.
 
please let me know incase you need more info from my side.
 
Thanks for your support.
 
Best Regards,
Sunny
 
 


Edited by SunnyA84 - 21 May 2011 at 11:55am
Sunny
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 May 2011 at 3:11am
you could create a range option, so you could get the high and low price and return all items inside that range.
 
you could allow the user to enter the values in a delimited way...say with commas between value, and then you could add a comma to the front and back of the string (,100,110,200,400,) and compare the values using an instr() statement like:
 
instr({?parameter}, ","+{table.field}+",") > 0
 
in the filter formulas (if it is true, the row is kept else it is discarded).
 
or you could make a more free form method and parse it if you are using stored procs (100, 200-400, 150).
 
Hope one of these ideas will lead you to your solution.
IP IP Logged
SunnyA84
Newbie
Newbie
Avatar

Joined: 05 Nov 2010
Online Status: Offline
Posts: 5
Quote SunnyA84 Replybullet Posted: 07 Jul 2011 at 10:05am
dear expert,
 
sorry for my late response as i was tied up with loads of reports!
 
i tried your formula but that does not seem to work.
 
or may be i was not clear enough to explain the situation.
 
what i am trying to do is to pass multiple values in the same parameter field so that it appears on every record (string product).
 
Please let me know if i need to share more info with you.
 
Many thanks for your reply!
 
Best Regards,
Sunny
Sunny
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 Jul 2011 at 4:03am
since you wanted a string product, you need to check if the value is in the string...if you are passing an array of parameter values you will need to check if the value is IN the array...CR help can help with the syntax as I don't use arrays very often.
 
you will need to be creative is how you filter the data as don't want a hard and fast selection, but one that is much more flexible.
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