March 15, 2008, 11:55 AM
Cati - FrancePDF WITH ACROSS ON 2 PAGES DOESN'T REPEAT SORT VALUE
Hello,
I have a pdf report with a across value = 12 months + row total.
On the first page, I can print from january to june and data for july to december are printed on the second page.
I want to repeat the sort values on the second page but It doesn't work.
How can I do that ?
Thanks for help.
Catherine
March 15, 2008, 12:52 PM
FrankDutchI'm not sure if there is a SET command to this, but what I should do is split the year into two half year's and use that as a by field.
DEFINE FILE XXX
HYEAR/I2=IF MONTH LE 6 THEN 1 ELSE 2;
(supposed the month is a number from 1-12)
END
TABLE FILE XXX
SUM SALES
BY HYEAR NOPRINT PAGE-BREAK
BY PRODTYPE
ACROSS MONTH
END
Or something like this...
It's maybe not exactly what you want, if you have in the first half year not all the products you can have less lines than in the second half year.
If you need a row-total, the result is also not what you want.
The other solution might be defining all months as unique fields
DEFINE FILE XXX
JAN/D12=IF MONTH EQ 1 THEN SALES ELSE 0;
FEB/D12=IF MONTH EQ 2 THEN SALES ELSE 0;
...
DEC/D12=IF MONTH EQ 12 THEN SALES ELSE 0;
(supposed the month is a number from 1-12)
END
TABLE FILE XXX
SUM JAN FEB MAR ...JUN PRODTYPE JUL ...DEC
BY PRODTYPE
END
Now you get the prodtype on the left and in the middle.
You have to play with the column with to get the second half of the year on an other page.
There must be a smarter solution.
March 16, 2008, 04:25 AM
Cati - FranceThanks Frank, I vill try.
March 17, 2008, 08:31 AM
mgrackinCati,
Look at the BYPANEL setting in the Developing Reporting Applications manual. This might be what you are looking for.
March 17, 2008, 08:34 AM
mgrackinCati,
Run the following code for an example:
TABLE FILE EMPLOYEE
SUM SALARY ACROSS HIRE_DATE
BY DEPARTMENT
ON TABLE SET BYPANEL ON
ON TABLE PCHOLD FORMAT PDF
END