Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass parameters to main report and 2 subreports?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00716962
Message ID:
00717029
Vues:
17
Hi Jose,

I understand what you have told me, but I am using OCX OLEcontrol1 control on VFP6 form so maybe it won't work the same.

Here is my code to pass the parameters from VFP 6 to CR 8. My subreports have the same name as the main report except I added a 1 and a 2 at the end of the name to differentiate the names and reports. I commented out the two commands that I thought were to load the subreports, but they did not work as expected. Thanks again.
IF THISFORM.cborpt.Value = "127"
	THISFORM.olecontrol1.ReportFileName = ;
		\reports\scaagcystats.rpt"
	THISFORM.olecontrol1.ParameterFields(0) = ;
		"s_date;Date("+s_yr+","+s_mo+","+s_day+");TRUE"
	THISFORM.olecontrol1.ParameterFields(1) = ;
		"e_date;Date("+e_yr+","+e_mo+","+e_day+");TRUE"
	THISFORM.olecontrol1.ParameterFields(2) = ;
		"agency;"+agency+";TRUE"
*	THISFORM.olecontrol1.ReportFileName = ;
*		"\reports\scaagcystats1.rpt"
	THISFORM.olecontrol1.ParameterFields(3) = ;
		"s_date;Date("+s_yr+","+s_mo+","+s_day+");TRUE"
	THISFORM.olecontrol1.ParameterFields(4) = ;
		"e_date;Date("+e_yr+","+e_mo+","+e_day+");TRUE"
	THISFORM.olecontrol1.ParameterFields(5) = ;
		"agency;"+agency+";TRUE"
*	THISFORM.olecontrol1.ReportFileName = ;
*		"\reports\scaagcystats2.rpt"
	THISFORM.olecontrol1.ParameterFields(6) = ;
		"s_date;Date("+s_yr+","+s_mo+","+s_day+");TRUE"
	THISFORM.olecontrol1.ParameterFields(7) = ;
		"e_date;Date("+e_yr+","+e_mo+","+e_day+");TRUE"
	THISFORM.olecontrol1.ParameterFields(8) = ;
		"agency;"+agency+";TRUE"
	testout = THISFORM.olecontrol1.PrintReport
ENDIF
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform