Showing posts with label norows. Show all posts
Showing posts with label norows. Show all posts

Wednesday, March 28, 2012

NoRows SubReport

Greetings,

I have a report which contains three subreports. Each subreport is contained within a rectangle in the main report so I can force a page break after each subreport. In each of the subreports, there is a graphic and a text box on one line, then another text box below those two items, then a table below all that. My problem is that if one of the subreports returns no data, it is resulting in a NoRows sort of situation and not even the graphic and the two text boxes are shown. I understand that you can set a NoRows message, but ideally, I want my NoRows message to be the graphic and the two text boxes, not a plain text message.

I'm not sure if this is even possible or at the very least if I could conditionally force a page break in my rectangles based on whether one of the subreports returns a NoRows situation.

Thanks In Advance

One thing that you can do is create a second dataset that always returns data. You can do this with a query like the following. This causes the SubReport to always report to the processing runtime that it contains data, so that it should always be processed and rendered.

Select 1 as DataValue

However, the problem with this is that the empty table will still contain the Table headers. So, you will have to make the table conditionally visible using an expression such as this.

=IsNothing(Fields!FieldName.Value)

You can pretty much use any field in the dataset to which the table is bound.

Adding the second dataset and adding the conditional visibility to the table should result in the subreport still being displayed, with the table hidden.

Ian|||

This works perfectly. Thank You. In fact, due to the NoRows parameter being set on the subreport, the table headers themselves are not shown, but instead the NoRows message is shown WITH the graphic and two text boxes. This is exactly the result I wanted.

NoRows Property: need to print table header.

Is there way to print the Header column of a table along with the
NoRows message ?
Seems like it just prints the NoRows message and doesnt render any part
of the table.
Thanks
RaviYEah thats right, "no ros" indicate not to render the actual element only a
notice that there is no data, you could go for a workaround to toggle
visibilty for this control and put another control under the actual control
which would be displayed with a dummy row to just display the column
headers. I know that quite the double to maintain, but it´s actually a
possibility.
HTH, Jens SUessmeyer.
--
http://www.sqlserver2005.de
--
"Ravi R" <bofobofo@.yahoo.com> schrieb im Newsbeitrag
news:1114794174.442413.16990@.f14g2000cwb.googlegroups.com...
> Is there way to print the Header column of a table along with the
> NoRows message ?
> Seems like it just prints the NoRows message and doesnt render any part
> of the table.
>
> Thanks
> Ravi
>

NoRows Property in RS2005

Is the NoRows property of a Data Region broken in Reporting Services 2005?
I have set the message to be displayed for both subreports and tables and
the message is never displayed when the data set is empty. It used to work
in RS2000.
Thanks,
TomHi Tom,
Welcome to use MSDN Managed Newsgroup Support.
I have tested on my side. The NoRows Property works fine in SQL Reporting
Service 2005. One thing to note is that, if you put a table in a
dataregion, you can only get the NoRows Message defined in the dataregion,
not the one in table.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
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,
The NoRows property is available for both my table & included subreports,
however, in the case of the subreports, they still process even if the
NoRows property is set & the data set is empty.
As I said in my previous post:
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:ZZf44cVTGHA.1952@.TK2MSFTNGXA03.phx.gbl...
> Hi Tom,
> Welcome to use MSDN Managed Newsgroup Support.
> I have tested on my side. The NoRows Property works fine in SQL Reporting
> Service 2005. One thing to note is that, if you put a table in a
> dataregion, you can only get the NoRows Message defined in the dataregion,
> not the one in table.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> 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,
I have tested in my side. It still works fine for subreport.
Here is my steps:
1. I create a report named Report1. Query data from a datasource, and put
the data in a table. I did not set the NoRows Property.
2. I create a report named Report2. Add a subreport control. And then I
set the ReportName as Report1 and NoRows Property to "Test".
3. I delete all the data in the database so that there will be no data in
the datasource.
4. I deploy the report to the report server and when I access the Report2,
it shows "Test" correctly.
Would you please check this in your side and tell me the result?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
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.sql

NoRows Property in Matrix does not work

I wanted to set the NoRows property for a matrix on a report to inform
the user when this condition occurs. I run the report by supplying
parameters that I am sure returns no data. Specifically, I am
determining the table to query based on user inputs. I provide inputs
that will look for a non existent table. I do an existence check on
the table to see if it is there to prevent a sql server error. If it
finds no table the query is not run. However, given that nothing is
returned the norows property is ignored and I get the error "Invalid
attempt to read when no data is present."
Could it be because the matrix requires an empty dataset back?That is what it was. I now ensure I return an empty dataset if the
table does not exist.

NoRows Leaves Extra White Space

I have a report with multiple tables and datasets. The problem is if one of
the tables/datasets doesn't have any data I get too much white space between
the sections. I tried to set the visiblity property on the table but that
doesn't work if there is no data being returned via the dataset.
For example:
John Does (1st table)
Background Info (2nd table)
Education (3rd table)
This looks fine because there is data in all 3 tables/datasets
Now if there is no background info I get this:
John Doe (1st table)
Education (3rd table)
When I want this:
John Doe (1st table)
Education (3rd table)
I can't combine the info to one table for reasons I won't go into.
Thanks!Try putting each table inside a rectangle and setting the rectangle property
visiblility to Hidden = True if no rows are returned for the rectangles child
table. Additionally, put all 3 rectangles/tables inside a 'master'
rectangle. This will help control some of your whitespace issues.
--
Andy Potter
blog: http://sqlreportingservices.spaces.live.com/
"Anonymous" wrote:
> I have a report with multiple tables and datasets. The problem is if one of
> the tables/datasets doesn't have any data I get too much white space between
> the sections. I tried to set the visiblity property on the table but that
> doesn't work if there is no data being returned via the dataset.
> For example:
> John Does (1st table)
> Background Info (2nd table)
> Education (3rd table)
> This looks fine because there is data in all 3 tables/datasets
> Now if there is no background info I get this:
> John Doe (1st table)
>
> Education (3rd table)
> When I want this:
> John Doe (1st table)
> Education (3rd table)
> I can't combine the info to one table for reasons I won't go into.
> Thanks!
>

NoRows doesn't work for Subreport

Hi there,
I have one report which has a table with a subreport in it, I put
something in the NoRows property of the Table and subreport. If there
is no data, I always got error " An internal error occurred on the
report server. See the error log for more details". Is NoRows property
for subreport broken?
Thanks.
HenryIf you get an error in the subreport this is more likely a problem with the
linkage between the primary and subreport.
Figure out what the parameter values are in the main report that get passed
to the subreport, then run the subreport with those parameters.
-Tim
<fanh@.tycoelectronics.com> wrote in message
news:1151511538.340685.35430@.b68g2000cwa.googlegroups.com...
> Hi there,
> I have one report which has a table with a subreport in it, I put
> something in the NoRows property of the Table and subreport. If there
> is no data, I always got error " An internal error occurred on the
> report server. See the error log for more details". Is NoRows property
> for subreport broken?
> Thanks.
> Henry
>|||Thanks, Tim.
The main report with the subreport works well if there are some data, I
use NoRows property of the main report and subreport. I did try all
input values including null for the subreport, it works well seperately
- showing the NoRows message. I also tried deleting the subreport, and
the main report works well - showing the NoRows message too.
But the main report with the subreport doesn't work and gave me
"internal error" message.I checked the ErrorLog, it shows
"AdjustTokenPriviledges () failed (00000514),,,, Callback type 11 not
used, callback type 7 not used", I don't understand this error, I
wonder the NoRows property is broken in SQL 2005.
Henry
Tim Dot NoSpam wrote:
> If you get an error in the subreport this is more likely a problem with the
> linkage between the primary and subreport.
> Figure out what the parameter values are in the main report that get passed
> to the subreport, then run the subreport with those parameters.
> -Tim
> <fanh@.tycoelectronics.com> wrote in message
> news:1151511538.340685.35430@.b68g2000cwa.googlegroups.com...
> > Hi there,
> >
> > I have one report which has a table with a subreport in it, I put
> > something in the NoRows property of the Table and subreport. If there
> > is no data, I always got error " An internal error occurred on the
> > report server. See the error log for more details". Is NoRows property
> > for subreport broken?
> > Thanks.
> >
> > Henry
> >