• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFReport Manually forcing a page break

Guest
Sep 13, 2007 Sep 13, 2007

Copy link to clipboard

Copied

Hi All,

I've an issue with my Coldfusion Report templates (.cfr) in where i have to put page breaks. I've read some posts all of them says its quite impossible to accomplish. If anybody can help me on this that would be greatful.

Thanks.

Views

738

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 12, 2008 Dec 12, 2008

Copy link to clipboard

Copied

Well, technically CFReport in CFMX 7 didn't support page breaks. But I did this in my CFMX 7 days logically. Follow these steps:
1. Create a group in report for the field whose value changes on every record. i.e. the record primary key or query.currentrow etc.
2. Configure the group to start new page for each group. This will print each record on separate page.
3. Now, if you need two pages for each record, you paste the contents of 1st page in group header and 2nd page in group footer. Also, adjust page header height so that it would occupy the whole page.
4. If you need three pages for each record, paste the contents of 1st page in group header, 2nd page in detail and 3rd page in group footer.

Hope this will help. (Although your post is old, it may help someone else) 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 01, 2011 Feb 01, 2011

Copy link to clipboard

Copied

LATEST

asimrafi, Thanks for this insightful post!

I have CF 7.02 and could not get the Page-Break (Red-Dotted line) to work in the Report Builder..

Finally came across your idea & it worked perfectly..

  • I created the following SQl for my main report to get the needed Groups:
  • Then, I just created 6 groups and told each to start a new Page
  • Lastly, I placed my 6 subreports in each group Header, using the following settings:
  • Position Type = Fixed
  • SELECT    tblSalesReport.srID
      , SUM(IF(tblSalesCatg.scDesc <> "XXX", 1,0)) AS `Group1`
      , SUM(IF(tblSalesCatg.scDesc <> "XXX", 1,0)) AS `Group2`
      , SUM(IF(tblSalesCatg.scDesc <> "XXX", 1,0)) AS `Group3`
      , SUM(IF(tblSalesCatg.scDesc <> "XXX", 1,0)) AS `Group4`
      , SUM(IF(tblSalesCatg.scDesc <> "XXX", 1,0)) AS `Group5`
      , SUM(IF(tblSalesCatg.scDesc <> "XXX", 1,0)) AS `Group6`
  • FROM      tblSalesReport, tblSalesCatg
    WHERE     tblSalesCatg.scID = tblSalesReport.srSalesCatg
    GROUP BY  tblSalesReport.srSalesCatg
    ORDER BY  tblSalesCatg.scID LIMIT 1

Thanks again,

jlig

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation