Showing posts with label subtotal. Show all posts
Showing posts with label subtotal. Show all posts

Sunday, February 26, 2012

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.

|||Try taking a look at Actions

Hiding Subtotal in Matrix

Hi,
I have one column group and 3 columns under it in a matrix. I added subtotal
to that column group and now all the 3 columns are summarized and shown. Now
I want to hide one column summary(The other 2 column summary should be
shown). How to do that?
TIA,
SamYou will need to control the Visibility of the textboxes that makeup the
column by using an expression similar to
=iif(InScope("MatrixColumnGroupName"), false, true).
The scope portion of the Inscope() can be the name of a DatasSet, Grouping,
or DataRegion.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Samuel" <samuel@.photoninfotech.com> wrote in message
news:ergsc6maEHA.2792@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have one column group and 3 columns under it in a matrix. I added
subtotal
> to that column group and now all the 3 columns are summarized and shown.
Now
> I want to hide one column summary(The other 2 column summary should be
> shown). How to do that?
> TIA,
> Sam
>|||There's no good way to do this in the current version.
But for a sleazy hack workaround, take a look at my reply on the thread from
yesterday titled "Matrix SubTotal"
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"Samuel" <samuel@.photoninfotech.com> wrote in message
news:ergsc6maEHA.2792@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have one column group and 3 columns under it in a matrix. I added
subtotal
> to that column group and now all the 3 columns are summarized and shown.
Now
> I want to hide one column summary(The other 2 column summary should be
> shown). How to do that?
> TIA,
> Sam
>|||Hi Chris and Bruce,
Thanks - It works
Samuel
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
news:%23TEUIwpaEHA.2812@.tk2msftngp13.phx.gbl...
> You will need to control the Visibility of the textboxes that makeup the
> column by using an expression similar to
> =iif(InScope("MatrixColumnGroupName"), false, true).
> The scope portion of the Inscope() can be the name of a DatasSet,
Grouping,
> or DataRegion.
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Samuel" <samuel@.photoninfotech.com> wrote in message
> news:ergsc6maEHA.2792@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I have one column group and 3 columns under it in a matrix. I added
> subtotal
> > to that column group and now all the 3 columns are summarized and shown.
> Now
> > I want to hide one column summary(The other 2 column summary should be
> > shown). How to do that?
> >
> > TIA,
> >
> > Sam
> >
> >
>

Hiding rows in a matrix and still showing subtotals for that row

Hi
I'm trying to tidy up a report that has a detail row that's not needed but
the subtotal row for that row is... hope that makes sense. The subtotal is
in fact is an average of the detail row. If I hide the detail row, the AVG
row also disappears! This is more or less what it looks like:
Machine Name | Cloth | Utilised Looms | 1 3 5 6
Available Looms | 6 4 7 6
Total Utilised Looms | 1 3 5 6
Available Looms | 6 4 7 6
What I'm trying to do is hide the second row...
Any ideas would be appreciated.
Many thanks
Rob
--
Message posted via http://www.sqlmonster.comIf you edit the properties of de detail-cel an set the visibility/hidden
property =TRUE it should work
"robhob via SQLMonster.com" wrote:
> Hi
> I'm trying to tidy up a report that has a detail row that's not needed but
> the subtotal row for that row is... hope that makes sense. The subtotal is
> in fact is an average of the detail row. If I hide the detail row, the AVG
> row also disappears! This is more or less what it looks like:
> Machine Name | Cloth | Utilised Looms | 1 3 5 6
> Available Looms | 6 4 7 6
> Total Utilised Looms | 1 3 5 6
> Available Looms | 6 4 7 6
> What I'm trying to do is hide the second row...
> Any ideas would be appreciated.
> Many thanks
> Rob
> --
> Message posted via http://www.sqlmonster.com
>

Friday, February 24, 2012

hiding link condtionally

hi all
i have a matrix report (rows&cols)and both are grouped
and the subtotal is displayed at the end of the
matrix,the problem is that i am making a jump link for
each data cell of the matrix and i dont want any links
for the totals cells(the ones on the edges of the matrix)
is there any expression to do this(hide links when the
cell is at totals(Hor,Ver)),please advize.Assuming the matrix column group has the name "ColumnGroup" and the matrix
row group has the name "RowGroup", you would use an expression like this on
the cell's hyperlink:
=iif(InScope("ColumnGroup") AND InScope("RowGroup"), "http:// some link",
Nothing)
A subtotal is not calculated in the scope of it's grouping, therefore
InScope will return false for subtotal cells for a certain grouping.
More information on the InScope function is available in BOL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_expressions_v1_0jmt.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"teko" <anonymous@.discussions.microsoft.com> wrote in message
news:0abc01c498cf$589e5440$a301280a@.phx.gbl...
> hi all
> i have a matrix report (rows&cols)and both are grouped
> and the subtotal is displayed at the end of the
> matrix,the problem is that i am making a jump link for
> each data cell of the matrix and i dont want any links
> for the totals cells(the ones on the edges of the matrix)
> is there any expression to do this(hide links when the
> cell is at totals(Hor,Ver)),please advize.
>|||>--Original Message--
>Assuming the matrix column group has the
name "ColumnGroup" and the matrix
>row group has the name "RowGroup", you would use an
expression like this on
>the cell's hyperlink:
>=iif(InScope("ColumnGroup") AND InScope
("RowGroup"), "http:// some link",
>Nothing)
>A subtotal is not calculated in the scope of it's
grouping, therefore
>InScope will return false for subtotal cells for a
certain grouping.
>More information on the InScope function is available in
BOL:
>http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/rscreate/htm/rcr_creating_expressions_v1_0jmt.asp
>--
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>"teko" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0abc01c498cf$589e5440$a301280a@.phx.gbl...
>> hi all
>> i have a matrix report (rows&cols)and both are grouped
>> and the subtotal is displayed at the end of the
>> matrix,the problem is that i am making a jump link for
>> each data cell of the matrix and i dont want any links
>> for the totals cells(the ones on the edges of the
matrix)
>> is there any expression to do this(hide links when the
>> cell is at totals(Hor,Ver)),please advize.
>
>.
>many thanks..it works

Sunday, February 19, 2012

Hide value of Subtotal header?

Hello,
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