Accessing Parameter field values of sub report
Hi
I have an issue with accessing the Parameter field values of sub report in the main report.
Here with the description of my problem.
I am involved in developing a windows based applicaiton using Crystal Reports.
I am to access different reports based on check boxes selection.I have different rpt files which hold the data to be printed for individual check boxes selection.
For example ..I have check boxes 1,2,3 .Based on the selection combination ((1,2),(1,2,3),(1,3)...)the particular reports should be displayed.
I am inserting these subreports into the main report as individual details sections.The problem here is that I am not able to access the parameter field values of the sub reports in the main report.The paramters which are to be accessed are being prompted to be entered when I run the application.
I have added the code for the parameter fields values into the main report .The code goes like this in the main report
'************************************************* **************
crParameterDiscreteValue = New ParameterDiscreteValue
crParameterDiscreteValue.Value = Myvalue
crParameterField = New ParameterField
crParameterField.ParameterFieldName = "value"
crParameterField.CurrentValues.Add(crParameterDisc reteValue)
crParameterFields.Add(crParameterField)
CrystalReportViewer1.ParameterFieldInfo = crParameterFields
'************************************************* *******************
The crParameterField that I added should link to the sub report's parameter field.
"MyValue" is the name of the parameter field that i added in the sub report .
I should be able to access this at the main report.
Can anyone help me in explaining as to how to go ahead with this with some sample code.Or can anyone please tell me if this approach is correct or not?
Thanks in advance
|