Question

I am writing a web application using ASP.NET 2.0 [Visual Studio 2005 Professional Edition].

I have a Crystal Report that is connected to a stored procedure residing in SQL Server. This stored procedure accepts a parameter and therefore I have a formula in my report's hyperlink section to pass the parameter via Query String.

Everything works fine except when I click the navigation buttons to move to the next page of the report, I either get an error or Crystal Reports shows an input box to enter the parameter values.

The error shown is: "Missing Parameter Values". Only this error is shown and nothing else. If I try to export the report by selecting Export option on the Crystal toolbar, it opens a page and asks for the parameter values.

I am not following why parameter values disappear when either I move from the first page to the other or try to export the report?

Was it helpful?

Solution

Most likely you are setting the parameters in the report viewer instead of the report object. If the parameters are set in the report object they should persist on navigation. If you still have issues create an event handler for the report viewer's 'Navigate' event and reset them.

OTHER TIPS

Aditionally, if you call report.Refresh() or report.VerifyDatabase() after you set parameters it clears the values so be aware of that,

MD

When we click on report navigatin button, print button page is refeshed and we facing with 'missing parameter values error '

My probem is solved by using below line of code.

If Not Page.IsPostBack Then CrystalReportViewer1.ParameterFieldInfo = paramFields CrystalReportViewer1.ReportSource = myReportDocument CrystalReportViewer1.DataBind() Else CrystalReportViewer1.ReportSource = myReportDocument CrystalReportViewer1.DataBind() End If

where paramFields are runtime created ParmeterFields

Best Regards, Vinay Shukla

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top