Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal - CRVIEWER - gracefully renter calling form ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00571250
Message ID:
00571448
Vues:
41
This message has been marked as the solution to the initial question of the thread.
Sure. Here is the 'meat' of the program. The WITH...ENDWITH statements are the key. I got this from elsewhere on the UT anyway, this is not my original code.
	crApp=createobject("crystalruntime.application")
	crReport=createobject("crystalruntime.report")
	crReport=crApp.openreport(V_CRfile)
	crReport.Database.Tables.Item(1).Location=V_Table
	crReport.PrinterSetup(0)
	DO FORM vw_cryst
	WITH vw_cryst
		.caption = V_CRfile
		.addobject('crviewer1','olecontrol','crviewer.crviewer')
		WITH .crViewer1
			.height=vw_cryst.height
			.width=vw_cryst.width
			.visible=.t.
			.EnableRefreshButton = .F.
			.EnableGroupTree = .F.
			.DisplayGroupTree = .F.
			.reportsource=crReport
			.ViewReport
			=MESSAGEBOX("Processing completed. You may view the report, or you may print from the preview window.")
		ENDWITH
	ENDWITH
The form is just a simple empty form, with this code in the Resize method:
WITH This.crviewer1
.height =This.height
.width =This.width
ENDWITH
Hope this helps!

Randy

>Randy - could you pass along a snippet of the code that you use in the main form command button to call the form with the CRViewer - and what code is needed in the called form - where do I "thisform.crviewer.viewreport"?
>
> I've played along these paths in the past but wasn't successful and didn't beat it to death. Thanks!
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform