xTuple.com xTupleU Blog & News Customer Support

2 page Purchase Order form

Hi, does anyone have a page-break purchase order report (or any other form) that they’d be willing to share. I’m trying to make a PO that prints like a normal PO but has a last page strictly for a Terms and Conditions of Purchase page. Nothing I’m doing with page breaks at end of last section and various headers/footers seems to be working.

Thanks in advance, DH

I don’t have an example sorry, but have done exactly this in the past. From memory, I either used the “Page Footer (Last)” or more likely a Section. Inside the Section editor you can see an option for “Insert Page Break At End of Last Section” which may help force the break where you need it.

The other obstacle is populating the text (and formatting the terms). I think there was a limit to the number of characters you can add to a label type, so I created a database table to hold the conditions of purchase text and used a data source and text element to populate the text.

It is really fiddly, but definitely possible.

My Sales Order Acknowledgment works exactly like Dave’s description. There is a page break that makes the terms and conditions go on a dedicated page at the end of the report. The report has a query source for the verbage that pulls from a table called termcond in my custom schema.

To make it more modular, each row in the table stores the text for an individual term or condition. There is a Category (like Sales or Purchase), and a term/condition description like (Warranty, Returns, Cancellations, etc…). The query source for the Sales Order Report is select * from termcond WHERE termcond_category = ‘SO’ The Report xml has a Group section that formats all of the applicable termconds. The group section was definitely the fiddly part for me.

I will post the Report xml and table SQL here later, I just need to export it and remove any sensitive info.

Thanks for the advice, Dave. I just don’t seem to be hitting on the right combination of page break and header/footer settings. I’ll keep fiddling. Your tip on populating the text will be very valuable.

The way I have made it is create a section, enable the page break before the section change and then add to the section a text field. That text field you can populate it from a text field from the database that holds the terms and conditions. That is the way I have done this in the past.

I attached my SalesOrderConfirmationWithConditions Report.
If you want it to work like mine, the sql attached will create and populate the termcond table.
Just do a search and replace on “btcustom.” and replace with the name of your custom schema (in both the sql and xml files)create_populate_termcond.txt (1.5 KB) SalesOrderConfirmationWithConditions.xml (37.6 KB)

Thank you, Matt! After first test I see that I can work from this. I really appreciate you sharing it. You’ve saved me hours of work.

Anderson,
Would it also be possible to just create a data source from an SQL statement like:

SELECT ‘This is the text I want, - - -blah blah blah’) into _my_variable;" then you wouldn’t even have to create a table. Just an off the cuff thought.

Jim

Jim,

Absolutely you could do that. I believe the only reason I did this in a database table was the text was shared across about 40-50 database instances so I needed a way to maintain and update the text.

Another approach would be to have a SELECT ‘text blah, blah’ in a metaSQL file. It’s probably much easier to maintain large amounts of text in the MetaSQL editor than in the small area you get in Report maintenance