显示标签为“footer”的博文。显示所有博文
显示标签为“footer”的博文。显示所有博文

2012年3月20日星期二

Any way to make a "Page Footer Only For The First Page"

I am unclear if SSRS can handle this. We are using SSRS 2005 for a variety of things for a billing system; one of them being actual bill generation. The bills are generally one page long, but in rare exceptions can be multiplie pages. They end up being printed onto perforated paper at around the 8 inch mark, and we basically want to put a page footer there that is the "bill stub"... a section that summarizes the bill that they rip off and return with payment.

So, I guess the general problem is that I have a want to put a section of content at a specific place at the bottom of one and only one page (the first page would be preferrable, but the last page is also acceptable), in the middle of a report that has a table of bill line items of an indeterminate height.

I went down paths of looking at PageFooter, since it is generally the idea I am after, but I can't find a way to only show it on one page... on a 4 page bill, it always wants to print on page 2 AND 3 no matter what I do.

Thanks for any help that you can provide.

Michael

The only option supported is to print the footer on first or last page of the report (PrintOnFirstPage and PrintOnLastPage property respectively of the page footer band). Please note that currently RS (2000 and 2005) doesn't allow you to reclaim the space occupied in subsequent pages if the header/footer is not printed.|||

Just pinging this thread to see if anyone has a good workaround for this type of issue. I'm trying to use SSRS 2005 for creating invoices (currently using Crystal Reports). I have specific text (also includes data from the dataset) that has to be on a specific section of the LAST page of the invoice (can be 1 or multiple pages). This is done in Crystal by creating a second PAGE FOOTER that's suppressed on every page except the last one. This issues (along with not being to keep table groups together) are causing so much difficulty in creating reports. It's hard to believe this product is missing so many basic functions. Typical MSFT in throwing something out there that gets you 80-90% of what you need. Do they even try real world situations like the basic necessity of having an invoice, bill, etc.

|||

I don't think there is any way to suppress the whole Page Footer section. What you can try doing is giving a conditional visibility expression for the textbox that you have in your Page Footer.

For example if you want the text to shown only on the 1st page then the expression =IIf(Globals!PageNumber=1,false,true)

and if you want it only on the last page then =IIf(Globals!PageNumber=Globals!TotalPages,false,true) can be used.

Hope it helps,

Aayush

|||

I've already gone the expression route. I have a rectangle with a bunch of text boxes in it. I hide the rectangle on everypage but the last (IIf(Globals!PageNumber=Globals!TotalPages,false,true) ).

That works when displaying in the browser. However, when printing or exporting to pdf the "white space" where the rectangle is shows up on every page. I need it suppressed. This is an invoice so not being able to print it or export it to pdf to be emailed is pointless.

|||

Hi,

I tried to copy and paste the condition for only displaying on last page IIf(Globals!PageNumber=Globals!TotalPages,false,true) but it doesn't seem to be working and I am getting an error ") is missing" and it highlights "Globals" (first one).

Am I doing something wrong? Please advice. Thanks for your help

Nabil

|||Looks correct to me. Sounds silly but I hope your expression starts with the '=' symbol, that is, =IIf(Globals!PageNumber=Globals!TotalPages,false,true)

Any way to make a "Page Footer Only For The First Page"

I am unclear if SSRS can handle this. We are using SSRS 2005 for a variety of things for a billing system; one of them being actual bill generation. The bills are generally one page long, but in rare exceptions can be multiplie pages. They end up being printed onto perforated paper at around the 8 inch mark, and we basically want to put a page footer there that is the "bill stub"... a section that summarizes the bill that they rip off and return with payment.

So, I guess the general problem is that I have a want to put a section of content at a specific place at the bottom of one and only one page (the first page would be preferrable, but the last page is also acceptable), in the middle of a report that has a table of bill line items of an indeterminate height.

I went down paths of looking at PageFooter, since it is generally the idea I am after, but I can't find a way to only show it on one page... on a 4 page bill, it always wants to print on page 2 AND 3 no matter what I do.

Thanks for any help that you can provide.

Michael

The only option supported is to print the footer on first or last page of the report (PrintOnFirstPage and PrintOnLastPage property respectively of the page footer band). Please note that currently RS (2000 and 2005) doesn't allow you to reclaim the space occupied in subsequent pages if the header/footer is not printed.|||

Just pinging this thread to see if anyone has a good workaround for this type of issue. I'm trying to use SSRS 2005 for creating invoices (currently using Crystal Reports). I have specific text (also includes data from the dataset) that has to be on a specific section of the LAST page of the invoice (can be 1 or multiple pages). This is done in Crystal by creating a second PAGE FOOTER that's suppressed on every page except the last one. This issues (along with not being to keep table groups together) are causing so much difficulty in creating reports. It's hard to believe this product is missing so many basic functions. Typical MSFT in throwing something out there that gets you 80-90% of what you need. Do they even try real world situations like the basic necessity of having an invoice, bill, etc.

|||

I don't think there is any way to suppress the whole Page Footer section. What you can try doing is giving a conditional visibility expression for the textbox that you have in your Page Footer.

For example if you want the text to shown only on the 1st page then the expression =IIf(Globals!PageNumber=1,false,true)

and if you want it only on the last page then =IIf(Globals!PageNumber=Globals!TotalPages,false,true) can be used.

Hope it helps,

Aayush

|||

I've already gone the expression route. I have a rectangle with a bunch of text boxes in it. I hide the rectangle on everypage but the last (IIf(Globals!PageNumber=Globals!TotalPages,false,true) ).

That works when displaying in the browser. However, when printing or exporting to pdf the "white space" where the rectangle is shows up on every page. I need it suppressed. This is an invoice so not being able to print it or export it to pdf to be emailed is pointless.

|||

Hi,

I tried to copy and paste the condition for only displaying on last page IIf(Globals!PageNumber=Globals!TotalPages,false,true) but it doesn't seem to be working and I am getting an error ") is missing" and it highlights "Globals" (first one).

Am I doing something wrong? Please advice. Thanks for your help

Nabil

|||Looks correct to me. Sounds silly but I hope your expression starts with the '=' symbol, that is, =IIf(Globals!PageNumber=Globals!TotalPages,false,true)

2012年3月11日星期日

Any true public variables for custom code section?

I have been searching the newsgroup for showing the group sum in the
footer section. This isn't the same as a normal group sum as the
amount shown in the textbox is using the value straight out of the
dataset - =Fields!Amt.Value, instead of =SUM(Fields!Amt.Value). I then
wanted to show the sum of the group amounts in the footer.
I thought I had found a solution by calling a function to store the
sum and then show the total by calling the same function with a
parameter to return the accumulated amount. Unfortunately I hit
another brick wall with this approach because even though I declared a
public variable outside the function (also tried a static within the
function), the accumulated amount only remains within the scope of
the group calling the function. When the footer section calls the same
function the accumulator is 0 instead of the accumulated amount for
the group.
My question, how do you declare and access a true public variable?
Here's an example of what is happening:
The group amount only needs to be displayed within the group, but
summed at the end of the report
Report
--
Group1 (grouped by MbGUID)
Textbox = AddGroupTotal("A", Fields!SizeTtl.Value)
Footer
Textbox = AddGroupTotal("T", 0) ' Note the "0" is just a
placeholder
Dataset columns
--
MbGUID,SizeTtl,Year,Month,Week,MaxSize
Data
--
1,120,2006,1,2,80
1,120,2006,1,3,90
1,120,2006,1,4,92
2,130,2006,1,3,87
2,130,2005,1,4,120
The output with the custom code
--
MbGuid Total
1 120
2 130
Report Total: 0
Obviously the Report Total should show 250 instead of 0.
Custom Code Section
--
Public ttl As Double = 0
Public Function AddGroupTotal(pMode As String, pNbr As Long) As Long
'Static Ttl AS Long
If pMode = "A" Then
If Ttl = Nothing Then
Ttl = 0
End If
Ttl = Ttl + pNbr
' Runtime error stating parameter is read only for the below
statement
'Report.Parameters!pSizeTtl = pNbr
AddGroupTotal = pNbr
ElseIf pMode = "T" Then
AddGroupTotal = Ttl
End If
End Function
MarkI'm also having the same problem.
I'm attempting to build a public array in the details section of a table and
then perform calculations against that, now filled array in the group footer.
The problem is that when I call my custom AddToArray code in the details
section and then return the ubound value of the array, it works fine in the
details section but when it gets to the footer the array is empty again.
Anyone have any suggestions?
"Mark" wrote:
> I have been searching the newsgroup for showing the group sum in the
> footer section. This isn't the same as a normal group sum as the
> amount shown in the textbox is using the value straight out of the
> dataset - =Fields!Amt.Value, instead of =SUM(Fields!Amt.Value). I then
> wanted to show the sum of the group amounts in the footer.
> I thought I had found a solution by calling a function to store the
> sum and then show the total by calling the same function with a
> parameter to return the accumulated amount. Unfortunately I hit
> another brick wall with this approach because even though I declared a
> public variable outside the function (also tried a static within the
> function), the accumulated amount only remains within the scope of
> the group calling the function. When the footer section calls the same
> function the accumulator is 0 instead of the accumulated amount for
> the group.
> My question, how do you declare and access a true public variable?
> Here's an example of what is happening:
> The group amount only needs to be displayed within the group, but
> summed at the end of the report
> Report
> --
> Group1 (grouped by MbGUID)
> Textbox = AddGroupTotal("A", Fields!SizeTtl.Value)
> Footer
> Textbox = AddGroupTotal("T", 0) ' Note the "0" is just a
> placeholder
> Dataset columns
> --
> MbGUID,SizeTtl,Year,Month,Week,MaxSize
> Data
> --
> 1,120,2006,1,2,80
> 1,120,2006,1,3,90
> 1,120,2006,1,4,92
> 2,130,2006,1,3,87
> 2,130,2005,1,4,120
> The output with the custom code
> --
> MbGuid Total
> 1 120
> 2 130
> Report Total: 0
> Obviously the Report Total should show 250 instead of 0.
>
> Custom Code Section
> --
> Public ttl As Double = 0
> Public Function AddGroupTotal(pMode As String, pNbr As Long) As Long
> 'Static Ttl AS Long
> If pMode = "A" Then
> If Ttl = Nothing Then
> Ttl = 0
> End If
> Ttl = Ttl + pNbr
> ' Runtime error stating parameter is read only for the below
> statement
> 'Report.Parameters!pSizeTtl = pNbr
> AddGroupTotal = pNbr
> ElseIf pMode = "T" Then
> AddGroupTotal = Ttl
> End If
> End Function
> Mark
>