Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where my Crystal Report? Now you see it... now you don't!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Where my Crystal Report? Now you see it... now you don't!
Divers
Thread ID:
00575823
Message ID:
00575823
Vues:
41
I run a VFP form that runs my Crystal Report from a command button. When the Crystal Report starts to appear it suddenly disappears. This is usually the behavior of a Crystal Report with no data.

But when I run the same Crystal Report as a stand-alone report, the data is there and the report appears.

Any idea as to what I am doing wrong?

Here's the VFP code in my VFP button that runs the Crystal Report.
* Put date from combobox into MM/DD/YYYY format for date range on report.
*lcFromDate = THISFORM.cboFromMo.Value + "/" + ;
*		THISFORM.cboFromDay.Value + "/" + ;
*		THISFORM.cboFromYr.Value
*lcToDate = THISFORM.cboToMo.Value + "/" + ;
*		THISFORM.cboToDay.Value + "/" + ;
*		THISFORM.cboToYr.Value

*THISFORM.crpt.ReportTitle = "MY REPORT"
THISFORM.crpt.Destination = 0

* Convert Date from Date to Char type		
gcStartDate = CTOD(gcFromDate)
gcEndDate = CTOD(gcToDate)

* Convert Date from Date to Char type		
gcStartDate = CTOD(gcFromDate)
gcEndDate = CTOD(gcToDate)
IF EMPTY(gcTimeName)
	gcTimeName = ""
ENDIF
gcRptDate = gcTimeName + "(" + DTOC(gcStartDate) + " - " + DTOC(gcEndDate) + ")"
THISFORM.fromtodate() && Change date in From To Date pull-downs to match chosen date option

* Hospital Admissions
IF THISFORM.cborpt.Value = "16"
	THISFORM.HospAdmit()
ENDIF

* Medical Examiner
IF THISFORM.cborpt.Value = "20"
	THISFORM.MedExam()
ENDIF

* Monthly Top Shock
IF THISFORM.cborpt.Value = "60"
	THISFORM.crpt.ReportFileName = "motopshock.rpt"
	THISFORM.crpt.ParameterFields(0) = "ReportMo;"+THISFORM.cboFromMo.Value
	THISFORM.crpt.ParameterFields(1) = "ReportYr;"+THISFORM.cboFromYr.Value
*	THISFORM.crpt.ParameterFields(1) = "ReportMo;"+THISFORM.cboFromMo.Value
ENDIF

* Quarterly Top Shock Award
*IF THISFORM.cborpt.Value = "51"
*	THISFORM.crpt.ReportFileName = "qtrtopshock.rpt"
*	THISFORM.crpt.ParameterFields(0) = "ReportYr;(THISFORM.cboFromYr.Value);TRUE"
*	THISFORM.crpt.ParameterFields(1) = "ReportMo;(THISFORM.cboFromMo.Value);TRUE"
*ENDIF

testout = THISFORM.crpt.PrintReport
THISFORM.LOCKSCREEN = .T.
THISFORM.Refresh
THISFORM.setbackcolor
THISFORM.LOCKSCREEN = .F.
THISFORM.cboRpt.SetFocus()
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Répondre
Fil
Voir

Click here to load this message in the networking platform