I have a report library like the best practice, have a report in a dll.
the sql i have programatically code in with some params supposed to be keyed in by the user. at the first time when the report is shown, there is no problem. but the moment i press a button and update the params, the whole report give me an blank report.
so i tried having a button but not do anything. pressing the button gives me the same problem. i think the moment there is a postback, the report goes blank. i have no idea what is wrong. would be very grateful if someone can help me with this.
this is my ascx.cs file.
protected void Page_Load(object sender, EventArgs e)
{
ReportViewer1.Report = new LibUserReport();
}
protected void Button1_Click1(object sender, EventArgs e)
{
Label1.Text = "Datasource is null";
}
this is my ascx file
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table width="500">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Designation"></asp:Label>
<asp:TextBox ID="tbDesignation" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Preview" OnClick="Button1_Click1" />
</td>
</tr>
<tr>
<td>
<telerik:ReportViewer ID="ReportViewer1" runat="server" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>