Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Sub reports parameters

Author  Topic 

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-11-06 : 05:59:19
Hi

I have several sub reports I have embedded into a main report with parameter of a date value. When I add the sub report and then go to sub report properties and add the parameter to match the sub report paramater I use the exact same name in the main sub report but I get a CLS compliant identifier error?? When I run the main report the subs with the date value parameters show errors. How do I pass the sub report parameters in the main report so I get prompted for values for the sub reports. I find this a very simple task in Crystal reports...:(

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-06 : 12:31:39
hmm...its as simple as defining parameters in subreport and including them in main report where you call them. Make sure you map it parameter/field value in main report from which it needs to grab the values

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-11-07 : 02:58:58
Do you mean by map, on the main report go to properties of sub report and add the parameter exactly as it is in the sub report? or is there somewhere else I need to map the parameters on the main report to match the sub...?
Thanks
Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-11-07 : 07:06:55
I added the same parameter on a sub report to test the main report to see if I could map the fields, I went to the sub report, right click - properties - parameters and select the name of the sub report parameter then select the field name from the list of values.

This works but the same field parameter is also in the sub report thats in the main report, If I do the same thing for another parameter, say a date field and again select it from the sub report menu I dont get prompted to enter the date field when I run the main report, do I need to map somewhere else? Do I add another parameter on the main report to mimic the sub report them map it?? I need the main report to prompt for any additional sub report parameters??

Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-07 : 09:35:51
quote:
Originally posted by sz1

I added the same parameter on a sub report to test the main report to see if I could map the fields, I went to the sub report, right click - properties - parameters and select the name of the sub report parameter then select the field name from the list of values.

This works but the same field parameter is also in the sub report thats in the main report, If I do the same thing for another parameter, say a date field and again select it from the sub report menu I dont get prompted to enter the date field when I run the main report, do I need to map somewhere else? Do I add another parameter on the main report to mimic the sub report them map it?? I need the main report to prompt for any additional sub report parameters??

Thanks


whats the purpose of that? if you've parameter already send from main report to subreport, why do you need to select it again in subreport? I'm not getting you scenario clearly

or are you telling about other parameters that you've in subreport which you want to set values at runtime? in that case, what meaning does it make to include it as a subreport when its interactive by itself? I think what you need is drillthrough functionality using jump to report/url rather than a subreport

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-11-07 : 10:27:37
Yes sub reports have own parameters different from main report, its a master report to show different data based on user selection. The parameters set on the main report that match the sub reports are ok, its the ones that have different parameters on the sub reports to the main report thats the issue, I know what you mean by using a url but really wanted all subs on master main report if this is possible.

Thanks
Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-11-12 : 08:03:37
Hi Yeah the sub reports have their own values for parameters, are you saying these cant be embedded onto main report for prompts, if this cant be done is the only other way to add a simple hyperlink to the sub report?
Thanks

quote:
Originally posted by visakh16

quote:
Originally posted by sz1

I added the same parameter on a sub report to test the main report to see if I could map the fields, I went to the sub report, right click - properties - parameters and select the name of the sub report parameter then select the field name from the list of values.

This works but the same field parameter is also in the sub report thats in the main report, If I do the same thing for another parameter, say a date field and again select it from the sub report menu I dont get prompted to enter the date field when I run the main report, do I need to map somewhere else? Do I add another parameter on the main report to mimic the sub report them map it?? I need the main report to prompt for any additional sub report parameters??

Thanks


whats the purpose of that? if you've parameter already send from main report to subreport, why do you need to select it again in subreport? I'm not getting you scenario clearly

or are you telling about other parameters that you've in subreport which you want to set values at runtime? in that case, what meaning does it make to include it as a subreport when its interactive by itself? I think what you need is drillthrough functionality using jump to report/url rather than a subreport

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page
   

- Advertisement -