Sub report could not be shown. Sub report works separately - Not with Main Report

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.


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.