This question is a little unclear. Records are "of" a table and a layout is based on a table. Many layouts can be created based on the same table. However, each layout (based on the same table) can show the same records. "the original layout for each record?" A layout does "belong" to a record. If you wish different records of the same table to be printed using different layouts, go to layout #1, find the set of records to print, print them, GoToLayout #2 etc.
RW, thanks for the response. you clearly understand databases better than i. i suspect this may be an issue with how the database was set up to begin with.
let me try and clarify the question.
each record within the table has a field that is a pull down menu for a particular layout.
when viewing the records as forms, you can scroll through all of them and see the layout change.
when print -> records being browsed is selected, or save as pdf, the program seems to apply only a single layout to each which differs from how they appear when browsing through them as forms.
is that any clearer?
I haven't received any additional responses to this question and am wondering if anybody has any.
As a follow-up, my basic question is whether there is a way to print all records in a table (or create a pdf) without having to print each layout separately.
You would have to print the records individually in a script that loops through the records and that selects the appropriate layout for each record, printing them one at a time. The Current Record option should be used when the script prints each record.
Are you aware of a script? I don't think this is something I could put together.
The basic out line is pretty simple:
#Assumes you've already performed a find to pull up the records you want to print:
Print [Restore] //Use current record option
Go To Record [next ; exit after last]
This script assumes that you already have layout based script triggers to change layouts as you move from record to record. These triggered scripts will kick in automatically as you move from record to record in this script.
i've just tried the script and it works. however our office has print auditing enabled and it requires a job number for each print.
this would be manageable, but ultimately we are looking for a pdf anyway. in this case the script requires you to enter the pdf file name for each layout.
is there any modification you could suggest that would simply generate a single pdf file of each record using the appropriate layout for each?
You can script the Save as PDF process and use it in place of the Print step in the above script. This is a commonly asked question, so I saved a link to where this question has been answered before:
And there's a nifty option for a scripted save as PDF that enables you to append each new PDF to the end of an existing PDF if you want to produce a single PDF file from this script. (There's a check box for this option that you'll see when you add the save as pdf step to your script.)
this is great. i think we're on to something. i hope i'm not abusing your patience.
attached is a screenshot of the script we made.
we did not create the database file we are using so we are encountering some restrictions/issues.
there is a layout '00 general building info' that seems to be in it's own table; then there is the table with the remainder of the records beginning with '00 overall building rating definitions'.
the attached is working except:
1) each layout brings up a dialog box with a file name option and the 'append' button; i would have thought that the 'no dialogue' option would prevent this. is this correct? is there a problem with the script?
2) the pdf file name is 'untitled' by default; wouldn't 'current record' in the save records line set the file name?
My assumption in suggesting this approach was that all records were in a single table, but that different layouts all referring to that same table were customized for individual records.
This scritp will not work if the records are not all in the same table. You may need to do this in two or more parts where you find and save as PDF from each layout in turn.
A rough outline of the script would look like this:
Go to layout [first layout]
Save as PDF // with records being browsed so that all records for this layout are saved to PDF in one save.
Bo to layotu [2nd layout]
Seave as PDF
and so forth....
Thanks again for all the patience.
The script we have seems to be close to working as needed.
1) All of the records we want to save are in the same table; the issue we were having is that there is one layout (00 General Building Info) that all the other records 'read' from (i.e. they have fields with information that is gathered from this General Info).
2) When we first ran the script to save to pdf it would save a copy of the 00 General Building Info with each subsequent record. Since we only want one copy of this record at the beginning of the document, we started with 3 lines of script to save that specific record, and then a loop for all the subsquent.
3) This seems to work except the script is prompting for a pdf file name (which I thought was specified in the script) and it also prompts for a pdf file name for each layout set (which I thought the 'no dialogue' option would eliminate),
4) Is there any solution for the two issues above? Do you see any other issues with the script as is?
You are computing the path and storing it in the variable, but you aren't using that path variable in the save records as PDF. Update your script steps to use the path variable and you should no longer get the dialogs asking for file name and location to which to save the PDFs.
I realized that as well, so i added [file:$Path] to the Save Records as PDF lines.
However as the script starts I am now getting an error [".PDF" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.]
The second part of the script gives me a similar error but has the correct filename; I assume I am getting the error since the second part of the script is to Append and there is no file to append.
That's a generic error message that usually happens when the file path computed and stored in the variable is not a valid file path. You may want to post the exact expression in your Set Variable step where this is computed. It can also happen if you do not have "write privileges" from your current system user account to the folder where you are saving the PDF. When computing a filepath, use / instead of \ as the \ character has to be doubled inside of quoted literal strings in order for it to evaluate correctly.
You may also want to use Get ( DesktopPath ) as a temporary test to confirm that everything else is working correctly.