show report page xhen clic on ok button of form2

edited 4:37AM in FastReport .NET
I try this but when i clic on the ok button of form2 I must clic on ok button of form1 to have see my report.
How can I validate all with this button?
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 Button1_Click(object sender, EventArgs e)
    {
    Form2.ShowDialog();   
    }
    private void btnOk_Click(object sender, EventArgs e)
    {
       MessageBox.Show("ok");
    }
  
  }
}
}
[/code]

Comments

  • edited 4:37AM
    If you wanna run report on button click - all you have to do is select needed button and there is property DialogResult - choose OK. then this button will run report.

Leave a Comment