Topic Options
#56101 - 07/09/18 09:24 AM Database input PDF output
jwbf Offline
OL Toddler

Registered: 09/14/11
Posts: 41
I am trying to retrieve the data from a database query and format the output in PDF.
The number of records returned from the query varies. And there are three main parts expected in the PDF: the header, the commodities and the additional information.
The header is always the first 9 columns from the record set and it only needs to display once.
The number of commodities varies based on the number of rows returned.
The number of additional information also varies depending on whether the 'additional information' column is Null or not.

The output file emulation to CSV, Fixed length columns or XML in PlanetPress Database plugin works fine. But I am struggling with outputting/formatting to PDF from CSV, fixed length columns or XML.

I'd appreciate if anyone would give an idea on the process after the Database plugin.

Top
#56102 - 07/09/18 10:44 AM Re: Database input PDF output [Re: jwbf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 298
Loc: Québec, Canada
I would suggest you use the fixed length field format as you need the first 9 columns for the header and the rest for the commodities and additional information.

You could then use overflow to display the middle and footer part.

Top
#56106 - 07/10/18 12:02 PM Re: Database input PDF output [Re: jwbf]
jwbf Offline
OL Toddler

Registered: 09/14/11
Posts: 41
Thank you!
For the header, a condition =&current.overflowcount=0 is added to the text box because it only needs to display once on the top of the first page.
A text box for the commodities is placed under the header on the first page which is positioned in the second half of the page. The problem now is that the subsequent commodities show up in the second half of the succeeding pages. The top part of the succeeding pages are blank.
What should be done to have the commodities displayed on the succeeding pages without the blank on the top part?

Thanks,

Top
#56107 - 07/10/18 12:14 PM Re: Database input PDF output [Re: jwbf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 298
Loc: Québec, Canada
Why do you overflow the header?

Top
#56108 - 07/10/18 12:36 PM Re: Database input PDF output [Re: jwbf]
jwbf Offline
OL Toddler

Registered: 09/14/11
Posts: 41
The header only needs to be on the first page.
I changed the condition to =&current.printpage=1 for the header. But the top part of the succeeding pages are blank.

Top
#56109 - 07/10/18 12:41 PM Re: Database input PDF output [Re: jwbf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 298
Loc: Québec, Canada
Then you should use the snapping points of the box of the header and the box of the commodities. This way, if the header is not there, the commodities will move up on your page.

Top
#56112 - 07/11/18 03:34 PM Re: Database input PDF output [Re: jwbf]
jwbf Offline
OL Toddler

Registered: 09/14/11
Posts: 41
That works for the commodities. Thank you!

I have another problem though:
The additional information text box is added on Page 2 in Design pages.
And now in preview the first page has the header on top and the first commodity on the bottom. The second page is the additional information(not the commodity). And the third page has the 2nd and 3rd commodities on top and the bottom.

I did the snapping points for the box of the commodities and that of the additional information. But what should I do to have the additional information on the last page?

Top
#56113 - 07/11/18 03:40 PM Re: Database input PDF output [Re: jwbf]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 298
Loc: Québec, Canada
At this point, I suggest you open a technical support call at 1-866-348-5863 or through our website.

Top
#56114 - 07/11/18 03:47 PM Re: Database input PDF output [Re: Jean-Cédric]
jwbf Offline
OL Toddler

Registered: 09/14/11
Posts: 41
Ok. Thanks!

Top