Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Rerort - invoice report per quarter & total per page

Status
Not open for further replies.

Florenze

Instructor
May 25, 2018
1
PH
Need some help please..

I'm using crystal report 2008 and creating an invoice report per quarter then limit each page by 5 invoice #. I put Invoice # in group footer to avoid duplicates.I'm trying running total & while printing formula but I didn't get the correct total per page for every next page it totals page 1 & page 2 amounts.


I have 2 problems
1. to show per quarter (ex. if invoice date of month is January (01) then amount will show in quarter 1 only)
2. To total amount per page.


I need to show the report like below


Page 1
Invoice # Month Quarter 1 Quarter 2 Quarter 3 Total
Invoice 1 01 100.00 - - 100.00
Invoice 2 12 - - 250.00 250.00
Invoice 3 06 - - 350.00 350.00
Invoice 4 05 - 600.00 - 600.00
Invoice 5 10 250.00 - - 250.00
---------------------------------------------------------
350.00 600.00 600.00 1,550.00



Page 2
Invoice # Month Quarter 1 Quarter 2 Quarter 3 Total
Invoice 6 01 300.00 - - 300.00
Invoice 7 12 - - 200.00 200.00
Invoice 8 06 - - 600.00 600.00
Invoice 9 05 - 800.00 - 800.00
Invoice 10 10 500.00 - - 500.00
---------------------------------------------------------
800.00 800.00 800.00 2,400.00
thank you in advance!
 
Create a formula like this:

Whileprintingrecords;
Numbervar cnt := cnt + 1;
Numbervar qtr1amt; //add additional qtr variables like this to this formula
If datepart(“q”,{table.invdate})=1 then //replace my iPad quote marks to prevent an error
Qtr1amt := qtr1amt + {table.amt};

Insert a Group footer_b section to display the results using individual formulas like this, one for each qtr:

Whileprintingrecords;
Numbervar qtr1amt;

Add a group footer_c section and place a reset formula in it:

Whileprintingrecords;
Numbervar cnt;
Numbervar qtr1amt;
Numbervar qtr2amt;
Numbervar qtr3amt;
Numbervar qtr4amt;
If cnt=5 then (
Qtr1amt := 0;
Qtr2amt := 0;
Qtr3amt := 0;
Qtr4amt := 0;
Cnt := 0
);

You can suppress the GF_c section. To suppress the group footer_b section, go into the section expert->suppress->x+2 and enter:

Whileprintingrecords;
Numbervar cnt;
Cnt<>5

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top