RPT_BeforePageFooter

Discussion forum about all things Report Builder (all versions).
FRBhote
India
Posts: 2220
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

RPT_BeforePageFooter

Post by FRBhote » 01 Jun 2015, 13:40

In CTD 2.1 I am facing a problem that some times RPT_BeforePageFooter (or RPT_BeforePageHeader) is not getting fired on a page break. And conversely, sometime I am getting it twice on a page break.

ANy suggestions would be welcome.

Alternatively:

I want to make bills on several clients and each bill should start from page no 1. How can I do it? There is a break group on each client / bill.

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2385
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: RPT_BeforePageFooter

Post by Jeff Luther » 02 Jun 2015, 22:12

RPT_BeforePageFooter -- First of all to clarify: This constant is sent in TD as the lParam to the SAM_ReportNotify message. Not sure what you mean by "not getting fired" but that RPT_ lParam constant is available via SAM_ReportNotify. Since this msg. is being sent all the time for all the different RPT_* constant events, I would be sure to check your code to find out why you're losing it or getting a double hit.

CTD v2.1 is a long time ago and if all else fails write a small test case for your issue. If you can repro. it with a test appl. then it's much easier for us to diagnose and understand/solve the issue.

Your other msg. issue:
I want to make bills on several clients and each bill should start from page no 1. How can I do it? There is a break group on each client / bill.
Once again, I need to clarify: 'Page 1" is a 1-time event if you mean to include the Report Header part of the report -- assuming that has lines in it.
A Break Group only brackets the Detail Block; not the entire report. (That's why a Break Group surrounds the Detail Block).
...each bill should start from page no 1. How can I do it?
Depends on what you mean to include by 'page 1' but if you do *not* mean to include the Report Header block's lines, then this should be easy: Have 1 report for 1 client/bill and have a loop in the CTD appl. that runs through each client and reruns this single report. That is, 3 clients = 3 reports. That way you're guaranteed to run this 'page 1' for each client.

If you cannot do that (perhaps you have summary info. in the report for this group of clients?) then you'll need to look at what you want run specifically on your "page 1" and put those items within the Break Group instead, for example.
Jeff Luther @ PC Design
Palm Springs, California

FRBhote
India
Posts: 2220
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: RPT_BeforePageFooter

Post by FRBhote » 03 Jun 2015, 06:24

It's funny, but if the report has only one line - one Return TRUE for a bill - then it does not get a RPT_BeforePageFooter. Solved it by using a Boolean.

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2385
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: RPT_BeforePageFooter

Post by Jeff Luther » 03 Jun 2015, 23:31

Code: Select all

if the report has only one line - one Return TRUE for a bill - then it does not get a RPT_BeforePageFooter
AHA!! Well it seems logical, then, that there is no SAM_ReportNoify with lParam = page footer because there's a *Report* footer for that single page. (RB cannot print both Report & Page footers on the same page.) Just like there's a *Report* header for page 1 instead of a page header.

This assumes that there is something to print in the Report header/footer blocks. If there isn't for either or both, then the Page header and/or footer are printed.
Jeff Luther @ PC Design
Palm Springs, California

frevelundfey

Re: RPT_BeforePageFooter

Post by frevelundfey » 05 Jun 2015, 08:38

Hi Jeff,
interesting thing with ReportHeader/Footer vs. PageHeader/Footer.
I checked it with RepBi62.exe.

You are not right concerning the footers:
On a single page report there is a page footer also. Regardless if a report footer is shown or not - sample attached.
On multi page reports it's the same: The page footer is shown on every page and the report footer is shown like if it where the outermost break group.

Concerning the headers:
The page header is displayed when the report header is not shown (e.g. because it's empty).
The page header will not be displayed if you have some lines in the report header.
Unless you check "Use with Report Header" in the property page of the page header section.
Then both sections are shown: The page header followed by the report header.

Regards Thomas
You do not have the required permissions to view the files attached to this post.

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2385
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: RPT_BeforePageFooter

Post by Jeff Luther » 05 Jun 2015, 17:06

Well, I stand corrected, Thomas. Thanks for clarifying this.
Jeff Luther @ PC Design
Palm Springs, California

Return to “General Discussion Report Builder”

Who is online

Users browsing this forum: [Ccbot] and 0 guests