Skip to content

Actualize a reportview on run time

Mfwamba Tshimanga

Asked Feb 9, 2015, 3:42 AM EST2 answers
Share
LinkedInX
Hi!


With these code I can actualize my datagrid.

Java
            conn.Open();
            OleDbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select [date],[name] from 1";
            cmd.ExecuteNonQuery();
            DataTable dt = new DataTable();
            OleDbDataAdapter da = new OleDbDataAdapter(cmd);
            da.Fill(dt);
            conn.Close();
            dgvPorData.DataSource = dt;

Then I am asking question how can I actualize on time a reportview on my form. In other word if I update one data (or some datas) on the same form. How can actulize on run time.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I do try this but its doesnt result:


    this._1TableAdapter.Fill(this.DataSet1._1);
    this.reportViewer1.RefreshReport();

    Its doesnt works (or refresh). Because in configure parameters. I specify dates and name to make filter.

    But when I do this:
    this._1TableAdapter.Fill(this.DataSet1._1, dataInicialConsPorNomes.Text, dataFinalConsPorNomes.Text, txtConsFaltasPorNome.Text);
    this.reportViewer1.RefreshReport();
    Its should works only when I introduce value to filter. Otherwise the report show a blank page with only title.
    0
  • 0
    No one can tell me how to refresh my report on runtime???
    0