Passing value to internal parameter of subreport
I have a report which contains a subreport. That subreport has 2 regular parameters and 1 internal parameter (which has default value). From what I've read ( http://msdn.microsoft.com/en-us/library/aa337490(v=sql.90).aspx ) I understand that there's no need to pass a value from the parent report to the subreport for internal parameters. All runs fine in VS (2005) and also fine after deploying to SSRS 2005. But when I deploy to SSRS 2008R2, I get "error subreport could not be shown" for that subreport. If I do pass that internal report (it DOES show in the chooslist from the parent report) then I get error "error subreport could not be shown" both in VS and in the reporting site. So I can't find any way to display it in SSRS 2008. Your advice appreciated. Namnami
October 21st, 2012 7:28am

You cannot pass a value to an internal parameter. Change it to a hidden parameter if you want to explicitly set it. Please post the details of the error.
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2012 9:39am

Hi T Pacl, I don't want to pass a value to the internal parameter in the subreport, it should take it's default value as if it was running seperately. But if I don't pass a value it runs fine in VS 2005 and in SSRS2005 but when deploying to SSRS2008 I get "error subreport could not be shown". Just to clarify- I'm using the subreport report Item (not a link navigating to report from text). Namnami
October 22nd, 2012 2:09am

Try running the subreport directly and provide the error details in this thread so we can see the specific problem.
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 11:12am

The subreport runs fine on its own. The error is only when it's run as a subreport and only in ssrs2008. Thanks for your helpNamnami
October 23rd, 2012 2:24am

The report doesn't know whether it is a report or subreport. In either case, it takes the input and generates an output using the same settings and formulae. If you get a different output when it is run as a subreport, it is because the input is different. So I suggest that you display each parameter value of your subreport (or at least those that are passed in by your main report) in a set of text boxes added to the top of the report. Run the report by itself in SSRS 2008 and record the values that the report is consuming. Now in the main report, do the same. Display the value of each parameter that you are passing to the subreport in a text box. Look for differences. Remember to display multivalue parameter values in a text box, you will need to convert them to a string using Join: =Join(Parameters!Multi.Value,",").
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2012 9:47am

Take a look at this article for more details on Internal Parameters in SSRS: SSRS Understanding Report Parameter VisibilityBest Regards, Dattatrey Sindol (Datta) | Blog | Facebook | Twitter | "Please mark the post as answered if it solves your problem."
October 23rd, 2012 1:19pm

Sorry T Pacl, but I don't quite understand. I'm passing only 2 parameters from the main report to the subreport - fromdate and todate. There's another internal parameter to the subreport which I'm not passing since it's internal. In the subreport itself I can display the above parameters + the internal parameter. But what should I display in the main report? I'm passing only fromdate and todate (and they're already displayed there being the same as in the subreport). Are you suggesting me to display the subreport's internal paramter from the main report? If so- how? ThanksNamnami
Free Windows Admin Tool Kit Click here and download it now
October 24th, 2012 2:57am

I understand however the internal parameter has a default value which, from the sounds of things, is dynamic. It seems like it is directly or indirectly based on the input from the 2 values you are passing. Following my post, when you run the subreport as stand-alone, the textboxes will show you the actual value (not the label) for each parameter in the report. This not only includes the value of the internal parameter but the values of the 2 you are passing. If you do the same in the master report then you can check the actual value being passed for each of the 2 parameters and look for differences between them and the values of those same parameters when the subreport is run by itself.
October 24th, 2012 2:21pm

Thanks for trying but the two other parameters have nothing to do with the internal parameter. The internal parameter is based on a default value from a DS query. That query returns a list of domainnames which is stored in a DB table. Then the report data is filtered / unfiltered according to if the user!userID is in that DB table. So the internal parameter does not depend in any way on the date parameters. (In any case I've tried to see what's the user!userID in the main and subreport (although it may not be neccessary to check since the report should run also if the username is not in the DB table) and it came up with the same domainname in both). Namnami
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 2:51am

See if this post helps: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/bf7401b3-a3f4-401a-80d8-690407fbdfd9/
October 25th, 2012 9:45am

See if this post helps: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/bf7401b3-a3f4-401a-80d8-690407fbdfd9/
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 9:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics