Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change parameter and then convert to pdf using VB.NET

Status
Not open for further replies.

sneg86

Programmer
Jan 28, 2004
8
RU
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??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top