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

My ASP.Net Crystal Report doesn't prompt me for parameters

Status
Not open for further replies.

mulema

Technical User
Nov 16, 2002
32
0
0
US
Hi all,
I just created my first Crystal Report using ASP.Net, and followed the example I found online.
- This is what I did.
- I decided to use an already workable report created in Crystal Report version 8.5. This report passes in 2 parameters. (Order#, and Product# )
- Using Visual Studio Dot Net, on the Project menu, I added this Class on my Project using the "Add New Item" on my Web Form. On the Crystal Report Gallery, I chose the option to use an existing report. The report was pulled in exactly as needed. Next I dropped a CrystalReportViewer control on my web page, and a Report Document component as well. Thirdly, on my CrystalReportViwer1 Databaindings dialogue box, I bound my Report Doc component to my viwer control. Fourthly, I opended the Page_load and bound my report [ CrystalReportViwer1.DataBind() ]
At this point I ran my report, and behold, the report failed with the following error - "Missing parameter field current value". So my question is, do I have to pass this parameter field in Code? If Yes, please how do I do that?
- Or did I do something wrong in my steps in creating this report? Please advice.

Thanks.
 
Set the parameter in the report document object

oReport.SetParameterValue(0, Request.QueryString("two"))

You may need to set the DB login credentials in code as well:

oReport.SetDatabaseLogon("Reports", "beacon")

If you have a poke about with the objects and use the intellisense popups of VS.NET, you will probably find what I'm going on about.

Hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top