LOGO

LOGO
LOGO
ads header

Breaking News

FastReport PAremetre


FASTREPORT.NET PAREMETRE
using FastReport.Web;
using FastReport;

namespace URLParams
{
 public partial class About : Page
 {
 protected void Page_Load(object sender, EventArgs e)
 {
//Get parameters from URL
 string param1 = Request.QueryString["param1"];
 string param2 = Request.QueryString["param2"];
//Load report fil into WebReport object 
 
 WebReport1.ReportFile = "App_Data/URLParams.frx";
//Set value to report parameters
 WebReport1.Report.SetParameterValue("Param1", param1);
 WebReport1.Report.SetParameterValue("Param2", param2);
 }
 }
}





 protected void Page_Load(object sender, EventArgs e)
 {
 string param1 = Request.QueryString["param1"];
 string param2 = Request.QueryString["param2"];
 Report report = new Report();
 report.Load("J:/Program Files (x86)/FastReports/FastReport.Net/Demos/Reports/URLParams.frx");
 report.SetParameterValue("Param1", param1);
 report.SetParameterValue("Param2", param2);
 WebReport1.Report = report;
}

******************************************************************



Double-click on the first button, and add the following code:
1
2
3
4
5
6
private void button1_Click(object sender, EventArgs e)
 {
 report1.Load(@"C:\Program Files (x86)\FastReports\FastReport.Net\Demos\Reports\Text.frx");
 report1.Prepare();
 report1.Show();
 }
Here, we load a report into the Report object. Then, we build a report, and ,f inally, we display it.
Now double-click the second button, and add the following code:       
1
2
3
4
5
 private void EditReportBtn_Click(object sender, EventArgs e)
 {
 report1.Load(@"C:\Program Files (x86)\FastReports\FastReport.Net\Demos\Reports\Text.frx");
 report1.Design(); 
 }




Hiç yorum yok