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:
00717091
Vues:
22
With the OCX, you should do something like this:
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.SubreportToChange = "Sub1"  && alias of subreport 
	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.SubreportToChange = ""  && back to main

	THISFORM.olecontrol1.SubreportToChange = "Sub2"  && alias of subreport
	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.SubreportToChange = ""  && back to main

	testout = THISFORM.olecontrol1.PrintReport
Regards,
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform