How to add event to the band from program.

Dear Alex,
How add the event to the summary band from the program (ASP.NET). This summary band was also added from the program.
I want to add this event to my summary band
ReportSummary1_BeforePrint(object sender, EventArgs e)
How i add events?
Thanks in advance.
How add the event to the summary band from the program (ASP.NET). This summary band was also added from the program.
I want to add this event to my summary band
ReportSummary1_BeforePrint(object sender, EventArgs e)
How i add events?
Thanks in advance.
Comments
1) band.BeforePrint += new EventHandler(your_method);
where your_method is defined in your code.
2) add the code to the report Script:
(I've skipped line endings in the script text)
report.ScriptText =
"using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private void ReportSummary1_BeforePrint(object sender, EventArgs e)
{
// your code here
}
}
}";
band.BeforePrintEvent = "ReportSummary1_BeforePrint";
Dear Alex,
If i go with First option where can i define the method in asp.net page or in the report script and How?
Thanks.