Link to home
Start Free TrialLog in
Avatar of Skip_Laughlin
Skip_Laughlin

asked on

VB6 does not see the default printer. Need to set VB printer to nothing for troubleshooting

My app is VB6 with Crystal Reports 6 Professional.  I have a user running this app on a Windows 7 machine.  At some point, VB stops seeing the default printer, so if she does a preview onscreen of the report, the printer icon is grayed out.  If she exits the app and comes back in, it is fine.  At least for a while.

This problem only occurs on this one pc.  Many other PC's running the app are fine.

I'm trying to come up with some code to detect this condition and call crystal.printerselect so she can select a printer and not get the grayed out icon.

I've tried all manner of setting the printer, changing the default printer, etc., but I want to set the VB6 printer name to null or nothing so I can see if my fix is going to work.

Any suggestions or ideas to solve this would be much appreciated.
Avatar of Mike McCracken
Mike McCracken

How are you running the report?

mlmcc
Avatar of Skip_Laughlin

ASKER

Out of VB.  Very simple.

Crystal1.DataFiles(0) = "somemdb"
Crystal1.ReportFileName = "report name.rpt"
Crystal1.Destination = 0
Crystal1.Action = 1
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.  Only thing I've found is that W7 isn't forgiving as all earlier Windows versions in treating strings and values.  I accidentally found out that in XP and earlier, I could evaluate 1000 as a string or as a value.  Not in W7.