10
votes

I've one main report with 5 sub reports.

Sub report contains more than 10 parameters. (With 10 Multi valued parameters - So I've used Join method to pass value from Main report to Sub Report)

I've also tested Sub report separately and it is all working fine, showing data and everything.

I've tried by making another main report and tried to put that sub report in this newly created main Report but still no success.

I've also checked each and every parameter values and datatypes all are correct as per my store procedure.

I've tried by removing multivalued parameter one by one from Sub report properties to check weather issue is due to this multivalued parameter or what!

When we supply value from main report to sub reprot by using sub report properties - here when I clicked multivalued parameter it comes up with

=Parameters!ParameterName.Value(0) -- (0)

So it is okay or not? As I'm using it as multi selected values.

I'm stuck with this issue and I'm getting below error,

Error: Subreport could not be shown.

Any help please, Thanks in advance.

Please Note:

I've checked this, but No success

I've also checked this, but No success

Getting below error on main Report page,

enter image description here

I've also tried by uploading the all reports on SSRS-2012 but no success.

9
I've noticed you asking similar questions about this same issue... You're being really secretive about what exactly you're making, which makes it impossible to give you the help that you require. Like I've old you before, you need to give a lot more information. Maybe start by explaining why you are using this many parameters. What do you do with them? Are they used simply to be displayed on the report or used to filter data? Are you using all these parameters for 5 diffreent subreports or are you spreading them over 5 subreports?Oceans

9 Answers

4
votes

I believe you've actually already found the cause of your problem.

I've also checked this, nut no success

The post you're refering to has the following accepted answer by lethaljd:

This is a known defect in SSRS 2008. I'm not sure if it has been patched yet, but it has been fixed in SSRS 2012.

As you have found, the workaround is to use separate datasets.

https://connect.microsoft.com/SQLServer/feedback/details/648560/subreport-with-shared-dataset-throws-error

If you check the source that lethaljd has provided, it shows that this hasn't been patched either and probably never will be as it is no longer an issue in the newer versions.

This means that you should probably use a newer version of SSRS or think of a workaround. I'd like to help you think of a different approach but as I've stated in my original comment, you'll need to give a lot more information.
As the question is written now, I do not posses enough details to give you any well founded advice other than using a different version.

That being said, I do not wish this answer to come over as nonconstructive or negative. I just merely want to help you on the right track.

2
votes

Apart from checking the obvious steps as above... (Some might say this is obvious too...) I had to make sure that the parameters' datatypes (in the subreport) matched the columns they match in the main report.

When you have done that and you are still getting an error...

I am assuming you are using VStudio like I am. This is how I clean out the VStudio cache...

Unload the Report Close VStudio Go to the report folder in WinExplorer. Backup the solution folder Now go to the Project folder underneath the Solution folder Notice there are 3 types of files: - .rdl <-- This contains the Report definition... Don't touch this... - .rdl.data <-- Contains the cached data for the report executuion - .rds <-- This is your datasource definition... No need to touch it - .rptproj <-- This contains your project definitions... Don't touch it - .rptproj.user <-- Do not touch this... It contains the credentials for your data source Then you have a bin folder with 3 sub-folders... Debug, Release, and Debuglocal

Here is what you do: Remove all the .rdl.data files Remove all files under bin/Debug/* and repeat for DebugLocal and Release.

This should clean up the VStudio environment. Now open the solution... Reload the solution in VStudio and try again.

This fixed a number of these pesky data cache issues.

1
votes

You should check this:

  • multiple parameters must be defined as multivalue on main report and on subreport (define on subreport to allow multiple values)
  • when you passing multiple parameter to subreport you should pass it like [@param] and not like =Parameters!ParamName.Value(0)

On this blog is explained how to send multiple values to subreport.

1
votes

I've just had the same error, (though I'm not using multi valued parameters) I've added 2 new parameters to the subreport and set the parameter values in the main report.

It turned out to be the parameters in the subreport! My 2 new parameters are for datetime but when these were created by the wizard they were set as Text, once changed to Date/Time everything is working fine.

0
votes

Right click on the dataset, and click Dataset Properties. Go to the tab Parameters. Delete parameter that is not in the right format (i.e. parameter without @).

0
votes

The subreport object path data may be corrupted (this happened to me). Fix was to copy the subreport object in the main report. Then in the main report, reassign the path to the location of the subreport.

0
votes

My problem was caused by the local user having admin permissions to see all reports, while the SSRS account used on deployment only had permission to view the parent report and did not have permissions to view the subreports.

The solution was to grant the SSRS account permissions to view the subreports via the SSRS Web Portal Url.

The SSRS Web Portal URL can be found in the Report Server Configuration Manager.

0
votes

In my case the issue was not passing any Parameter from Main report to Sub report. It was solved once I added the parameter.

0
votes

If you are running a parameter with date, and the date is set as future date, the report will fail with same error so sometimes, just checking the parameters is enough