Subreport Bug in SSRS / SQL?
Hello - I've posted about this issue specifically before, but I thought I'd address the issue generally. The repro steps here are based on using SSRS 2005 reporting out of VS TFS 2005 with all updated Service Packs.I believe I have come across a bug in my SSRS reports when using a report as a subreport. Here are the repro steps:
Create a new Report Project with whatever name you desire.
Create a Shared Data Source called "TFSReportDS" of type "Microsoft SQL Server" with the Connection string like "Data Source=[servername];Initial Catalog=TfsWarehouse". Of course, if you aren't running TFS you'll have to use a different connection string.
Create a new report called "Host". Within the "Host" report, create a Dataset using "TFSReportDS". For my purposes, my Query string is "SELECT System_ID from dbo.[Work Item]" just for simplicity.
Create a new report called "Subreport". Within the "Subreport" report, create a Dataset using "TFSReportDS". For my purposes, my Query string is "SELECT System_ID from dbo.[Work Item] where System_State is null". The important part here is the "System_State is null" section. For your own repro in your own server, you might need to choose a different field, but the "is null" part is important.
In the Layout tab of "Subreport", create a textbox with the text "Hello" inside. Note that in no way does this call upon the information in the dataset... it is just a textbox. You could drop in "System_Id" but you would get the same result anyway.
Preview "Subreport" to see that the text "Hello" indeed appears as it should. Save "Subreport".
Now in "Host", add "Subreport" as a subreport (of course). Now preview "Host". In most cases, you would see "Hello" appear, similar to the preview of "Subreport". However, you will find that the text "Hello" does NOT appear.
Now go back to "Subreport" and change the Query string to "System_State is NOT null" and save "Subreport". Now go back to "Host" and refresh the preview, and the text "Hello" will now appear.
Ultimately, I have found that when the subreport contains a constraint of "DatabaseField is null" or anything like that, the subreport will not refresh correctly in the host report. I even tried something like "WHERE ISNULL(DBField,blabla) = whatever" but still this caused a problem.I hope the steps above are enough for you to repro, even if you aren't running TFS. If you cannot repro, please let me know so I can help. This has been a showstopper for me, and I've spent many hours creating painful workarounds.
January 5th, 2010 10:18pm
Hi Aaron,You should probably report this on Microsoft Connect as a bug.
Boyan Penev
---
http://www.bp-msbi.com
Free Windows Admin Tool Kit Click here and download it now
January 6th, 2010 12:21am
Thanks Boyan. For those interested, here is the link for this bug report:https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=523332
January 6th, 2010 2:47am
PDF to EPUB Converter ,
PDF to EPUB Converter for Mac ,
PDF File Transfer ,
Transfer PDF to iPhone 3G ,
PDF Ripper ,
Convert PDF to Image ,
Convert PDF to BMP ,
Convert PDF to Tiff ,
Convert PDF to Office ,
Convert PDF to Excel ,
Convert PDF to Word ,
Convert PDF to Doc ,
Convert PDF to TXT ,
Convert PDF to Text ,
Convert PDF to RTF ,
Convert PDF to Powerpoint
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2010 3:45am