Wednesday, February 15, 2012

Empty DataSet Problem

I am having problems with a report that has subreports nested 2 deep. If
the query for top level subreport returns an empty data set, a blank page
with the message "An internal error occurred on the report server. See the
error log for more details. (rsInternalError)" is displayed.
If the query in the top level subreport contains no rows, I want to hide it
and stop processing the subreport it contains. I have tried setting the
visibility of the table containing the top level subreport based on
CountRows() and have tried using the NoRows property to display a message
instead of the table. Neither of these works.
It seems like CountRows() does not work on empty data sets. In other
similar situations, I have made sure my data set returned at least one empty
row and tested for the data set containing more than one row but it seems
like there should be a better way.
Can someone please tell me how to hide the table and stop processing the
nested subreport so the error message isn't displayed?Hi Tom,
Welcome to use MSDN Managed Newsgroup Support.
From your description, my understanding of this issue is: You get the
internal error when the top level subreport gets empty dataset. If i
misunderstood your concern, please feel free to point it out.
What's the parameter you pass to the nested subreport?
I don't think hide the top level subreport will resolve the issue because
this error is occured when the report is processing.
Wei Lu
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Tom,
No Rows property works great. Dont toggle using visiblity. Just write the
text on the No Rows property. When it doesn't find the records it displays
the text in the No Row property.
Amarnath
"Tom Bean" wrote:
> I am having problems with a report that has subreports nested 2 deep. If
> the query for top level subreport returns an empty data set, a blank page
> with the message "An internal error occurred on the report server. See the
> error log for more details. (rsInternalError)" is displayed.
> If the query in the top level subreport contains no rows, I want to hide it
> and stop processing the subreport it contains. I have tried setting the
> visibility of the table containing the top level subreport based on
> CountRows() and have tried using the NoRows property to display a message
> instead of the table. Neither of these works.
> It seems like CountRows() does not work on empty data sets. In other
> similar situations, I have made sure my data set returned at least one empty
> row and tested for the data set containing more than one row but it seems
> like there should be a better way.
> Can someone please tell me how to hide the table and stop processing the
> nested subreport so the error message isn't displayed?
>
>|||Wei Lu,
Since the top level subreport returns an empty data set, I have no idea what
is being passed to the nested subreport. I suspect that nothing (not NULL
but nothing) is being passed for the parameters. I removed the nested
subreport from the table and put in an expression to display the value
("Parameter: " + Fields!Id.Value) that would be used for the nested
subreport's parameter and the error message is displayed.
I need to find a way to stop processing the report when the empty data set
is returned by the query in the top level subreport. The top level
subreport cannot be displayed because there is no data for it and the nested
subreport's query cannot be run because there are no parameters to pass to
it. But, nothing I've tried, including the NoRows property, stops the
subreports from processing.
Do you have any suggestions?
Thanks,
Tom
"Wei Lu" <t-weilu@.online.microsoft.com> wrote in message
news:UF49vu$QGHA.940@.TK2MSFTNGXA03.phx.gbl...
> Hi Tom,
> Welcome to use MSDN Managed Newsgroup Support.
> From your description, my understanding of this issue is: You get the
> internal error when the top level subreport gets empty dataset. If i
> misunderstood your concern, please feel free to point it out.
> What's the parameter you pass to the nested subreport?
> I don't think hide the top level subreport will resolve the issue because
> this error is occured when the report is processing.
>
> Wei Lu
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> =====================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Amarnath,
Ever since we started running Reporting Service 2005, the NoRows property
seems to have stop working. I had used it sucessfully before converting to
2005 but it doesn't display anything now.
Have you heard anything about NoRows being broken in RS 2005?
Tom
"Amarnath" <Amarnath@.discussions.microsoft.com> wrote in message
news:A16C5558-32DD-4CF8-A5C4-2B3F1E2913B9@.microsoft.com...
> Hi Tom,
> No Rows property works great. Dont toggle using visiblity. Just write the
> text on the No Rows property. When it doesn't find the records it displays
> the text in the No Row property.
>
> Amarnath
>
> "Tom Bean" wrote:
>> I am having problems with a report that has subreports nested 2 deep. If
>> the query for top level subreport returns an empty data set, a blank page
>> with the message "An internal error occurred on the report server. See
>> the
>> error log for more details. (rsInternalError)" is displayed.
>> If the query in the top level subreport contains no rows, I want to hide
>> it
>> and stop processing the subreport it contains. I have tried setting the
>> visibility of the table containing the top level subreport based on
>> CountRows() and have tried using the NoRows property to display a message
>> instead of the table. Neither of these works.
>> It seems like CountRows() does not work on empty data sets. In other
>> similar situations, I have made sure my data set returned at least one
>> empty
>> row and tested for the data set containing more than one row but it seems
>> like there should be a better way.
>> Can someone please tell me how to hide the table and stop processing the
>> nested subreport so the error message isn't displayed?
>>|||Hi Tom,
Thanks for the update.
From your description, you memtioned that you can use NoRows to resolved
this issue in Reporting Service 2000, but it does not work in SSRS 2005. If
I misunderstood, please feel free to point it out.
Where's the NoRows property you set? For the subreport or the table which
contain the records?
Wei Lu
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Wei Lu,
I have tried setting the NoRows property for both the subreport and the
table but neither works. That's what prompted me to ask if NoRows is broken
in RS2005.
The documentation clearly states "When the dataset for a data region returns
no data, the data region is not rendered. Instead, a text box is rendered
that displays the value of the NoRows property." and just as clearly, it
doesn't work for me.
Tom
"Wei Lu" <t-weilu@.online.microsoft.com> wrote in message
news:aYOB$BoRGHA.5524@.TK2MSFTNGXA03.phx.gbl...
> Hi Tom,
> Thanks for the update.
> From your description, you memtioned that you can use NoRows to resolved
> this issue in Reporting Service 2000, but it does not work in SSRS 2005.
> If
> I misunderstood, please feel free to point it out.
> Where's the NoRows property you set? For the subreport or the table which
> contain the records?
> Wei Lu
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> =====================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||I am having a similar problem and I think is connected to the re-rendering of
a page containing a sub-report with an empty dataset.
In my case I have a report consisting of a top part using a different
datasource with a (+) for more details. The other part has a table with data
from another datasource. This table also has a subreport that uses a field
for input.
The report works great when the second part has a valid dataset. When the
dataset is empty everything is OK until I press the (+) sign and the report
is re-drawn. Then I get the same error message as you. I tried some other
versions where data is split between different pages, the error immideately
comes if I go to page 2 which re-draws the screen.
I have seen several similar problems on this forum so I belive that it is an
annoying bug for which I can not find a workaround. If anyone can offer help
I would be very happy.
"Tom Bean" wrote:
> Wei Lu,
> I have tried setting the NoRows property for both the subreport and the
> table but neither works. That's what prompted me to ask if NoRows is broken
> in RS2005.
> The documentation clearly states "When the dataset for a data region returns
> no data, the data region is not rendered. Instead, a text box is rendered
> that displays the value of the NoRows property." and just as clearly, it
> doesn't work for me.
> Tom
> "Wei Lu" <t-weilu@.online.microsoft.com> wrote in message
> news:aYOB$BoRGHA.5524@.TK2MSFTNGXA03.phx.gbl...
> > Hi Tom,
> >
> > Thanks for the update.
> >
> > From your description, you memtioned that you can use NoRows to resolved
> > this issue in Reporting Service 2000, but it does not work in SSRS 2005.
> > If
> > I misunderstood, please feel free to point it out.
> >
> > Where's the NoRows property you set? For the subreport or the table which
> > contain the records?
> >
> > Wei Lu
> > Microsoft Online Partner Support
> >
> > Get Secure! - www.microsoft.com/security
> > =====================================================> > When responding to posts, please "Reply to Group" via your newsreader so
> > that others may learn and benefit from your issue.
> > =====================================================> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
>
>

No comments:

Post a Comment