Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have script that runs a grouped data report that is sorted into a page for each customer. Each customer has one or more items assigned to them. The script then enters preview mode. So the report is 10 pages if there are 10 customers. I want to create a PDF of each individual page, not the whole report and not a single record. I want the name of the PDF to be the name of the customer. Can I do this?

Posted

Yes you can do this but you will probably need to run the report once for each customer. A loop takes care of that. To specify the name you'll need to construct the full path in a variable and then use that as the output path. E.g.:

Set Variable( $path ; Get(DesktopPath) & customer & ".pdf" )

Save records as PDF( $path )

Posted

My issue with that is I have over 1500 customers, but only a handful have items assigned to them. Do I have to cycle through each customer, and if so how do I stop the script form generating a pop-up each time a customer has no found items?

Posted

One approach would be to first do the search you're currently doing to isolate those 10 customers as in your first example. You could then loop through that found set and generate a PDF for each one.

That would make your last question moot, but FYI if you're talking about suppressing error dialogs, all you have to do is turn error capture on in the script.

Posted

Set Variable( $path ; Get(DesktopPath) & customer & ".pdf" )

Save records as PDF( $path )

Hi...I'm writing to you because I need to understand this loop you described. I don't know how to translate the variables into actual information from my database to create this loop. Actually, I believe I understand the second line, but I can't construct the first line.

I have a 4-page report that is run for 30 specific companies and is driven by the field Symbol to select these companies. Within my script that creates a single PDF with all 120 pages, I have a Perform Script command that does the find to extract these 30 symbols. What I want to be able to do is generate page numbers (1 through 4) for each set of reports. It seems this loop should do that for me, but I need to understand how to construct it.

I have attached the script I use to PDF these reports so you know what I'm doing right now. There are no page numbers in the report itself at the moment, because to do so without the loop just numbers the resulting 120 pages consecutively.

If you could help that would be great.

Debbie

PDF_All_CHSS_Reports_Script.pdf

Posted

You have this line in your script:

Save Records as PDF( File Name: "filewin:/K:/PDFs/IIVA DB/CHSS Reports.pdf"; Automatically open; Records being browsed )

If you want to save a report with the customer name, then you could do it like this:

Set Variable( $path ; "filewin:/K:/PDFs/IIVA DB/" & customerNameField & ".pdf" )

Questions: You said earlier there's a page for each customer - does that mean one record per customer? Is the layout for this report based on customers?

Is making separate PDFs even your goal anymore? In your recent post you say there's 4 pages per company and you want to renumber them. Seems like a different question.

If your records are summarized by customer, you can insert a subsummary part and use the "Restart page numbers after each occurrence" checkbox.

Posted

Questions: You said earlier there's a page for each customer - does that mean one record per customer? Is the layout for this report based on customers?

Actually, I didn't say that I had "a page" for each customer. This is what I said:

I have a 4-page report that is run for 30 specific companies...

Regarding this statement...

Is making separate PDFs even your goal anymore? In your recent post you say there's 4 pages per company and you want to renumber them. Seems like a different question.

I didn't say this either. This is what I said...

What I want to be able to do is generate page numbers (1 through 4) for each set of reports. It seems this loop should do that for me, but I need to understand how to construct it.

I realize that I can create one PDF file per Symbol and not have a page numbering problem. My issue comes with trying to number each set of 4 pages within a single PDF containing all 120 pages (30 symbols x 4 pages). I don't want a separate PDF file for each symbol. It's too cumbersome to deal with so many individual files. Also, the specific list of Symbols changes. That's why there is a separate script that performs the find on Symbol. I use this one Find script over and over throughout the many reports I have, because I only want to have to change that list in one place.

I don't summarize by symbol, so I cannot use the function you mentioned. This is just a straightforward report that displays data for a specific list of symbols. It's a single layout with each page being delineated within the layout. There is only one record per Symbol (company). I simply do a find and display to a 4-page layout.

Bottom line...my only question is how to get page numbers 1 thru 4 on each set of reports in a single PDF containing 30 reports (120 pages). Hopefully, I have clarified things and not confused them more.

Thanks for responding...I appreciate it very much.

Posted

See, that's what comes from hijacking a thread. Anyway, it seems the solution is simple: in Layout mode, double-click the Body part, and set it to restart page numbers after each occurrence.

Posted

I don't understand...I hijacked a thread?? I was asking a legitimate question about a previous post. I was asking you what you meant in your response...to translate the language. I can't help if you didn't realize that you weren't talking to "Newbie", and I'm sorry if I did something that isn't "legal" in a forum. Silly me for thinking I could ask for clarification in what I thought was a post that was related to a similar problem I was having.

I do appreciate your solution, though, and I'm very sorry if I did something wrong in obtaining it. I thought the whole idea about searching forums for similar problems, looking for solutions, and keeping the posts together was how it all worked. I'm just so new at this, I guess I overstepped and did something I wasn't supposed to...sorry.

Thanks again. I'll try not to let this happen in the future. One day I'll get the hang of this whole forum thing. :sorrysign: and :thankyou:

Posted

Take it easy - no one was injured and no harm was done. It's just that we tend to read quickly and look for the details that really matter. It took me a while to realize that you weren't the original poster, and your problem is a different one. I believe you haven't noticed that I am not Tom Fitch - so you see how easy it is to get confused. :)

Posted

Yep, I didn't notice that it was someone else asking the question, sorry for the confusion. Did your question got answered, Debbie?

This topic is 6004 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.