August 7, 2007 at 7:33 am
Hello There! In my minds eye, this is a tricky question. Maybe I'm making it harder than it actually is, but I am near stating that SSRS is incapable of producing the following request.
I have created a report that takes in a parameter. Let's call it ID. This ID is a foreign key in another table that has individual steps for that particular ID. In the report that I have created it outputs some fields from the core table, then pulls in a subreport that takes in the ID as a parameter (=Parameters!ID.Value). The single report works perfectly. However, let's say I want SSRS to produce the output to print 25 ID's. By changing the query or stored proc to pull where ID IN (@ID) -- and if id's '1,2,3,5,6,8,9,23' were passed in to the report, the report is returning the parameter is out of scope error when getting to the subreport.
I personally feel that this request is flawed at best due to the way the printing would end up on the web page anyhow, but I am just trying to make it work if possible.
Any ideas or perspectives on this is greatly appreciated,
Brian K. McDonald
August 8, 2007 at 5:51 am
Hi
Could you give some details of yr table data so i can understand that tricky part ?
thx
JV
August 8, 2007 at 7:18 am
Of course! I'll shrink it down a little bit, but you'll get the picture.
Table 1:
Sample Records:
Table 2:
Sample Records:
So, Table 2 has multiple records that refer to the SOPID in Table 1. The sequence number is the step number of the SOP in reverse order. For example, SOPID 71 has four total steps, Sequence Number 3 is the first step, 2 is the second step and so on. SOPID 72 has two steps.
I do a simple join on these tables in a stored proc that accepts @SOPID. I filter the records by WHERE table1.SOPID IN (@SOPID).
When I pass in the values into the report using SOPID = 71,72,73 it fails. However, when I execute the stored proc in SSMS it runs fine and returns all of my records.
At the report layer: I have a Report Level Parameter of @SOPID. The report has a subreport that pulls each of the steps from TABLE 2 using that passed in @SOPID. The failure occurs when the SOPID is passed into this subreport..stating out of scope.
I hope this will help you! Please let me know if you have any ideas.
Thank you,
Brian
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply