prob in calling crystel report from vb.net
-
hi friends, i am facing problem in calling a crystel report from vb.net having on demand sub reports. My main report has 4 params and on demand sub report has 2 params. The code of passing params is running perfectly without any sort of error but when i assing my reportdocument object (report) to the crviewer object ( crViewer.ReportSource = rpt) is shows me parameter input value box. The things work fine with report having no on demand sub report. following is the code for parameter passing and calling the report Dim crParameterFields As New ParameterFields() Dim crParameterField As ParameterField Dim crParameterDiscreteValue As ParameterDiscreteValue crViewer.ParameterFieldInfo = Nothing (created at design time) On Error GoTo eHandle 'rpt.DiscardSavedData() crParameterDiscreteValue = Nothing crParameterField = Nothing crParameterDiscreteValue = New ParameterDiscreteValue() crParameterField = New ParameterField() crParameterDiscreteValue.Value = v_sCompanyName crParameterField.ParameterFieldName = rpt.DataDefinition.ParameterFields(0).Name() crParameterField.CurrentValues.Add(crParameterDiscreteValue) crParameterFields.Add(crParameterField) crViewer.ReportSource = rpt ( shows paramters input box at this line) i would be helpful if someone could help me out. I have searched on many sites but not much :( info is received. thank you very much :-O Vaibhav Shah