in my report i have parameter in sql query something like this select * from table where id = {?docid}. i want it to change then refresh data and save report as .pdf
i found an example how to change parameters :
some defintions and choice parameter to change
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = "12" 'why not?
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
and then i convert it to pdf but i get Query Engine error doing export:
Exception Details: CrystalDecisions.CrystalReports.Engine.DataSourceException: Query Engine Error: 'C:\WINNT\TEMP\temp_283f9f62-1d6a-4c11-af11-d56fe495fde0.rpt'
if i do refresh (crReportDocument.Refresh()) before export(i suppose i should do it? or ApplyCUrrrentValues is enough?) than another error happens:
Missing parameter field current value:
CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field current value.
what's wrong??
i found an example how to change parameters :
some defintions and choice parameter to change
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = "12" 'why not?
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
and then i convert it to pdf but i get Query Engine error doing export:
Exception Details: CrystalDecisions.CrystalReports.Engine.DataSourceException: Query Engine Error: 'C:\WINNT\TEMP\temp_283f9f62-1d6a-4c11-af11-d56fe495fde0.rpt'
if i do refresh (crReportDocument.Refresh()) before export(i suppose i should do it? or ApplyCUrrrentValues is enough?) than another error happens:
Missing parameter field current value:
CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field current value.
what's wrong??