mardi 23 décembre 2014

Subreport Only Works In Some Situations


I have built a report that's a sort of "Landing Page" for two other reports. This report has two parameters, both of which can accept blank ("") values (not null). One of the reports is a "search" type of report where the user can search for a person's name using the first parameter. The other report is shows many different data points for that person based on the other parameter (which is a person ID).


What I've done is use expressions to hide one or the other subreports based on which parameter is blank. So if a user wants to search by name, only the name search subreport will show and the other report will be hidden. If the user searches by name, the list that returns includes person ID which can be drilled into to run the report again, this time showing only the data points for that person ID. Alternatively, the user can use the ID parameter to go straight to a person's data, which hides the search subreport.


Both subreports use stored procedures to return data.


The problem I'm seeing is that my second subreport (person ID data) only returns data sometimes. When I run this report as a standalone, it always returns data if the ID is valid. As a subreport it only returns data sometimes even if the ID is valid. To be clear, I'm not seeing an error; in fact, nothing actually appears after the report renders.


To troubleshoot, I removed the "search" subreport and search parameter from the main report. Doing this left only the one person ID data subreport and its related parameter. The issue still persists after doing this, so I don't think the issue is related to the other parameter or subreport.


Does anyone have any thoughts as to why the report isn't working as a subreport? I'm at a loss, so any suggestions are welcome.





Aucun commentaire:

Enregistrer un commentaire