Skip to Content
0
Former Member
Jan 28, 2010 at 02:58 AM

Another multi value parameter question

77 Views

I have spent the last six hours researching and testing this and I am getting nowhere. I am using CR 2008 and SQL Server 2005. I have a main report that has a six level cascading prompt. The values for all of the prompts are number values. The lowest level prompt is a multi value prompt. I need to pass the value(s) from this prompt to a subreport so I have created this formula field which I have seen in many of the posts:

WhilePrintingRecords;

Shared numberVar counter;

//increments the loop so that all parameter entries can be displayed

Shared stringVar display;

//creates a string "running total" so that all entries can be displayed

for counter := 1 to Count({?Hierarchy - DOUNum}) do

(

display := display + ToText({?Hierarchy - DOUNum}[counter],0,";");

);

display;

I display this on my main form and I run across my first problem. The first DOUNum is 19903 and the second is 19904. What I see in the report though is 19,90319,904. I need for it to be 19903,19904. Before i knew the formula was doing this I passed this formula to my subreport for record selection there. That subreport has the DOUNum field in it and that field is a numeric field, so when I try to put this in my record selection formula:

{spCSSReportNCounts1;1.DOUNum} in [{?Pm-@DOUNum}]

I get this error: A number range is required here.

How in the world can I get around these two problems?

TIA