Quantcast
Channel: Visual Studio Report Controls Forum
Viewing all articles
Browse latest Browse all 519

Microsoft Windows sub-report data retrieval fails in VS2012 on a report that worked in VS2010

$
0
0

I wrote a Winforms application about 6 years ago in VS2005. This was migrated to VS2010 and now, to VS2012. It has a Microsoft RDLC report that contains two sub-reports. All has been fine until the recent migration to VS2012. The sub-reports no longer work. I think there may be either a bug or a permissions problem within the RDLC report system itself.

To populate the sub-report data, the LocalReport_SubreportProcessing event has a listener added. Each sub-report fires the event and I check the SubreportProcessingEventArgs.ReportPath. On the development PC, this provides the name of the sub-report, and my code branches to provide the correct dataset in the form of a ReportDataSource added to the sub-report datasources.

When the project is published and installed on various client laptops, the ReportPath name is empty, so my code can no longer branch to add the correct data. Therefore, a data retrieval failed for the sub-report error is displayed in each sub-report.

As a workround, I now add both datasets to each sub-report when the sub-report process event fires. Since each has a different name, the correct data set is accessed and the other is ignored.

Given that the report and sub-reports are built as an embedded resource within the published files, I have no control over how they work. Therefore I assume that there is a permissions issue or some other bug that is causing this, since everthing worked OK in VS2010


Viewing all articles
Browse latest Browse all 519

Trending Articles