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

printing multiple value parameter -- I'm blocked 4

Status
Not open for further replies.

scotchjc

MIS
Feb 8, 2003
4
US
I need to print in the report header the values that were input for a parameter where multiple numeric values are allowed. I'm drawing a blank......any help appreciated.

Thanks,

John Crystal
 
Crystal version? The answer is different depending upon your version.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Try:

whileprintingrecords;
numbervar array MyValues := {?MyParm};
numbervar counter;
stringvar array Output;
for counter := 1 to ubound(MyValues) do(
Output[counter]:=totext(MyValues[counter])
);
join(Output,",")

-k
 
If you're having difficulties, post what you tried.

I received an email stating that you were blocked???

If the parameter is empty, then it might error about the subscript size, otherwise it seems OK.

But I can't assist you further if you don't show what you're using.

-k
 
You might need to do the following:

whileprintingrecords;
numbervar array MyValues := {?MyParm};
numbervar counter;
stringvar array Output;

for counter := 1 to ubound(MyValues) do(
redim preserve Output[ubound(MyValues)];
Output[counter]:=totext(MyValues[counter])
);
join(Output,",")

-LB
 
Ahh, good point LB, I couldn't test, or rather:

whileprintingrecords;
numbervar array MyValues := {?MyParm};
numbervar counter;
stringvar array Output;
redim Output[ubound(MyValues)];
for counter := 1 to ubound(MyValues) do(
Output[counter]:=totext(MyValues[counter])
);
join(Output,",")

Tad more efficient to just do it once.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top