WebReport control
Hi,
I created some reports with designer, and I am trying to use them in a web application.
On my page, I am changing my report with a comboBox. My problem is deleting previous report from viewer.
When I select a new report, I want to remove my report from viewer and when I press render button, I want to generate my report.
I tried Clear() and Delete() method to remove my report from viewer, but they didn't work.
private void ClearReportViewer()
{
rptViewer = null;
//rptViewer.Report.Clear();
//rptViewer.Report.Delete();
//rptViewer.ReportFile = "";
rptViewer.Prepare();
upReportViewer.Update();
}
<asp:UpdatePanel ID="upReportViewer" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<cc1:WebReport ID="rptViewer" runat="server" BackColor="White" Width="100%" Height="900px" Zoom="2">
</cc1:WebReport>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rptViewer" EventName="DataBinding" />
</Triggers>
</asp:UpdatePanel>
Is there any other way to delete report?
Thanks,
I created some reports with designer, and I am trying to use them in a web application.
On my page, I am changing my report with a comboBox. My problem is deleting previous report from viewer.
When I select a new report, I want to remove my report from viewer and when I press render button, I want to generate my report.
I tried Clear() and Delete() method to remove my report from viewer, but they didn't work.
private void ClearReportViewer()
{
rptViewer = null;
//rptViewer.Report.Clear();
//rptViewer.Report.Delete();
//rptViewer.ReportFile = "";
rptViewer.Prepare();
upReportViewer.Update();
}
<asp:UpdatePanel ID="upReportViewer" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<cc1:WebReport ID="rptViewer" runat="server" BackColor="White" Width="100%" Height="900px" Zoom="2">
</cc1:WebReport>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rptViewer" EventName="DataBinding" />
</Triggers>
</asp:UpdatePanel>
Is there any other way to delete report?
Thanks,