WebReport control

edited August 2011 in FastReport .NET
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,

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.