if (!IsPostBack)
{
MyReportLibrary.testReport myReport = new testReport();
myReport.setAdapter(myAdapter);
this.reportViewer.Report = myReport;
}
But the problem is, that by the page loading, the constructor of testReport (where other connectionstring and Select_SQL are defined) will be called the second time and the properties of
myReport.setAdapter(myAdapter)
will be lost.
Who calls (creates) the myReport again?
I suppose , that it is the reportViewer. The Viewer re-create the class myReport (actually testReport) and so myAdapter will be lost.
How can I set the Adapter outside of the Report ?
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.