Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS 2005 Subreports occasionally empty

I have a "Parent" report that intentionally displays nothing, but queries a dataset of job numbers to be billed. This Parent report then loops through those jobs, and passes them one by one to two SubReports. The first SubReport is a summary of what will be billed on the job passed in. The second SubReport is a breakdown of all the detail for that Job's invoice, Employee, Hours, Rate, etc.

There will be roughly 400 jobs submitted by the Parent to the SubReports. The Summary report prints beautifully for all of them. The Detail SubReport does so in about 90 - 95% of the cases, but on some jobs it is blank, and I see the error message saying something to the effect that the SubReport cannot be displayed.

When researching this, the most common response is that there is a problem with the way the parameter is being passed in. That doesn't seem to be the case here, especially given that about 380+ of the 400 jobs show the detail beautifully. So, I ran the specific query for that SubReport to see if I actually got data for one of the offending jobs. Yes, hundreds of rows of data, so the data is there, the single parameter is being passed.

What else could cause this error?

The report continues on past the error, so that's good, but I need these detail sheets to display as well.

like image 215
DJGray Avatar asked Nov 28 '25 05:11

DJGray


1 Answers

To debug this kind of issue I take the following approach.

  1. Work out if it's a specific set of data. I.E is it a particular set of job numbers. You do this by limiting query in some way (parameter, hard code etc.)
  2. If it's data related, narrow down until you can find the actual datum causing the issue
  3. If it's not data related then I narrow down the render technologies one by one.

    • First I use separate browsers
    • Then I try different report servers
    • Finally different report viewers (SharePoint native, direct, visual studio etc).

Usually I find it's a minor data conversion issue that throws the following data stream rendering out.

Don't discount bugs in the reporting systems either - you're using a legacy technology in my opinion.

N.B. Just because the subreport renders on it's own, it doesn't mean that it will work in conjunction with a master report. The way the different parts interact is also important.

like image 76
Preet Sangha Avatar answered Dec 02 '25 04:12

Preet Sangha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!