1

I did all the steps from this waltrought:

http://blogs.msdn.com/b/sqlforum/archive/2011/01/03/walkthrough-add-a-subreport-in-local-report-in-reportviewer.aspx

and when i run it i get the first father report and instead the sub report i get:

Data retrieval failed for the subreport, 'Subreport5', located at: C:...

i attach a print screen file (the subreport error)

i am using VS2010 framework 3.5.

1 Answer 1

1

Can you run the subreport by itself, given the right parameters? If you can't, your problem is that.

If you can run it successfully by itself, double-check that you are passing the parameters correctly to your subreport. Make sure the parameter types match and that you are passing all of them.

Another problem might be that -- if I recall correctly -- when you have a subreport in a local report, you need to provide the data for the subreport programmatically, just as you do with the parent report. There's an event that's raised - SubreportProcessingEvent -- when the subreport is being processed. You write a handler for that event and supply data in the handler. Here's some more information about it: LocalReport.SubReportProcessingEvent. There's a good example on that page.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.