Hi guys,
I have developed an application in VS 2010 that uses the Crystal Report Viewer. I programatically passing values to the reports. Many of the reports have optional prompts for their parameters. I would like to be able to run the report and send a blank or null value to the parameters. If I don't pass parameters the viewer prompts the user to enter them, if I pass null I get an exception that the types are not compatible. Can anyone help? Here is a sample code:
crParameterDiscreteValue.Value = null;
crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["@BPGroup"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
thanks,
Costas