show report page xhen clic on ok button of form2

edited 9:19AM 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 9:19AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.