SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Sub reports parameters
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sz1
Constraint Violating Yak Guru

United Kingdom
451 Posts

Posted - 11/06/2012 :  05:59:19  Show Profile  Reply with Quote
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

India
52325 Posts

Posted - 11/06/2012 :  12:31:39  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
451 Posts

Posted - 11/07/2012 :  02:58:58  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
451 Posts

Posted - 11/07/2012 :  07:06:55  Show Profile  Reply with Quote
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

India
52325 Posts

Posted - 11/07/2012 :  09:35:51  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
451 Posts

Posted - 11/07/2012 :  10:27:37  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
451 Posts

Posted - 11/12/2012 :  08:03:37  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000