Thanks for bringing some light to me about this feature. In this context I have to questions:
1) How are you dealing with dynamic things like "element.settings based on a field value" ?
For example like the following code which is used on a record view report:
- Code: Select all
if ( pobox_status )
{
//set label pobox visible
elements.fl_label_pobox.visible = true;
elements.ffxtxt_label_pobox.visible = true;
}
else
{
//set label pobox invisible
elements.fl_label_pobox.visible = false;
elements.ffxtxt_label_pobox.visible = false;
}
This code works as long as only one record should be printed. But if I 'm printing multiple records which have different values in "pobox_status", I need an event like "onPrintRecord" or better "beforePrintRecord" . This event has to work on a print preview, doesn't it?
At the moment the settings are based on the "pobox_status" from the first record, and the code has no effect on the following records because it is executet before the print preview is shown.
At the moment the only solutions I'm seeing, are a html area (I don't like html for printing -> pagebreaks, etc.) or calculation fields (in this case ends up in two more calcs only for a gui effect -> label and field).
2) How can I set page settings like: size, orientation and margins by scripting?
Thanks for help
Hans-Peter