1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
DataSet1 ds = new DataSet1();
for (int k = 1; k < 13; k++)
{
text="select * from ma table where id_mois = " + k + "";
OleDbCommand olecmdDONNEES_MOIS = new OleDbCommand(text, cnx.CONNEXION_BASE);
cnx.LECTEURDONNEESITE = olecmdDONNEES_MOIS_D_CS_S.ExecuteReader();
while (cnx.LECTEURDONNEESITE.Read())
{
int i = 0;
for (m = 0; m < 6; m++)
{
row = ds.Tables[0].NewRow();
//row["libele"] = libele[m];
row["PER_REAL_N"] = cnx.LECTEURDONNEESITE[i];
i++;
row["PER_BUD_N"] = cnx.LECTEURDONNEESITE[i];
i++;
row["PER_REAL_N-1"] = cnx.LECTEURDONNEESITE[i];
i++;
row["FOR_CAST1"] = cnx.LECTEURDONNEESITE[i];
i++;
row["FOR_CAST2"] = cnx.LECTEURDONNEESITE[i];
i++;
row["GAP_BUD_REAL_N-1"] = cnx.LECTEURDONNEESITE[i];
i++;
row["GAP_BUD_REAL_N"] = cnx.LECTEURDONNEESITE[i];
i++;
row["GAP_REAL_N"] = cnx.LECTEURDONNEESITE[i];
ds.Tables[0].Rows.Add(row);
i++;
}
}
CrystalReport41.SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = CrystalReport41;
} |
Partager