crystal report in ASP.NET and SQL Server
-
I'm a beginner in crystal report. :(I want to set the content of an object in a crystal report from my aspx page, based on the result of some conditions. How is this possible ? Believe that the sun never sets!
Hi, One of the ways is by using parametized report. Assuming that you know how to create parameters in the Crystal Reports report file, all you need to do is pass the value of the parameter dynamically like the code below: reportDocument1.Load(@"c:\inetpub\wwwroot\CrystalReportSample\report.rpt"); reportDocument1.SetDatabaseLogon("sa","password"); reportDocument1.SetParameterValue("state",txtState.Text); CrystalReportViewer1.ReportSource=reportDocument1; CrystalReportViewer1.DataBind(); If that didn't answer your question, contact me: contact@KYNOU.com or see if I'm online in the chat room at www.KYNOU.com I hope I helped :)