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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Field Array Problems

Status
Not open for further replies.

Pookeye

Technical User
Jun 2, 2006
10
US
Currently I have a parameter field with a 6 digit number, for example Ticket Numbers.. soo think of ie. 856031,

now the database shows this as 00856031. now I can do this with parameters with only one number. but if i was to add multiple parameters than my whole report stops working.

because the parameter fields creates an array with how ever many tickets someone wants to look up in their report.

soo I was wondering if there is a way to have the parameters be a string... but with multiple parameters, that is "ie. [887493 384750 287495] and have that made into a number.

you see I can have the parameter fields as a number instead of a string, but then when you add, it defaults as 856,031.00 which is not a ticket number.. its a number. I want to just have it displayed as 856031 without all the .00 and so on. however, I noticed taht I can only do that if I made the parameter field a string. is there anyway to make the array a number??
and if I have to seperate it, than how would i go about doing that where the record select would understand that there is more than one number.




thanks
 
Just to give more information:

okay we have Tickets that are suppose to be numbered like:

850619
895633
799632

and so on.

soo if someone was to run the report and they want a particular ticket, they would get a parameter field message that ask for which ticket they want on this report.

however the problem is the database has 00850619 or 00895633 or 00799632 and so on.

Now I was able to get this to work if I made the parameter field a number. so that if a user typed in 850619 then they would have no problem getting the ticket in the report. or if a user types 00850619 then they would still get the same 850619 ticket in their report..

but i had a problem with that because when u use the add button in parameter fields, it forces that number 850619 to become 850,619.00. Which is not what I wanted, so I had to change the parameter fields in to a String instead of a number and now when u add it shows 00850619 or 850619 without the who decimal and so forth.

now the problem comes that since i made the parameter fields into a an array of strings, it cant seem to allow me to force the array of strings into an array of numbers.

I was wondering if anyone knows what i can do here.

I tried

tonumber({?Ticket})

and it gives me an error that says something about arrays.

so I tried

toNumber({?Ticket}[1]) and that worked no problem... but i still have more numbers than just the array index 1 number.

i need to know if there is a way for me to make the array of strings a number.

soo that for example

array of strings: [850619 824190 856631 985623] (type string)

into an array of numbers:
[850619 824190 856631 985623] (type number)



any help with this would be greatly appreciated.

 
In your record selection formula, you can strip away the leading zeros in the database field and compare to a multi-value string parameter.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top