Sunday, February 26, 2012
hiding table with null dataset
visibility expression of table properties. any ideas for using
expressions to hide a table with a null dataset would be great.
tia
mikeHi Mike,
In my reports when there is not data to display (null data set) I have a
textbox that is hidden until the NULL dataset is verified. They it shows "No
Data To Display For the Report Criteria" You can use an expression similar
to the following, just revers the True,False logic if you need to.
=iif(rownumber("DataSetName") = 0, false, true)
Hope this helps,
--
Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
http://www.apress.com/book/bookDisplay.html?bID=365
"michaelwall" <michael.w.i@.gmail.com> wrote in message
news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> visibility expression of table properties. any ideas for using
> expressions to hide a table with a null dataset would be great.
> tia
> mike
>|||perfect ! thanks
"Rodney Landrum" wrote:
> Hi Mike,
> In my reports when there is not data to display (null data set) I have a
> textbox that is hidden until the NULL dataset is verified. They it shows "No
> Data To Display For the Report Criteria" You can use an expression similar
> to the following, just revers the True,False logic if you need to.
> =iif(rownumber("DataSetName") = 0, false, true)
> Hope this helps,
> --
> Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> http://www.apress.com/book/bookDisplay.html?bID=365
>
>
> "michaelwall" <michael.w.i@.gmail.com> wrote in message
> news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > visibility expression of table properties. any ideas for using
> > expressions to hide a table with a null dataset would be great.
> > tia
> >
> > mike
> >
>
>|||I responded early - The expression hides the table whether the dataset is
emprty or not.
any further ideas? what do you mean by "until the NULL dataset is
verified" how is this done in the report designer, do i need custom code ? It
seems as if the visibility by expression should cover this but I find very
little documentation and no intellisense to experiment... thanks again ...
"Rodney Landrum" wrote:
> Hi Mike,
> In my reports when there is not data to display (null data set) I have a
> textbox that is hidden until the NULL dataset is verified. They it shows "No
> Data To Display For the Report Criteria" You can use an expression similar
> to the following, just revers the True,False logic if you need to.
> =iif(rownumber("DataSetName") = 0, false, true)
> Hope this helps,
> --
> Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> http://www.apress.com/book/bookDisplay.html?bID=365
>
>
> "michaelwall" <michael.w.i@.gmail.com> wrote in message
> news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > visibility expression of table properties. any ideas for using
> > expressions to hide a table with a null dataset would be great.
> > tia
> >
> > mike
> >
>
>|||=iif(ReportItems!txtTotalDistribution.Value >= 1, FALSE, TRUE)
works by looking at an aggregate SUM() field in the table footer
"Rodney Landrum" wrote:
> Hi Mike,
> In my reports when there is not data to display (null data set) I have a
> textbox that is hidden until the NULL dataset is verified. They it shows "No
> Data To Display For the Report Criteria" You can use an expression similar
> to the following, just revers the True,False logic if you need to.
> =iif(rownumber("DataSetName") = 0, false, true)
> Hope this helps,
> --
> Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> http://www.apress.com/book/bookDisplay.html?bID=365
>
>
> "michaelwall" <michael.w.i@.gmail.com> wrote in message
> news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > visibility expression of table properties. any ideas for using
> > expressions to hide a table with a null dataset would be great.
> > tia
> >
> > mike
> >
>
>|||Data regions (table, list, matrix, charts, subreports) have a NoRows
property. If set, the NoRows message will be shown instead of the data
region. In addition, style properties (fonts, colors, etc.) directly set on
the data region reportitem (e.g. table) will apply to the NoRows message.
Alternatively, you could use the RowCount aggregate functions to determine
the number of rows in a dataset. E.g. =RowCount("DataSetName")
See also:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_expressions_v1_0k6r.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"michaelwall" <michaelwall@.discussions.microsoft.com> wrote in message
news:4D53BEB6-D542-49B1-A8F5-A144990CB93C@.microsoft.com...
> perfect ! thanks
> "Rodney Landrum" wrote:
> > Hi Mike,
> > In my reports when there is not data to display (null data set) I have a
> > textbox that is hidden until the NULL dataset is verified. They it shows
"No
> > Data To Display For the Report Criteria" You can use an expression
similar
> > to the following, just revers the True,False logic if you need to.
> >
> > =iif(rownumber("DataSetName") = 0, false, true)
> >
> > Hope this helps,
> > --
> > Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> >
http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> > http://www.apress.com/book/bookDisplay.html?bID=365
> >
> >
> >
> >
> > "michaelwall" <michael.w.i@.gmail.com> wrote in message
> > news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > > visibility expression of table properties. any ideas for using
> > > expressions to hide a table with a null dataset would be great.
> > > tia
> > >
> > > mike
> > >
> >
> >
> >
Hiding subtotal rows when there is only 1 row in the group
How could one do this? I understand you could use the COUNT() function, but I'm not sure which object's visibility would best support this. All that I've tried (subtotal area, group visibility) do not seem to work.
If you change the visible property on the subtotal textbox that RS adds, it will only 'blank out' the area where the subtotal row would have been - this doesn't achieve the desired effect of saving space.
Try this:
Click on the whole row for your group footer
Go to the properties
Put this in the 'Visibility - Hidden' expression.
=IIf(CountRows("GroupName") > 1, False, True)
I tried this on one of my reports and it removed the space used by the group footer, it didn't just blank it out. If there was only one row in that group, the footer wasn't shown, but if there were more than 1 row, it would. Just as a test, you might want to create a new row below your group footer and just add some text in there so that it will show below your subtotals (if you have any). In my case, the row below my group footer was 'moved up' to be directly below the details if there was only one row displayed, otherwise, it was displayed directly below the subtotals.
Hope this helps.
Jarret
|||It's in a matrix, so group headers and footers aren't apparent options. :(
I could see how that would work in a table though.
|||When you choose the subtotal option for a group in a matrix, a row does get added. To affect only the subtotal cell in a matrix you need to use the InScope() function. The main thing to understand in the logic is that the subtotal cell for a group is not in scope of that group and hence the function return false for the cell.
For example, say on your rows you have 2 groups called region_group and country_group. You right-click the country textbox and select Subtotal. This adds an additional row containing just the header textbos for the subtotal. You now 3 stages for hiding the subtotal.
1.You now need to add an expression to the details cell for the Visibility -> Hidden property. The expression should be:
=Not InScope("country_group")
This should evaluate to Hidden = True for the total row as it is not in scope of the country_group. If you run this you will probably find that the details cell disappears but the heading remains.
2.Now if you try applying the same expression for Visibility to the subtotal header textbox it should also disappear but will probably leave a blank gap in it's place.
3.If you can apply this same expression to the entire subtotal row (by clicking on the row header) then this should also remove the visible gap.
I'm not sure if the last step is possible as I am unable to test this at the moment (on client site), the first 2 steps should work though.
Hope this helps. Please post the results of your attempts.
|||Those are great suggestions, but there are no header or footer rows in a matrix.
If I select the entire row that contains the subtotal, a visible property is not exposed.
There are also column groupings after the one I'm mentioning - and if I mess with the group visibility, the successive columns are hidden or blanked out.
I'll see what else can be done to acheive the row hiding.
Sunday, February 19, 2012
Hiding columns
One more query!!
What expression can I use to set the visibility of a list or a matrix
I tried
=IIf(Fields!count.Value > 20, 0 , 1 )
and
=IIf(Fields!count.Value > 20, "False", "True" )
and
=IIf(Fields!count.Value > 20, "Hidden", "Visible" )
none of these work.
Can anyone tell me what is wrong here?
Thanks
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.I am suspicious that you are using Fields!count.Value and not
Sum(Fields!count.Value) if you are trying to hide a list or matrix as you
will probably want to do this over multiple rows. The first one should work
as should an expression that returns a boolean, =(Fields!Count.Value>20).
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uAZQZYvVEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi
> One more query!!
> What expression can I use to set the visibility of a list or a matrix
> I tried
> =IIf(Fields!count.Value > 20, 0 , 1 )
> and
> =IIf(Fields!count.Value > 20, "False", "True" )
> and
> =IIf(Fields!count.Value > 20, "Hidden", "Visible" )
> none of these work.
> Can anyone tell me what is wrong here?
> Thanks
>
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.
Hiding a table in a report
I have a report with several tables, each of them "Inserts a page break
before" (so it renders on an individual page)
The visibility of one of these tables depends on the data and some problems
are derived from this situation:
1 -The table with the Hidden expression is not inserting the page break no
matter if it is visible or not.
2 -The space occupied by the definition of the table is always there, no
matter if the table is hidden.
I try putting all my tables in a main table and hide the row containing the
conditional table. This solves the 2nd problem, but when you do this the
"Insert a page break before this table" property of the contained tables are
ignored and everything renders on the same page.
What I would like is that when the table is visible, it "inserts a page
break before" and renders in another page, and when it is hidden, the
current page doesn't have an extra white space between its end and the
footer, and the next table renders on the next page.
Is there any way to do this?
Thanks.Try putting each table into a rectangle.. Then show/hide the rectangle... I
think that might get you where you wish to be...
Have fun!
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Daniel Bello" wrote:
> Hello:
> I have a report with several tables, each of them "Inserts a page break
> before" (so it renders on an individual page)
> The visibility of one of these tables depends on the data and some problems
> are derived from this situation:
> 1 -The table with the Hidden expression is not inserting the page break no
> matter if it is visible or not.
> 2 -The space occupied by the definition of the table is always there, no
> matter if the table is hidden.
> I try putting all my tables in a main table and hide the row containing the
> conditional table. This solves the 2nd problem, but when you do this the
> "Insert a page break before this table" property of the contained tables are
> ignored and everything renders on the same page.
> What I would like is that when the table is visible, it "inserts a page
> break before" and renders in another page, and when it is hidden, the
> current page doesn't have an extra white space between its end and the
> footer, and the next table renders on the next page.
> Is there any way to do this?
> Thanks.
>
>|||Hello Wayne:
Having the tables inside rectangles works the same for me, both ignore the
"Insert a page break before this element" clause once you add an expression
to change the visibility.
Any ideas?
Thanks,
Daniel Bello.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:5862533C-8506-454B-B78D-2BBD871F190B@.microsoft.com...
> Try putting each table into a rectangle.. Then show/hide the rectangle...
> I
> think that might get you where you wish to be...
> Have fun!
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Daniel Bello" wrote:
>> Hello:
>> I have a report with several tables, each of them "Inserts a page break
>> before" (so it renders on an individual page)
>> The visibility of one of these tables depends on the data and some
>> problems
>> are derived from this situation:
>> 1 -The table with the Hidden expression is not inserting the page break
>> no
>> matter if it is visible or not.
>> 2 -The space occupied by the definition of the table is always there, no
>> matter if the table is hidden.
>> I try putting all my tables in a main table and hide the row containing
>> the
>> conditional table. This solves the 2nd problem, but when you do this the
>> "Insert a page break before this table" property of the contained tables
>> are
>> ignored and everything renders on the same page.
>> What I would like is that when the table is visible, it "inserts a page
>> break before" and renders in another page, and when it is hidden, the
>> current page doesn't have an extra white space between its end and the
>> footer, and the next table renders on the next page.
>> Is there any way to do this?
>> Thanks.
>>
Hide value of Subtotal header?
I have 3 row groupings and one column grouping. The visibility of the
2nd two row groupings is toggled by the first. For each value in the
second grouping there is always only 1 in the third (like a first name
and a last name). Therefore, I need two subtotals, one for the first
row grouping, and one for the next two. I put the one for the 2nd and
3rd on the 2nd row grouping. When the first row group is hiding the
next two, the subtotal number appear correctly, but the word "Total" is
displayed with the numbers.
Example
The dataset returns
City, FirstName, LastName, ColumnName, Value
There is a rowgroup for each of the first three and a columngroup on
ColumnName.
The group visibility for FirstName and LastName is toggled by the city.
Column
NY Bob Smith 10
Jane Doe 20
Total 30
Here the total is for the 2nd rowgroup
When I toggle the City, it looks like this
Column
NY Total 30
But I don't want "Total" to be there. Is this Possible?
Thanks,
AbeIs there a way to know if your group visibility is set to hide the
header for the total row? Can you use InScope()? I've tried that a
few different ways and I haven't been able to come up with a solution.
Thanks,
Abe