Jump to content

Printing portal data across mult pages?


YukonJay

This topic is 7809 days old. Please don't post here. Open a new topic instead.

Recommended Posts

With some good advice from this board I finally got my purchase order database up and running *correctly* by using a portal for the line item data. Now my problem is getting it to print multiple pages of the PO if the number of line items exceeds the # rows visible for each page? In other words, I set up a template for the printed PO, with a Header (customer info), a Body (portal to the line item DB), and a Trailing Grand Summary (to calculate a total cost for the line items). I set the portal to show 13 rows, and regardless of the number of items I enter in the entry screen, the printed PO will only print a max of 13 rows. How can I get it to print on a second (or third or fourth) page once it reaches the 14th line item? I also need it to print the Header and Trailing Grand Summary info on each page. Thanks!

Link to comment
Share on other sites

You can exhibit the most control over your layout if you set up a script to find your line items and print from the line items database. There will be no limit to the number of pages. Simply relate back to invoices for the header and footer, then the line items will list in the body.

Alternatively, you could simply add more rows to the portal such that it extends off the body (and therefore onto the body of the second page... but you will have trouble aligning it correctly, and you will probably need separate layouts for 1, 2, 3, etc pages otherwise it will print the extra blank pages when you don't need them.

Link to comment
Share on other sites

<<You can exhibit the most control over your layout if you set up a script to find your line items and print from the line items database. There will be no limit to the number of pages. Simply relate back to invoices for the header and footer, then the line items will list in the body.>>

I think I'm understanding what you're suggesting, but I don't see how that would solve the problem. What difference would it make to print from the Line Item database, when the layout will essentially be the same from the Line Item DB as it already is in the Purchase Order DB?

Link to comment
Share on other sites

The difference is that you won't have to do anything special for it to work with multiple pages. Think about when you print in list view, if there are more records than fit on one page, it prints another page! The header and footer will be the same on every page.

Link to comment
Share on other sites

The only other option is to make the portal bigger than the largest number of rows you'll ever need to print, then use the Sliding/Printing command to "shrink" it to fit the actual number of rows needed.

This is why we are constantly advising people to print from the related file! Portals are convenient, but are limited for printing.

Link to comment
Share on other sites

Ok, I've got the layout set up in the Line Items DB for the printed PO, but it's printing only 1 line item per page. Do I need to set the line item fields to be repeating fields? Or am I just missing something obvious? In this layout I set the header and footer fields to pull from the main (entry) DB, and in the body I listed the fields from the Line Item DB....

Link to comment
Share on other sites

hmmm..

not sure what you mean by "I *listed* the fields from the Line Item..."

When you create your layout, you're going to have your header and footer, and then only one line in the body (your body is going to be very very small). View in list view to see all the records one after another. When you print, the header will go to the top of the page, and the footer will go to the bottom, it will fit as many "bodies" into the body as it can before it goes to the next page.

Link to comment
Share on other sites

I figured out a way to make it work (not sure if it's the best way, but it works). I added a Sub-Summary to the Layout for the printed PO that creates a page break after each instance of the PO Number. So, for each PO Number, it prints the line items across multiple pages (if necessary). I hope that makes sense, either way it seems to be working correctly.

I have since ran into another problem (I'll be so glad when this is all done), and I'll post it to the scripts forum too. Is it possible to create a script in one DB to print a layout from another DB? I'd like to create a button on the PO entry screen to kick off a print job for that current PO, but the PO print layout is in the Line Item DB.

Link to comment
Share on other sites

First off, I'm not sure about your sub-summary... are you doing this so that PO's don't run into each other? You should only be printing after performing a find for the current PO. With line items from only 1 PO in the found set, you don't have to worry about the header and footer being for the wrong PO!

In your PO database, you will have a script "Print". This script will copy the PO number (or even better-put it in a global field), and then "Run Script, External..." this is where you indicate that you want it to run a script in another file.

So now in your POLineItems file you're going to have a script that performs a find for the PO number you copied (or put in a global field), and then goes to the printing layout, then prints, and finally takes the user back to the PO database.

Link to comment
Share on other sites

This topic is 7809 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.