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:
00717015
Vues:
16
Hi Steve

How are you passing the parameters to the main report? You should do the same with the subreports (assign them explicitly), i.e:
loReport.ParameterFields.GetItemByName("Start_Date").SetCurrentValue = date()
...
loReport.ParameterFields.GetItemByName("Start_Date","MySubreport1").SetCurrentValue = date()
...
loReport.ParameterFields.GetItemByName("Start_Date","MySubreport2").SetCurrentValue = date()
...
or else:
loReport.ParameterFields.GetItemByName("Start_Date").SetCurrentValue = date()
...
loSubreport = loReport.OpenSubreport("MySubreport1")
loSubreport.ParameterFields.GetItemByName("Start_Date").SetCurrentValue = date()
...
loSubreport = loReport.OpenSubreport("MySubreport2")
loSubreport.ParameterFields.GetItemByName("Start_Date").SetCurrentValue = date()
...
Hope this helps,
Jose

>I looked up the answer on the Crystal website knowledgebase, but it does not work for me.
>
>I want to pass three parameters to the main report. This is working.
>Start_Date
>End_Date
>City
>
>But then I also want to pass the same three parameters to the first subreport and then pass the same three parameters to the second subreport.
>
>When I run my VFP form and choose the report, it passes the parameters to the main report, but then calls in the Crystal Report for me to enter the same parameters for the two subreports that are contained within the main report.
>
>What might I be doing wrong? Thanks for the help.
------------------
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