Thank you for your reply,
For the first part of your advise that is not to use FetchData event, what I did was I replaced datareader instance within ReportStart as you said.
private void NewActiveReport2_ReportStart(object sender, EventArgs e)
{
DataAccess print_reader = new DataAccess
ok = print_reader.executar_re(strKomut);
this.DataSource = print_reader;
Fields["PERIOD"].Value = ok[0].ToString();
Fields["ID"].Value = ok[1].ToString();
Fields["NAME"].Value = ok[2].ToString();
Fields["LASTNAME"].Value = ok[3].ToString();
}
and it worked. But the rest of the advise can you elaborate further. Suppose I don't use the datalayerclass and use AR for sql query, 1-where do I put "this.DataSource.ConnectionString = "select id, period, name, lastname from per015_ssk where id='<%PerID|Enter PER ID|100>' "; "
2-where do I put "myReportObject.Parameters["PerID"].Value = "some value"; ". Is it the mainform ? Can I have a small sample of what you are advising. I like to find most appropriate and professional way of using AR, so open to any idea that helps.
Thanks
snky
Reputation Points: 4
Solved Threads: 0
Junior Poster in Training
Offline 78 posts
since May 2009