I am working on RDLC report On VS2012
When I am trying add a parameter on my Sub report then my report is not working and I am getting this error “Error: Sub report could not be shown.”
And after adding parameter this event LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e) is not even called.
I realize that I'm late to the party here but this question came up during my searches so maybe this will help someone. I finally got sup reports working in my main report of my web application.
in Page_Load I added
then in I added the event
You'll also need to make sure that your main report's sub report has the correctly defined parameter and data as well as the sub report itself. This works for me using a stored procedure with one parameter but I assume it's easy to add additional params once this is firing correctly. I also set the general options of my sub report data type to Integer (the type my sproc was expecting) and to allow nulls as well as set the default value as "Specify values" and left it as (Null).
Things finally started working when I added
inside the ObjectDataSource2 node of my sub reports data source object, your mileage may vary.