Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

ssrs pass values between reports Expand / Collapse
Author
Message
Posted Sunday, December 15, 2013 8:27 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 8:17 AM
Points: 362, Visits: 422
In a ssrs 2008 R2 report, I need to pass parameters to existing subreports that are currently called. Basically there is a main sssrs 2008 r2 report and there are 3 subreports. I would like subreports #1, subreport #2, and subreport #3 to receive the value values of customer number and customer name. I am hoping you can tell me and/or show me code that would tell me how to add parameters parameter values that are used to call these subreports.

Do you have direct examples of how to pass parameter values from main report to sub report 1? How is subreport #1 suppose to access obtain the parameter values passed from main report? How does sub report #1 pass the same parameter value to sub report #2? How is subreport #2 suppose to obtain (read) values from subreport #2?
Post #1523075
Posted Monday, December 16, 2013 7:56 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 7, 2014 2:30 PM
Points: 579, Visits: 2,086
it depends how you want to access the, if you use a subreport from the toolbox then you set the parameters the same way as you would a dataset. there should be a parameter tab on the properties window of the subreport.

If you use a text box action to go to a URL then it gets more hairy especially if you have a lot of parameters.

Which way were you thinking of accessing the subreport?
Post #1523239
Posted Monday, December 16, 2013 9:33 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 8:17 AM
Points: 362, Visits: 422
I am using a textbox property and using the action to go to a 'report'. I am not using the url option. I am using the textbox properties action to go to a report.

In that case, can you tell how to pass the parameter value from the main report and how subreport #1 is suppose to access the parameter value? In next step would be for subreport #1 to pass the parameter value and how sub report #2 will be able to obtain the parmater value.
Post #1523312
Posted Monday, December 16, 2013 9:38 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 7, 2014 2:30 PM
Points: 579, Visits: 2,086
When you choose the report in the drop down BIDS should pick up the Parameters. Then Right under that there's a spot to add parameters, you add the parameters then you link the parameters in the called report to the parameters in the Main report.

The dropdown will show you the fields fro the current dataset, but if you want to link to you main report parameters, there's an expression editor and you can use =Parameters!ParamName.value
Post #1523314
Posted Monday, December 16, 2013 2:29 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 8:17 AM
Points: 362, Visits: 422
Thanks!
Post #1523435
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse