Hi, I have an application that opens a Crystal report document and
passes in a value to a parameter in the report (pointing to an Oracle
DB). However, if I want to pass a "null" value to retrieve all records
that have no data for the specified field that the parameter is a
condition of (ie. SELECT * from <table> where <field> is null"), it
returns nothing. I think CR is building the SQL statement like "SELECT
* from <table> where <field> = null". If I put in a value, it retrieve
records properly. Other than creating a stored procedure to handle the
null value and build my own SQL to fetch the records (this would be
problematic for me because I want to be able to pass in multiple values
for a parameter), is there anything I can do?
Here is my code:
paramFieldDef = oRpt.DataDefinition.ParameterFields[0];
ParameterDiscreteValue discreteValue = new ParameterDiscreteValue();
ParameterValues curValues = paramFieldDef.CurrentValues;
discreteValue.Value = null;
curValues.Add(discreteValue);