Skip to Content
0
Former Member
Mar 27, 2012 at 06:30 PM

Does anybody know what DefaultValueDisplayType is?

31 Views

I have some code that is trying to work around a bug in Crystal Reports (see below). The old version of Crystal Reports XI R2 used to prompt the user for required parameter values before printing or exporting but CR 2008 does not. To get around this I preview the report which still prompts the user for parameter values. I found a variable that I think tells me whether I need to prompt the user but I'm not sure. Is DefaultValueDisplayType a flag that indicates if this parameter has not yet been filled in and needs user input?

for (int c = 0; c < m_ReportDocument.ParameterFields.Count; c++) { if (m_ReportDocument.ParameterFields[c].DefaultValueDisplayType == 0) { bParamNeeded = true; break; } }

if (bParamNeeded) ShowRepport(); // this will prompt the user for values . . .