When should PRINTERDIALOGA(title,flag,prn) be used?

The PRINTERDIALOGA() function has a third parameter, “REPORT prn”, while the regular PRINTERDIALOG() (no trailing “A”) function does not. When would a person want to use the “A” version?

Have you tried pressing F1?

I don’t think the Help specifically says what happens when the 3rd parameter (REPORT prn) is passed and the REPORT is already OPEN. Does Clarion only affect the passed REPORT structure in this case? If the report is NOT open does it save the changes to the PRINTER built-in object or does it save them back to the REPORT structure. When the report structure is subsequently OPENED then the users changes would be, presumably, wiped out?

I would like to believe that the Print Setup dialog would be initialized from what ever properties are in the “prn” structure, which could be way different than what exist in the built-in PRINTER variable. I would also like to believe that nothing about the built-in PRINTER object would be changed, when an OPEN REPORT structure is passed. So, for example, if I define a report with a custom page size of say 3-3/8" x 2-1/8", but the user wants to tweak the sizing a little bit they could and it would not affect the built-in PRINTER variable, as long as I call PRINTERDIALOGA with an OPEN REPORT structure.

I know that one 3rd party report viewer goes out of its way to copy certain properties back and forth between a REPORT structure and the system PRINTER variable because, presumably, it only uses PRINTERDIALOG (without the “A” suffix and the REPORT structure parameter). Where as, if it used PRINTERDIALOGA then there might not be any need for the extra copying of properties between the PRINTER system variable and an open REPORT structure. Of couse, context is of consideration here: Is the user meaning to change print properties for subsequent reports or just the one they are currently printing? Is the report being previewed and then printed or is the report going to be generated directly to the printer without going through a preview?

In summary, I am asking if one is printing to a specialized printer or onto special forms (that are not the normal size) then is this when it is advisable to go through PRINTERDIALOGA ? And, does PRINTERDIALOGA leave the built-in PRINTER variable alone when a OPEN and/or CLOSED report structure is passed?

1 Like