Wednesday, March 28, 2012

Newbie question - Syntax for passing parameters to a sub report

Hey, I've looked pretty much everywhere I could, but I am unable to
figure out the correct syntax for my problem.
I have a main report that I am running with a stored procedure.
I also have a sub report that I am running with the same stored
procedure.
The stored procedure has 3 parameters. (a session identifier, an
operator, and a language code)
Here are the steps I have taken so far...
- added the subreport to my main report
- right click on the subreport (in the layout view) and click
Properties; then select the parameters tab.
- not sure what to do here.
** NOTE reportName is clients and the subreport is has the reportName
subClients
I thought the syntax would be... (main report)
Parameter Name: SubClients!@.SessionID
Parameter Value: =Parameters!SessionID.Value
(subreport)
Parameter Name: @.SessionID
Parameter Value: =Parameters!SessionID.Value
This doesn't work. I get this following error message...
A parameter in the subreport ?SubClients' has the name
?SubClients!SessionID.Value'. Parameter names must be CLS-compliant
identifiers.
This error and I also got a few others - not sure what to do.
Please help me, someone, anyone.
Thank you in advance.
Ciao
RobClick on expression when you are mapping the parameters of the subreport.
That wil bring you to the expression builder.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Rob" <buju8@.yahoo.com> wrote in message
news:3cff8d2d.0501131505.5862fa69@.posting.google.com...
> Hey, I've looked pretty much everywhere I could, but I am unable to
> figure out the correct syntax for my problem.
> I have a main report that I am running with a stored procedure.
> I also have a sub report that I am running with the same stored
> procedure.
> The stored procedure has 3 parameters. (a session identifier, an
> operator, and a language code)
> Here are the steps I have taken so far...
> - added the subreport to my main report
> - right click on the subreport (in the layout view) and click
> Properties; then select the parameters tab.
> - not sure what to do here.
> ** NOTE reportName is clients and the subreport is has the reportName
> subClients
> I thought the syntax would be... (main report)
> Parameter Name: SubClients!@.SessionID
> Parameter Value: =Parameters!SessionID.Value
> (subreport)
> Parameter Name: @.SessionID
> Parameter Value: =Parameters!SessionID.Value
> This doesn't work. I get this following error message...
> A parameter in the subreport 'SubClients' has the name
> 'SubClients!SessionID.Value'. Parameter names must be CLS-compliant
> identifiers.
>
> This error and I also got a few others - not sure what to do.
> Please help me, someone, anyone.
> Thank you in advance.
> Ciao
> Rob

No comments:

Post a Comment