Israel

Israel

  • NA
  • 847
  • 107.3k

Two forms in conflit. What is the problem???

Apr 7 2015 8:42 AM
Hi!

I have two forms (the first form have a button that redirect me to the second form and the second form have a textbox that will receive a label value coming from the first form). After all, the number that will appear on the textbox of the second form its will be afected to the textchanged's event to show this report.


these codes are inside of the first one:


public partial class Bill : Form
    {
        RptFrmBill BillSell;


        public Bill ()
        {
            InitializeComponent();
        }




if (BillSell== null)
BillSell= new Bill ();
BillSell.ValueFromForm1(lblNumberprint.Text);
BillSell.ShowDialog();


Then when I click its gone on the second page. These are the code for the second form:


private void txtnumPrintBillRpt_TextChanged(object sender, EventArgs e)
        {
            this.FacturacaoTableAdapter.Fill(this.DataSet1.Facturacao, txtnumPrintFacturaRpt.Text);
            this.reportViewer1.RefreshReport();
        }




Curiosly, when the page preview open on the second form. The designing report by me its visible (but without data).
The datas appear ONLY when I restart all my program and make the process to show that number I would see the last time. Strange!



Answers (1)