Kent Searight Posted December 16, 2006 Posted December 16, 2006 Hi all, Does anyone know of a way to create page breaks in reports dynamically? Specifically, I'm trying to generate a multi-page report that's made of one, multi-page-spanning field, whose contents vary greatly in length. After calculating the page count, I'd like my script to set more data at the end of the text field and have it start at the top of what would be the next page. I'll have to repeat this for a third section. To help understand my goal, the text field is for compiling legal agreements by combining canned text with variable data that's entered via the GUI in another layout. Many of these agreements require schedules and exhibits accompanying them. They must be editable in their entirety before committing to the final version and I'd really like to set it up for one-stop editing on a single layout. I have everything working except for the placement of page breaks. I've tried to do it as a single sliding (up) text field and I've tried it as multiple sliding fields, one for each section of the contract. Any help would be greatly appreciated, as I've been pulling my hair out for days over this.
Genx Posted December 16, 2006 Posted December 16, 2006 The only way i could REALLLY think of doing this (though i don't really think much : ) is making a table specifically for this with two fields 1) Order (just a number field) 2) Content (text field). Use a specific character for page break, e.g. **Break** then just parse the individual sections into single records in that new table e.g. Set Variable[ $Pages ; Substitute( LegalText ; ["¶" ; "**Pilcrow**" ] ; [ "**Break**" ; "¶" ] ) ] Set Variable[ $i ; ValueCount($pages) ] Loop Exit Loop If[$i = 0] New Record / Request Set Field [yourOrderField ; $i] Set Field [yourTextField ; Substitute( GetValue( $pages ; $i) ; "**Pilcrow**" ; "¶" ) ] Set Variable[$i = $i - 1] End Loop Finally, just base your report on this table, make order your subsummary field that you summarize by and just put your content field in the body section specifying break after each section. Again... it SHOULD work, though someone will probably come along and suggest something brilliant...
Recommended Posts
This topic is 6812 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now