WhilePrintingRecords;
Join({?ListOfCustNum}), ',')
ASKER
ASKER
I assume that Join works only on strings not numeric multi valued par.Basically. Technically, Join is used on string arrays. For example,
ASKER
ASKER
ASKER
ASKER
To answer your question, is the parameter numeric parameter? Yes it is.If you're talking about the subreport parameter, then I'm missing something. In my experience, it is simply not possible to link a string (your @CustomerNum formula) to a numeric parameter. CR won't give you that option when you create the subreport link (which makes sense, because the string might not be a number, and then you'd just get some kind of error). I'm sorry to keep harping on this, but I'm confused. :-)
Just to add around “i” in Disp goes square bracket but it will not allow me to post my answer on site with it.Yeah, the site uses the square brackets for formatting commands. An i in square brackets is for italics. FYI, you can get around that by adding a right square bracket in front of the i -- []i] (I did that by adding two right brackets, so one gets removed by the site and the second one is left alone). Another option is to use the "code" formatting command. Put [code] and [/code] around the formula, and CR won't look for formatting commands in those lines, and you get something like this:
WhilePrintingRecords;
Global StringVar Array DISP;
Local NumberVar i;
Local NumberVar x := UBound({?ListOfCustNum});
Redim DISP[x];
For i := 1 to x Do
DISP [i] := ToText({?ListOfCustNum}[i],'#');
Join (DISP, ', ')
ASKER
Crystal Reports is a business intelligence application from SAP SE. It is used to graphically design data connections and report layouts from a wide range of data sources including Excel spreadsheets, Oracle, SQL Server databases and Access databases, BusinessObjects Enterprise business views, and local file-system information. Report designers can place fields from these sources on the report design surface, and can also deploy them in custom formulas (using either BASIC or Crystal's own syntax), which are then placed on the design surface. Crystal Reports also supports subreports, graphing, and a limited amount of GIS functionality.
TRUSTED BY
Is ?CustomerNum actually a string parameter?
If so, I'm not sure why the Command isn't working, but I haven't really used them (most of my reports used stored procedures).
First of all, while your @CustomerNum formula looks OK, have you tried simply putting that formula on the main report, to make sure that the list of numbers is correct? More to the point, you could put ?CustomerNum on the subreport, to make sure that it is getting the list correctly.
If the list is correct, you could try checking what is actually getting passed to the Command. Add a new column to your Select with the parameter value. Maybe something like:
'{?CustomerNum}' AS PARAM_VALUE
Then display that on the report and see if you get your list of numbers.
That's completely untested, but it seems like it would work.
James