I do:
paramField.ParameterFieldName = "P1"
' Set a value to the parameter.
paramValue.Value = strTemp
paramField.CurrentValues.Add(paramValue)
paramField.DefaultValues.Add(paramValue)
' Add the parameter to the ParameterFields collection.
paramFields.Add(paramField)
CrystalReportViewer.ParameterFieldInfo = paramFields
strReportSource = strReportSource & "Transaction For Specified Account.rpt"
CrystalReportViewer.ReportSource = strReportSource

Then I get "Load report failed"

Any suggestions?

Thanks....

Correct me if I am wrong, but I thought you had to specify the location as well as the report name? i.e. using the UNC for file location.

See link: LINKY!

Correct me if I am wrong, but I thought you had to specify the location as well as the report name? i.e. using the UNC for file location.

See link: LINKY!

I did specify the location of the report in the report name. I found the problem. It was that I didn't have the correct location for the report. Once I put the report in the right location the report ran fine.

Thanks....

Glad to hear you go it working.

P.S. And that is what I meant about the specifying the location, was the location the report was at physically specified exactly in the code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.