Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Report Not Printing
Message
From
12/11/2001 21:22:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
09/11/2001 19:03:52
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00580049
Message ID:
00580695
Views:
17
>Hi all:
>
>I have a VFP 6 application which uses the Crystal Reports Active X control to print some CR Version 5 reports. Everything is working fine on my computer. I installed it on a remote site and the reports won't go to the printer. The remote workstation is NT and I've tested it on an NT workstation here with no problems.
>
>Here is the code I use.
>
>
>WITH thisform.crCrystal
>	.ReportFileName = Thisform.PrintType + "RAT.RPT"
>	.Destination = 1 && crptToPrinter
>	.SelectionFormula = "{FRGENDEC.GDQUE_ID}='" + curforms.pqid + "'"
>	.DataFiles(0) = "frgendec.dbf"
>	.DataFiles(1) = "frratsht.dbf"
>	.DataFiles(2) = ""
>	pnReturnValue = .PrintReport
>	IF pnReturnValue <> 0
>		=MessageBox ("Crystal Report " + Thisform.PrintType+"RAT" + CR + ;
>			"Generated Error: " + LTRIM(STR(pnReturnValue)))
>	ENDIF
>ENDWITH
>
>
>When it executes the .PrintReport statement the users see a window showing a "Printing Page...." box. However, nothing gets to the printer. I've checked and the correct printer is set as their default.
>
>The same application has a Word object which prints documents to the same printer. These documents all print correctly.
>
>Does anyone have any ideas on what might be causing the problem...
>or alternatives if the cause can't be found???

I thought this was already answered. Try with .destination=0 and see if the print button in the preview is dimmed. If it is, that would mean something's wrong with the selected printer, or there is some other disagreement between the expected and actual printer. If the user can click on the setup button from the preview and get it to print after that, that's it. It usually takes just a little tweak in the report (reselecting the printer and/or a little pro forma editing) to fix this.

BTW, wouldn't .printReport require parentheses to behave as a function?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform