Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change printersettings in a report
Message
 
To
26/01/1999 02:54:38
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00173036
Message ID:
00180180
Views:
24
Hi Walter,

My solution, though less ambitious than yours, is to clean out the 3 fields and set the printer features programmatically. So at least you do not have to worry about what's in the report.

To the best of my knowledge, if there is not anything in the fields, the system falls back to the current settings at run time.

If then you have access to the API, nothing should stop you to set these settings.

What you cannot change thought are properties that would require a recompilation of the report (like fonts or orientaiton)


Kind regards,

Marc



>Marc,
>
>>>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 tag2 field is in fact not p-code but a DEVMODE structure. This piece of data contains a device independent part which holds some common information like orientation, papersize and whether or not to save colors. It also holds a device indepented part of which the meaning of the data depends on the printer driver.
>
>This data can be get and modified by the DocumentProperties API which shows the proper documentsettings dialog for the printer driver.
>
>By this I was hoping to make a 'printer setup' button to display this documentproperties dialogbox and save the data in the report and run it (so bypassing the prompt clause).
>
>But to my suprice the setting i wrote in the frx (even tried it when i made a report on the regular manner and use the printer setup button) the settings i wrote in the TAG2, TAG and EXPR didn't seem to hold. When i print the report it takes some of the current (like printing color, but not orientation) setting of the printer in stead of the settings saved with the report.
>
>This all seems so strange and inconsistent i could not implement my idea! Snif, snif
>
>So if you got another suggestion please help.
>
>PS, I'm getting this behaviour with NT 4.0, maybe this behaviour does not occur in W95
>
>Regards, Walter

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform