Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with CR 8.5 and VFP9
Message
De
02/05/2005 18:31:19
Ken Penrod
Technical Perspectives, Inc.
Richardson, Texas, États-Unis
 
 
À
30/04/2005 17:39:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01008667
Message ID:
01010334
Vues:
22
Thanks,Craig, I'll give it a shot.

Ken

>In the Release method of the form, try:
>
>This.oleCRViewer = NULL
>
>
>>Craig,
>> We're not getting any error messages. I'm calling preview with...
>>
>> loCRForm = CREATEOBJECT("cfrmCrystal", lcRpt, lcTable, , lcFormCaption)
>> loCRForm.DoPreview()
>>
>>
>>		PROCEDURE DoPreview
>>			WITH Thisform
>>				ASSERT NOT EMPTY(.cReportName) MESSAGE ;
>>					[Report name has not been set.]
>>				ASSERT NOT EMPTY(.cTableName) MESSAGE ;
>>					[Table name has not been set.]
>>				
>>				.BuildCRObjects()
>>				.AddObject("oleCRViewer", "oleControl", "crViewer.crViewer")
>>			ENDWITH
>>
>>			WITH Thisform.oleCRViewer
>>				* Set report viewer Properties.
>>				.DisplayGroupTree         = .F.
>>				.DisplayTabs              = .F.
>>				.EnableDrillDown          = .F.
>>				.EnableExportButton       = .F.
>>				.EnableGroupTree          = .F.
>>				.EnableHelpButton         = .F.
>>				.EnableNavigationControls = .T.
>>				.EnablePopupMenu          = .F.
>>				.EnablePrintButton        = .F.
>>				.EnableRefreshButton      = .F.
>>				.EnableSearchControl      = .F.
>>				.EnableStopButton         = .F.
>>				.EnableZoomControl        = .T.
>>				.ReportSource = Thisform.oReport
>>				.ViewReport()
>>			ENDWITH
>>			Thisform.Show()
>>		ENDPROC
>>
>>		PROCEDURE BuildCRObjects
>>			WITH Thisform
>>				.oCrystalReports = CREATEOBJECT("CrystalRuntime.Application")
>>				.oReport         = .oCrystalReports.OpenReport(.cReportName)
>>				.oDB             = .oReport.Database
>>				.oCDBT           = .oDB.Tables()
>>				.oDBT            = .oCDBT.Item(1)
>>
>>
>>				.oDBT.SetTableLocation(.cTableName,JUSTFNAME(.cTableName),"")
>>				=VFPDelay(2)
>>				.oDB.Verify()
>>
>>
>>
>>				IF .oReport.HasSavedData
>>					.oReport.DiscardSavedData()
>>				ENDIF
>>
>>				lnNumPrint = APRINTERS(laPrinters)
>>				IF lnNumPrint > 0
>>					FOR ii = 1 TO lnNumPrint
>>						IF SET("PRINTER",3) = UPPER(laPrinters(ii,1))
>>							.oReport.SelectPrinter(.oReport.DriverName,SET("PRINTER",3),laPrinters(ii,2))
>>							EXIT
>>						ENDIF
>>					ENDFOR
>>				ELSE
>>					=GETCHOIC('There are no printing devices attached to this computer.','OK')
>>				ENDIF
>>	
>>				.oReport.PaperOrientation = .nOrient
>>
>>			ENDWITH
>>		ENDPROC
>>
>>
>>I'm trying to close it by clicking on the close box (X) on the window which works fine in VFP7 and VFP8.
>>
>>'Tis a puzzlement.
>>
>>Ken
>>
>>
>>>REPORTBEHAVIOR effects only VFP reports and will not have any effect on Crystal Reports. Are you getting any error messages? How are you creating and trying to close the preview window?
>>>
>>>>Are there any known issues with CR 8.5 and VFP9? When I try to run my CR report from within my VFP9 app I can get the preview window but can not close it. I've set REPORTBEHAVIOR to 80. CR runs just fine within my VFP8 version of the app.
>>>>
>>>>Thanks,
>>>>Ken
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform