Post Author: linksfield-leon
CA Forum: General
I know this question might get asked a bit - please bear with me.We have a simple report, which just displays Client Name. The report has a parameter, Client ID which can be null (and it will display all Client Names). Using Crystal Reports 2008 (the most recent download). C# v3.5When report loads, it always displays a parameters dialog with CRITERIA_CLIENT (i.e. name of parameter) showingProblem is, I have already programmatically set this parameter (see code below). QUESTION: As soon as I add a report parameter a prompt will appear, is there any way to suppress this? If not, please just say so and I'll stop looking :)foreach ( KeyValuePair<string, object> pair in reportParameters ){ if ( pair.Value != null && report.ParameterFields[ pair.Key ] != null && report.ParameterFields[ pair.Key ].CurrentValues != null && report.ParameterFields[ pair.Key ].CurrentValues.Count > 0 ) { // add to report as param ParameterDiscreteValue discreteVal = report.ParameterFields[ pair.Key ].CurrentValues[ 0 ] as ParameterDiscreteValue; if ( discreteVal != null ) { discreteVal.Value = pair.Value.ToString(); } else { // by this stage we know its a range value ParameterRangeValue rangeVal = report.ParameterFields[ pair.Key ].CurrentValues[ 0 ] as ParameterRangeValue; rangeVal.StartValue = pair.Value.ToString(); } }}