Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Programatically Passing null value to Crystal Report Viewer

$
0
0

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


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>