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

Printing out multiple parameters. 1

Status
Not open for further replies.

gazol

Technical User
Jan 29, 2004
31
SE
I want to be able to print out what parameters that where input when the report was run.

I´m now printing out some of the parameters like this :

----@parameter_formula-------------

"Timeintervall: " &
totext(minimum({?time_interval}))
+" - "+
totext(maximum({?time_interval}))
& " " &
"Timegrouping: " &
totext({?time_grouping})
& " " &
------------------------------------

This gives me a output like:
Timeintervall: 2004-11-01 00:00:00 - 2004-11-11 23:59:59 Timegrouping: Hour

I want to be able to print out what was input in my parameter fields that are multiple value parameter as well.
How can i do that ? (it now works if i want to print out one value from a singel parameter)

I put in numbers like: 1, 2, 5, 23 and so on when the report is run and the data is selected from the database on that basis.

I want to be able to print out what id:s where selected. When i use the formula above i get a error because i need some functions that can print out all of the input numbers.

Expected output: Id: 1, 2, 5, 23

I´m using Crystal reports 8.5 and odbc oracle.

Please help, regards / gazol
 
this will give you a comma seperated list of values:

numberVar x;
stringVar strParameter := "ID: " ;

for x := 1 to ubound({?ID}) do
(
strParameter := strParameter & {?ID}[x] & ",";

);

strParameter := mid(strParameter,1,len(strParameter)-1);
 
Thank´s works perfect. :)

How do i get the output without the ,00 ? I want to have the numbers like: "1, 2, 3" now i get: "1,00, 2,00, 3,00
 
Add this line to the end of the formula:

totext(strParameter,0);
 
Can´t get it to work, just returns a error code like:
"Too many arguments have been given to this function."

Maby i put it at the wrong place ?

---@formula----

numberVar x;
stringVar strParameter := "ID: " ;
for x := 1 to ubound({?ID}) do
(
strParameter := strParameter & {?ID}[x] & ",";
);
strParameter := mid(strParameter,1,len(strParameter)-1);
totext(strParameter,0);

-------------------------------
 
Actually, if your parameter is a number you shouldn't need that last line. I'm not sure where the ,00 are coming from (thought you meant .00). What exactly are you entering as a parameter?
 
The ToText is in the wrong place (I also adjusted pbateman's formula a bit to put a space between values as well):

numberVar x;
stringVar strParameter := "ID: " ;
for x := 1 to ubound({?ID}) do
(
strParameter := strParameter & ToText({?ID}[x],0) & ", ";
);
strParameter := mid(strParameter,1,len(strParameter)-2);
strParameter;

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top