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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Pass Parameters to Crystal .NET

Status
Not open for further replies.

sheykc

Programmer
Joined
Sep 28, 2001
Messages
79
Location
US
I have a report (Claim.rpt) that needs 1 parameter passed to it. The report was added to my .NET application. This report accesses the stored procedure via a "Command" inside of the report.

The parameter variable inside the report is called @Claim_ID.

I also have a webform (ViewClaim.aspx) that has a CrystalReportViewer on it. This viewer points to the report and calls "DataBind()".

I have another webform (Claim.aspx) that has a "Print" button on it. All that button needs to do is pass the claim ID from that Claim.aspx to the ViewClaim.aspx, then run the report viewing form. I was trying to do this via server.transfer.

Does that make sense?

When I run the application, I get an error:

CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field current value.

Can someone help me out with this?
 
sto: Can you pass a QueryString onClick of the button? How about creating an object on Claim.aspx that also retrieves the @ClaimID from the Stored Procedure? Also, when you call the DataBind() method is there a requirement that the object to be bound must be idenitfied? Just a couple of thoughts --
 
I just want to use server.transfer like is being used in the rest of the app. Passing the parameter to the other page is not the issue.

Getting the error message is the problem.

What I would like is some good VB.NET example code, that uses the .NET version of Crystal, not Crystal Enterprise, that doesn't use a dataset, but uses a stored procedure with one parameter.

Does anyone have something like that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top