First, when you post some code, please use the button > and place the code between the tags.
If I understand, you want to insert some text and data when a sort field changes value. Did you try using:
ON CHANG_VAL PAGE-BREAK AND SUBHEAD
"bla bla bla "
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
October 27, 2009, 09:25 AM
JACQUETL
Oh ok i'm sorry for the code inside message,thanks.
I will test this code :
DEFINE FILE CAR
CHANG_VAL/A50 = COUNTRY | ' ' | MODEL;
END
TABLE FILE CAR
SUM SEATS
BY CHANG_VAL
BY COUNTRY
ON CHANG_VAL PAGE-BREAK
ON COUNTRY PAGE-BREAK AND SUBHEAD
"bla bla bla <COUNTRY"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
HEADING
"Détail page </1"
END
But, i want to break another page on country. Page break don't Work ? One page for each country (cover page) and inside on page for each chang_val.
The PDF Layout Painter in Developer Studio might be able to generate what you need.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 27, 2009, 09:37 AM
GinnyJakes
Francis is correct. Note that to do this in PDF Painter, the two reports must be 'coordinated'. That would be your keyword to search the documentation. You would actually have two focexecs, one for the COUNTRY page sorted by COUNTRY and the other for the combo but also with the high-order sort of COUNTRY.
TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
-SET &XLINES = &LINES;
-SET &CNTR = 0;
-SET &PREC_CNTR = 1;
-REPEAT LOOP_CNTRY &XLINES TIMES
-SET &CNTR = &CNTR + 1;
-SET &OPEN_CLOSE = IF &CNTR EQ 1 THEN 'OPEN' ELSE
- IF &CNTR EQ &XLINES THEN 'CLOSE' ELSE ' ';
-READ HOLD1 &CNTRY1.A8.
-********************************************
-*
TABLE FILE CAR
PRINT MODEL NOPRINT
HEADING
"PDF COVER PAGE"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT PDF &OPEN_CLOSE
END
-*
DEFINE FILE CAR
CHAMP/A50 = COUNTRY || MODEL;
END
TABLE FILE CAR
PRINT MODEL
WHERE COUNTRY EQ '&CNTRY1';
BY CHAMP PAGE-BREAK
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT PDF &OPEN_CLOSE
END
-SET &PREC_CNTR = &CNTR;
-LOOP_CNTRY
That is definitely a good way to do it. I'm happy that you found a simple solution.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 29, 2009, 12:59 PM
GinnyJakes
I am happy that you have a solution. But this would be a greato opportunity to learn a new tool. You were probably in a hurry and didn't have time, but you've got a great example to play with once you do have time. Give it a go! I think you'll like it.