Focal Point
[CASE OPENED] Free Form Layout in PDF questions

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3227073336

September 10, 2013, 04:49 PM
a415
[CASE OPENED] Free Form Layout in PDF questions
Hello,

It's my first time learning how to do a free form report with a PDF output. I used the following link to get myself started: http://documentation.informati...c259.htm#dfre1008719

My questions are:

1) How do I make my "NOTES" field wrap? Currently, it doesn't wrap and the text cuts off at the end of the page mid-sentence.

2) How do I make the next record go under the "*********" line? I want 3 on one page before the page break. For example, if I have 90 records, I want it to display 3 per page, so when I print, it prints 30 pages rather than 90 pages. I tried to remove "PAGE-BREAK" from the last BY line, but it only displays the first record and not the rest of the 89 records.

My code is as follows:
SET STYLE = OFF
SET PRINTPLUS = ON
SET STYLEMODE=FIXED
SET ONLINE-FMT = PDF 
SET NODATA = ''

TABLE FILE SQLOUT
BY ENTRY_DATE NOPRINT
HEADING
"<1><ADJNOTE"
"<1>POST DATE <ENTRY_DATE"
" "
"</1"
"<1><PLAQUE_AND_ID <40><DGYR"
"<1><PREF_LINE_1 <40><MANAGER"
"<1><PREF_LINE_2 <40>-------------------------------------"
"<1><PREF_LINE_3 <40><AMOUNT <MATCHING"
"<1><PREF_LINE_4 <40><DESG"
"<1><PREF_LINE_5"
"<1><PREF_LINE_6 <40><MOTIV"
"<1><COUNTRY <40>-------------------------------------"
"</1"
"<40>Pledge Amount: <42><PLAMOUNT"
"<1><TYPE <30><PA_EXPIRE <40>Paid to Date: <42><PAID"
"<1><FISCTOT <30><NEWCLUB <40>Balance: <42><BALANCE"
"<1><LASTFISCTOT <30><CURRCLUB <40><DURATION <FREQUENCY"
"<40><PHONE"
"<1><NOTES"
"</1"
"******************************************************************************"
BY PLAQUE_AND_ID NOPRINT PAGE-BREAK
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE SET STYLE *
$
ENDSTYLE
END

This message has been edited. Last edited by: a415,


8009
Windows 7
Excel/HTML/AHTML/PDF
September 10, 2013, 05:02 PM
Francis Mariani
I don't know if I'm being delirious but here's one way to take care of the page break:

Add the following right after the TABLE FILE command:
COMPUTE LINE_PER_PAGE/D10 = IF LINE_PER_PAGE LT 3 THEN LINE_PER_PAGE + 1 ELSE 1; NOPRINT
COMPUTE PAGE_COUNT/D10    = IF LINE_PER_PAGE EQ 1 THEN PAGE_COUNT    + 1 ELSE PAGE_COUNT; NOPRINT

Then add this after the first BY statement:
BY TOTAL PAGE_COUNT NOPRINT PAGE-BREAK

Something like this:
SET STYLE = OFF
SET PRINTPLUS = ON
SET STYLEMODE=FIXED
SET ONLINE-FMT = PDF 
SET NODATA = ''

TABLE FILE SQLOUT

COMPUTE LINE_PER_PAGE/D10 = IF LINE_PER_PAGE LT 3 THEN LINE_PER_PAGE + 1 ELSE 1; NOPRINT
COMPUTE PAGE_COUNT/D10 = IF LINE_PER_PAGE EQ 1 THEN PAGE_COUNT + 1 ELSE PAGE_COUNT; NOPRINT

BY ENTRY_DATE NOPRINT
BY PLAQUE_AND_ID NOPRINT

BY TOTAL PAGE_COUNT NOPRINT PAGE-BREAK

HEADING
"<1><ADJNOTE"
"<1>POST DATE <ENTRY_DATE"
" "
"</1"
"<1><PLAQUE_AND_ID <40><DGYR"
"<1><PREF_LINE_1 <40><MANAGER"
"<1><PREF_LINE_2 <40>-------------------------------------"
"<1><PREF_LINE_3 <40><AMOUNT <MATCHING"
"<1><PREF_LINE_4 <40><DESG"
"<1><PREF_LINE_5"
"<1><PREF_LINE_6 <40><MOTIV"
"<1><COUNTRY <40>-------------------------------------"
"</1"
"<40>Pledge Amount: <42><PLAMOUNT"
"<1><TYPE <30><PA_EXPIRE <40>Paid to Date: <42><PAID"
"<1><FISCTOT <30><NEWCLUB <40>Balance: <42><BALANCE"
"<1><LASTFISCTOT <30><CURRCLUB <40><DURATION <FREQUENCY"
"<40><PHONE"
"<1><NOTES"
"</1"
"******************************************************************************"
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE SET STYLE *
$
ENDSTYLE
END



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
September 10, 2013, 05:35 PM
a415
Hello Francis,

I gave that a try and I get the following error:
0 ERROR AT OR NEAR LINE    338  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC002) A WORD IS NOT RECOGNIZED: NOPRINT
 BYPASSING TO END OF COMMAND
 (FOC009) INCOMPLETE REQUEST STATEMENT


Line 338 is the first COMPUTE statement under TABLE FILE SQLOUT command when looking at the text view.


8009
Windows 7
Excel/HTML/AHTML/PDF
September 10, 2013, 08:57 PM
j.gross
Try inserting SUM before the first COMPUTE
September 11, 2013, 12:45 PM
a415
Hello j.gross,

When I add the SUM before the COMPUTE, it runs. BUT, it still shows 1 person per page and on each page it's the same person duplicated 26 times. When I remove the SUM and COMPUTE, it's 26 different people on separate pages.


8009
Windows 7
Excel/HTML/AHTML/PDF
September 11, 2013, 01:06 PM
Francis Mariani
Do you have

BY TOTAL PAGE_COUNT NOPRINT PAGE-BREAK

It's hard to provide code that's guaranteed to work with your data - try creating an example with an IBI sample file (CAR, EMPLOYEE, GGSALES, etc) so that we can run and reproduce the report...


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
September 12, 2013, 05:01 PM
a415
Hi Francis,

I did have BY TOTAL PAGE_COUNT NOPRINT PAGE-BREAK.

I created an example with an IBI Sample File using COURSE per your suggestion. However, I couldn't find anything with a column containing a paragraph as my NOTES section does to replicate the wrapping error. What I did in this case was add DESCRIPTN1 through DESCRIPTN3 on the same line and it's not wrapping like my NOTES field.

SET STYLE = OFF
SET PRINTPLUS = ON
SET STYLEMODE = FIXED
SET ONLINE-FMT = PDF 
SET NODATA = ''
   
TABLE FILE COURSE
-*SUM COMPUTE LINE_PER_PAGE/D10 = IF LINE_PER_PAGE LT 3 THEN LINE_PER_PAGE + 1 ELSE 1; NOPRINT
-*SUM COMPUTE PAGE_COUNT/D10    = IF LINE_PER_PAGE EQ 1 THEN PAGE_COUNT    + 1 ELSE PAGE_COUNT; NOPRINT
-*BY TOTAL PAGE_COUNT NOPRINT PAGE-BREAK
HEADING
" "
"<1>Course Code: <COURSECODE"
"<1>Course Title: <CTITLE"
"</2"
"<1>Source:  <SOURCE <45>Classification: <CLASSIF"
"<1>Tuition: $<TUITION <45>Duration: <DURATION"
"</1"
"<10><DESCRIPTN1 <DESCRIPTN2 <DESCRIPTN3"
"</2"
"***************"
-*BY COURSECODE NOPRINT 
BY COURSECODE NOPRINT PAGE-BREAK
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
END


I commented out the suggestions made with the COMPUTE and BY, since those did not fix the issue when I ran it.

Thanks again for looking into this!


8009
Windows 7
Excel/HTML/AHTML/PDF