Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the Windows default printer
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Changing the Windows default printer
Miscellaneous
Thread ID:
00218639
Message ID:
00218639
Views:
40
Help! I'm stuck!

background
I have an app, written in Fox 2.6, that sometimes prints wrong...but I noticed that if I toggle my default printer to something else, and then back to the original, then it prints correctly.

What I'm doing is printing a report with multiple graphs. The graphs are produced using Graphics Server. To get things the way we want them we play with the FRX. Because of this, we have a "template" of the report, which we copy and modify. Part of the modification is to insert a record for each graph. Each report is uniquely re-named during the copy of the template. Each graph is stored as a BMP and is also uniquely named.

So if I do two reports (A and B), I'll have at least three graphs each (G1a, G2a, G3a, and G1b, G2b, and G3b)... Each Graph is the result of an independant call to Graphics Server...
I should get the following:
Report A with Graphs G1a, G2a, G3a
Report B with Graphs G1b, G2b, G3b

Sometimes, if I don't toggle the default printer I'll get
Report A with Graphs G1a, G2a, G3a
Report B with Graphs G1a, G2a, G3a

But if I do toggle the default printer I'll get
Report A with Graphs G1a, G2a, G3a
Report B with Graphs G1b, G2b, G3b
....Like I'm supposed to!

We've checked everything "we" can think of and toggling the printer is the only thing that has worked so far...
...No, we don't know why it works
...No, we don't know why it prints wrong either.... :(
(I believe the FRX has the right entries...I'll double check)

So that's why I'm asking,
Is there any way of changing Windows Default Printer?

BTW - the info is in the NT Registry...how can I get there with 2.6? Any working solution is GREAT!!!! If you have an answer that doesn't involve the registry Please tell me! Don't hold back!

-----------------
Well here's where we stand...
I wrote a simple program in VFP which sends the output of
SET("PRINTER",2) and APRINTERS()
to a text file.

Now I realize I have only part of the solution.

In Fox 2.6 SET PRINTER TO whatever
does not alter the windows default printer...just where Fox sends stuff.
I knew that, honest, but forgot.

I now need help to actually alter the windows default printer setting, using almost any method...except user intervention.
Reply
Map
View

Click here to load this message in the networking platform