Showing posts with label header. Show all posts
Showing posts with label header. Show all posts

Friday, March 30, 2012

Hide Header and Footer when no data returned on report

Any suggestions on how to hide the header and footer information if there isn't any data returned on the report?

Hi Kimberly,

There may be a better suggestion, but this is what I came up with.

Place a textbox in the body of the report. Set the visibility of this textbox to hidden = true. Set the value of this textbox to the expression = countrows("datasetname"). For each item in the header and footer you would like to hide, add the following expression to the visibility - hidden property: =iif(reportitems!textbox.Value = "0",true,false).

This should hide all items when there are no records in the dataset.

Good luck,

Simone

|||You can use an expression to determine visibility. For example.

=IIF(Countrows("Scope") = 0, True, False)

HTH...

Joe|||This would generate an error when placed in the header or the footer. CountRows cannot be used in page headers or footers.|||Agreed. I didn't read the original posting as page header/footer. Perhaps I misunderstood.|||I may have misunderstood as well. I made the assumption that it was referencing the page header/footer. If this is not the case, then Joe's explanation is the way to go.|||Thank you Simone and Joe. I appreciate all of your help. Adding the text box and then referencing it to determine the visibility sounds like it should do the trick.

Hide Header and Footer when no data returned on report

Any suggestions on how to hide the header and footer information if there isn't any data returned on the report?

Hi Kimberly,

There may be a better suggestion, but this is what I came up with.

Place a textbox in the body of the report. Set the visibility of this textbox to hidden = true. Set the value of this textbox to the expression = countrows("datasetname"). For each item in the header and footer you would like to hide, add the following expression to the visibility - hidden property: =iif(reportitems!textbox.Value = "0",true,false).

This should hide all items when there are no records in the dataset.

Good luck,

Simone

|||You can use an expression to determine visibility. For example.

=IIF(Countrows("Scope") = 0, True, False)

HTH...

Joe|||This would generate an error when placed in the header or the footer. CountRows cannot be used in page headers or footers.|||Agreed. I didn't read the original posting as page header/footer. Perhaps I misunderstood.|||I may have misunderstood as well. I made the assumption that it was referencing the page header/footer. If this is not the case, then Joe's explanation is the way to go.|||Thank you Simone and Joe. I appreciate all of your help. Adding the text box and then referencing it to determine the visibility sounds like it should do the trick.

Hide Group Header Elements when Detail Visible

This seems like an easy request but I can't figure it out.
I have a table with multiple groups. Each group header contains subtotal
fields. I want to hide the contents of the subtotal fields on each group
header when that group is expanded but I want the field that contains the
name of the group to remain visible.
Thanks, JonI did this by adding an additional row to the group header.
Put the field that contains the name of the group on row 1 of your header,
and the subtotal field on row 2. Now you can select the field with the group
name to toggle Visibility on or off for both your Details and your Subtotal
field (or row). Leave the Subtotal field visible in the report definition
(Hidden=False), but hide the Details section.
Hth,
Flip
"Jon B" wrote:
> This seems like an easy request but I can't figure it out.
> I have a table with multiple groups. Each group header contains subtotal
> fields. I want to hide the contents of the subtotal fields on each group
> header when that group is expanded but I want the field that contains the
> name of the group to remain visible.
> Thanks, Jon

Wednesday, March 28, 2012

Hide Column Header in the Results

I have a stored procedure and I want to save the results in a file. I don't
want the column header to be in the file. I need to generate the file daily.
It has just one column. Example the results is showing:
Msg
{1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111XXX@.MYE@.-}
{2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111X@.MYE@.-}
I want the following results without the Header and extra line in the file.
How can I achive this. I have tried isql and isql/w but no success yet.
{1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111XXX@.MYE@.-}
{2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111X@.MYE@.-}
Use osql instead, with option -h -1.
Example:
C:\TEMP>osql -Spivotalr5 -E -Q"select top 5 orderid, orderdate from
northwind..o
rders" -h-1
AMB
"Fraz" wrote:

> I have a stored procedure and I want to save the results in a file. I don't
> want the column header to be in the file. I need to generate the file daily.
> It has just one column. Example the results is showing:
> Msg
> --
> {1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111XXX@.MYE@.-}
> {2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111X@.MYE@.-}
> I want the following results without the Header and extra line in the file.
> How can I achive this. I have tried isql and isql/w but no success yet.
> {1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111XXX@.MYE@.-}
> {2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D :111X@.MYE@.-}
>

Hide Column Header in the Results

I have a stored procedure and I want to save the results in a file. I don't
want the column header to be in the file. I need to generate the file daily.
It has just one column. Example the results is showing:
Msg
--
& #123;1:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111XXX@.MYE@.-}
& #123;2:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111X@.MYE@.-}
I want the following results without the Header and extra line in the file.
How can I achive this. I have tried isql and isql/w but no success yet.
& #123;1:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111XXX@.MYE@.-}
& #123;2:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111X@.MYE@.-}Use osql instead, with option -h -1.
Example:
C:\TEMP>osql -Spivotalr5 -E -Q"select top 5 orderid, orderdate from
northwind..o
rders" -h-1
AMB
"Fraz" wrote:

> I have a stored procedure and I want to save the results in a file. I don'
t
> want the column header to be in the file. I need to generate the file dail
y.
> It has just one column. Example the results is showing:
> Msg
> --
> & #123;1:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111XXX@.MYE@.-}
> & #123;2:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111X@.MYE@.-}
> I want the following results without the Header and extra line in the file
.
> How can I achive this. I have tried isql and isql/w but no success yet.
> & #123;1:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111XXX@.MYE@.-}
> & #123;2:@.:20:040705@.:21B:XXXX@.:33A:040705
XXX00000,@.:55D:111X@.MYE@.-}
>

Hide Column Header in the Results

I have a stored procedure and I want to save the results in a file. I don't
want the column header to be in the file. I need to generate the file daily.
It has just one column. Example the results is showing:
Msg
--
{1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111XXX@.MYE@.-}
{2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111X@.MYE@.-}
I want the following results without the Header and extra line in the file.
How can I achive this. I have tried isql and isql/w but no success yet.
{1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111XXX@.MYE@.-}
{2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111X@.MYE@.-}Use osql instead, with option -h -1.
Example:
C:\TEMP>osql -Spivotalr5 -E -Q"select top 5 orderid, orderdate from
northwind..o
rders" -h-1
AMB
"Fraz" wrote:
> I have a stored procedure and I want to save the results in a file. I don't
> want the column header to be in the file. I need to generate the file daily.
> It has just one column. Example the results is showing:
> Msg
> --
> {1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111XXX@.MYE@.-}
> {2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111X@.MYE@.-}
> I want the following results without the Header and extra line in the file.
> How can I achive this. I have tried isql and isql/w but no success yet.
> {1:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111XXX@.MYE@.-}
> {2:@.:20:040705@.:21B:XXXX@.:33A:040705XXX00000,@.:55D:111X@.MYE@.-}
>sql

Monday, March 26, 2012

Hide [+]/[-] toggle sign when group doesnot have any member

Hi,

I need help to hide [+]/[-] sign when a group doesnot have any item in it. Currently, I have a table with a group header where I put the companyName and in the detail section I put the users for that company. I want that, if a company doesnot have any users then there should not be any [+]/[-] sign next to it. Please help!!

Thanks,

-Rohit

Does any one know the answer to this one?

Thanks.

Hidden Values are not calculated in SSRS 2005?!

Hi,
I just created a Report in SSRS 2005 and wanted to use the "old" trick to
display data values in the header (reference body-elements from the header).
I know this worked fine in SSRS 2000, but in SSRS 2005 it seems, that they
have build in some "optimization" which doesn't render/calculate hidden
Fields anymore.
So, when I reference a Field that isn't hidden it works just fine - but as
soon as I hide the referenced field in the body it never gets a value, thus
the textbox in the header stays empty as well.
Initially I referenced Textboxes embedded in a table, but it neither works
for texboxes which are directly contained in the body-region. As soon as an
element is hidden it seems to be ignored by the rendering engine.
Any help would be appreciated.
Thanks,
FlorianA suitable workaround would be to set the font color to the same color as
the background color.
-Tim
"Florian" <Florian@.discussions.microsoft.com> wrote in message
news:AB31608E-EFF9-4D0B-865C-956519A96859@.microsoft.com...
> Hi,
> I just created a Report in SSRS 2005 and wanted to use the "old" trick to
> display data values in the header (reference body-elements from the
> header).
> I know this worked fine in SSRS 2000, but in SSRS 2005 it seems, that they
> have build in some "optimization" which doesn't render/calculate hidden
> Fields anymore.
> So, when I reference a Field that isn't hidden it works just fine - but as
> soon as I hide the referenced field in the body it never gets a value,
> thus
> the textbox in the header stays empty as well.
> Initially I referenced Textboxes embedded in a table, but it neither works
> for texboxes which are directly contained in the body-region. As soon as
> an
> element is hidden it seems to be ignored by the rendering engine.
> Any help would be appreciated.
> Thanks,
> Florian

Friday, March 23, 2012

hidden field populating header/footer trick not working

I'm a bit stumped at this. I have done this before a bunch of times. The difference is that this time I have two rectangles in the footer. For the each, the visibility is set to an expression which checks whether the page is page 1 or 2. If it is 1, the first rectangle is visible, if 2, the second. When I reference the hidden fields on the main area of the report via ReportItems, they come through fine on the first rectangle, but are invisible on the second. I've tried the same exact fields and every time they are visible in rectangle1, and invisible in rectangle2. What is going on here?
Well, just switched the conditional visibility so that rect1 would go on page 2 and rect2 on page one, and guess what? Now these fields on invisible on rect1 and visible on rect2! So it has to do with the page number! Wow, how weird! Anyone see this before and is there any workaround?
|||

Expressions in the page header/footer can only reference report items on the current page. One thing to check is whether the hidden textbox in the report body is repeated on both pages? If the textbox only appears on the first page, expressions in the header/footer for the second page would always get a null value for this textbox.

sql

hidden field populating header/footer trick not working

I'm a bit stumped at this. I have done this before a bunch of times. The difference is that this time I have two rectangles in the footer. For the each, the visibility is set to an expression which checks whether the page is page 1 or 2. If it is 1, the first rectangle is visible, if 2, the second. When I reference the hidden fields on the main area of the report via ReportItems, they come through fine on the first rectangle, but are invisible on the second. I've tried the same exact fields and every time they are visible in rectangle1, and invisible in rectangle2. What is going on here?
Well, just switched the conditional visibility so that rect1 would go on page 2 and rect2 on page one, and guess what? Now these fields on invisible on rect1 and visible on rect2! So it has to do with the page number! Wow, how weird! Anyone see this before and is there any workaround?
|||

Expressions in the page header/footer can only reference report items on the current page. One thing to check is whether the hidden textbox in the report body is repeated on both pages? If the textbox only appears on the first page, expressions in the header/footer for the second page would always get a null value for this textbox.

Hidden Expression for Group Header

I am trying to hide a group header (table row) based on the value of that group, but have not been able to get it working.

Let's say I have 2 groups in my table:

Group 1: State

Group 2: City

I want to hide the group header (tablerow2) where State = "Unknown" but I want the Group 2 cities to still display - just w/o a header.

I tried putting the following expressions on the hidden property of tablerow2 with no luck:

First I tried referencing the field that it's grouped on:

=Iif((Fields!state.Value = "Unknown", true, false)

I also tried refereing the name of the group:

=Iif(("State_GRP" = "Unknown"), true, false)

In both cases, nothing gets hidden - all rows, including the group header that says "Unknown", are visible.

Any help would be greatly appreciated!

Kathleen

You are doing this correctly, and I was not able to reporduce the behavior--it works as you are thinking. I would make sure that the case of "Unknown" is consistent with the field value. I would do this in the expression (or change the query to do the trimming), so that case and extranious white space is not a factor.

=IIF(Fields!state.Value.Trim().ToLower()="unknown", true, false)

Ian

|||Thanks Ian - the trim/tolower seemed to resolve whatever issue I was having.