>The printersettings in a report are stored in the EXPR, TAG and TAG2 fields of a report.
>The meaning of the field EXPR is clear, but how about the other two ???
>
TAG and TAG2 contain p-code (semi compiled code) of what's in Expr.
>
>The reason for this queston is that i want to write a custom printer dialog box from which a can set the printer and document properties (Like the Word print dialogbox). Therefor i must be able to write a procedure or class to :
>- Select a printer
> (Easy with SET PRINTER TO NAME)
>- Popup and let the user choose the document properties (printerdriver depended)
> (some apicalls: openprinter and documentproperties)
>- Write the appropriate settings to the report (in the EXPR, TAG and TAG2 fields)
> (TAG2 looks to me as the data of a DEVMODE data structure, please can anyone confirm this ?)
>- Run the report
>
The main problem is that your report overwrites the settings at run time. If you are like me, and you include the reports in the project (.PJX) then the report overwrites the current settings. The only control you have is to use the prompt clause of the report.
... or empty out Expr, Tag and Tag2 at compile time and set the printer at runtime like you suggest. You can do that by hacking the report (.frx) file just before you build your app.
HTH and that it's not to late.
Uw buur.
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.