This topic is locked

Page break after each group in reports

9/7/2007 9:21:44 AM
PHPRunner General questions
D
darkmage0 author

Hello, I was wondering if it was possible to set the print whole report page to break after each group. Im using phprunner 4.1(303) AND I am grouping by employee id and date. my select statement is set to only show records that match this week number "WHERE WEEK(`time card`.`Date`,7) = WEEK(CURRENT_DATE,7)"
So what i need is the print whole report page too do is page break after each employee id like this.

oh and there can be multiple records for each day so i cant just limit the number of records per page to seven sadly.
//page 1

employee id - 0001

monday total hrs worked

day sub total

tuesday total hrs worked

day sub total

wensday total hrs worked

day sub total

thursday total hrs worked

day sub total

friday total hrs worked

day sub total

saterday total hrs worked

day sub total

sunday total hrs worked
week sub total
page break
//page 2

employee id - 0002

monday total hrs worked

day sub total

tuesday total hrs worked

day sub total

wensday total hrs worked

day sub total

thursday total hrs worked

day sub total

friday total hrs worked

day sub total

saterday total hrs worked

day sub total

sunday total hrs worked
week sub total

page break
//page 3

employee id - 0003

monday total hrs worked

day sub total

tuesday total hrs worked

day sub total

wensday total hrs worked

day sub total

thursday total hrs worked

day sub total

friday total hrs worked

day sub total

saterday total hrs worked

day sub total

sunday total hrs worked
week sub total
thank you for any help or idea's any one might have to come up with a solution to this.
thank you Travis Wilson

Sergey Kornilov admin 9/8/2007

You can switch to HTML mode in Visual Editor and insert the following code snippet where you like to have a page break:

<p style="page-break-after: always"></p>
D
darkmage0 author 9/11/2007

Hello
So I tried to use this code <p style="page-break-after: always"></p> to instert a page break after each group, But It still splits the groups over multiple pages.

how do i make it so instead of 30 lines per page its 1 group per page for the print whole report. the page break code works fine it is the lines per page that is messing it up. I need one employee id per page or at leat every new employee id group too start on a fresh page , right now I get group 1 plus one record off of group 2 per page. I copied the print whole report page below to show you what is happening right now.
this is the first page on the print whole report.

[codebox] Time Card Report
Date: 9/3/2007

First Name Last Name Project ID Job Code Startup Time Shutdown Time Time Total ADMIN/PM Hrs Worked Description Record Modified Date Record Modified Fix Time Fix Time Description Admin Check Admin Check ID PM Check PM Check ID

Monday, September 03, 2007 Admin Admin CWCTC ADMIN 10:00:00 AM 6:00:00 PM 8.00

Summary for Date 9/3/2007 - 1 records total

Sum 8.00 0.00 8

Date: 9/4/2007

First Name Last Name Project ID Job Code Startup Time Shutdown Time Time Total ADMIN/PM Hrs Worked Description Record Modified Date Record Modified Fix Time Fix Time Description Admin Check Admin Check ID PM Check PM Check ID

Tuesday, September 04, 2007 Admin Admin 06KIE03 ADMIN 10:00:00 AM 6:00:00 PM 8.00

Summary for Date 9/4/2007 - 1 records total

Sum 8.00 0.00 8

Date: 9/5/2007

First Name Last Name Project ID Job Code Startup Time Shutdown Time Time Total ADMIN/PM Hrs Worked Description Record Modified Date Record Modified Fix Time Fix Time Description Admin Check Admin Check ID PM Check PM Check ID

Wednesday, September 05, 2007 Admin Admin 06KIE03 ADMIN 10:00:00 AM 6:00:00 PM 8.00

Summary for Date 9/5/2007 - 1 records total

Sum 8.00 0.00 8

Date: 9/6/2007

First Name Last Name Project ID Job Code Startup Time Shutdown Time Time Total ADMIN/PM Hrs Worked Description Record Modified Date Record Modified Fix Time Fix Time Description Admin Check Admin Check ID PM Check PM Check ID

Thursday, September 06, 2007 Admin Admin 06KIE03 ADMIN 10:00:00 AM 6:00:00 PM 8.00

Summary for Date 9/6/2007 - 1 records total

Sum 8.00 0.00 8

Date: 9/7/2007

First Name Last Name Project ID Job Code Startup Time Shutdown Time Time Total ADMIN/PM Hrs Worked Description Record Modified Date Record Modified Fix Time Fix Time Description Admin Check Admin Check ID PM Check PM Check ID

Friday, September 07, 2007 Admin Admin 06KIE03 ADMIN 10:00:00 AM 6:00:00 PM 8.00

Summary for Date 9/7/2007 - 1 records total

Sum 8.00 0.00 8

Summary for Employee ID 1010 - 5 records total

Sum 40.00 0.00 40

[color=#FF0000]Employee ID: 1012

Date: 9/3/2007

First Name Last Name Project ID Job Code Startup Time Shutdown Time Time Total ADMIN/PM Hrs Worked Description Record Modified Date Record Modified Fix Time Fix Time Description Admin Check Admin Check ID PM Check PM Check ID

Monday, September 03, 2007 User User 6BAY01 ADMIN 10:00:00 AM 6:00:00 PM 8.00 9/7/2007

Summary for Date 9/3/2007 - 1 records total

Sum 8.00 0.00 8 [/codebox]
Thank you for any help.
Travis Wilson

D
darkmage0 author 9/12/2007

Hello
I posted my program to the demo account to show you better what im dealing with.
http://demo.asprunner.net/darkmage0%5Fhotm...port_report.php
Thank you
Travs Wilson

Alexey admin 9/13/2007

Travs,
try to do the following.

Set the Number of lines per pageon Report:Miscellaneoustab to 1000
Build the pages

Open generated time_card_Report_print.php file with a text editor.

Find this snippet there:

if(!$start && $newgroup_Employee_ID)

{

and insert this line just after:

$rowcount=1001;