Oct 07, 2014, 8:06 AM
Reportviwer inside window not working but in fresh asp.net page working
Reportviwer control not working if i place inside the window
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Window
ID="formWindow"
runat="server"
Height="500"
Title="Customer Master"
ShowOnLoad="true"
CenterOnLoad="true"
Resizable="true"
Closable="false"
MinWidth="800"
Width="800"
Layout="Fit"
Padding="2"
Maximized="True">
<Items> <ext:Label ID="Label1" runat="server" Text=""></ext:Label></Items>
<Content>
<ajaxToolkit:ToolkitScriptManager runat="server" ID="scriptmgm1">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=272931&clcid=0x409 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="jquery.ui.combined" />
<asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table style="width: 98%">
<tr>
<td>
<asp:Button ID="btndelete" runat="server" CssClass="btnalign" Text="Delete" OnClientClick="return deleteRecord();" />--%>
<ext:Button ID="btnPrint" runat="server" Text="Print" Icon="Printer" Cls="btnalign" StyleSpec="float:left; " >
</ext:Button>
<ext:Button ID="btnExport" runat="server" Text="Export" Icon="PageExcel" Cls="btnalign" StyleSpec="float:left; " />
<ext:Button ID="btnCancel" runat="server" Text="Cancel" Icon="Cancel" Cls="btnalign" StyleSpec="float:left; " />
</td>
<td style="width: 30%;">
</td>
<td style="width: 20%">
</td>
</tr>
</table>
<fieldset >
<legend>List of Accounts
</legend>
<div style="height: 450px; margin-left: auto; margin-right: auto; overflow: auto; width: 100%;">
<%-- Session Report Input --%>
<section style="background-color: #D0DEF0; float: left; height: 450px; overflow: auto; width: 20%;">
<table class="rpt_input" >
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text="Account Type" ></asp:Label>
</td>
<td><asp:DropDownList ID="DropDownList1" runat="server" Width="100"/></td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
</table>
<table class="btn_input">
<tr>
<td>
<ext:Button ID="btnReport" runat="server" Text="Show" Icon="Report" Cls="btnalign" StyleSpec="float:left; " >
<DirectEvents>
<Click OnEvent="BtnShowReport" >
<EventMask ShowMask="true" Msg="Verifying..." MinDelay="1000" />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button4" runat="server" Text="Clear" Icon="PrinterCancel" Cls="btnalign" StyleSpec="float:left; " />
</td>
<td></td>
</tr>
</table>
</section>
<%-- Session Report Control --%>
<section style="float: left; height: 100%; width: 60%;">
<rsweb:ReportViewer ID="ReportCOA" runat="server"></rsweb:ReportViewer>
</section>
</div>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
</Content>
</ext:Window>
</form>
var dtCoaReport = new DataTable();
int branchId = 0;
//ReportCOA.Reset();
//ReportCOA.LocalReport.Refresh();
dtCoaReport = new ClsCoaBal().GetChartofAccounts(branchId);
var reportDataSource = new ReportDataSource("rptCOA", dtCoaReport);
ReportCOA.LocalReport.ReportPath = "UI/Reports/Reportfile/rpt_ChartofAccounts.rdlc";
ReportCOA.LocalReport.DataSources.Add(reportDataSource);
ReportCOA.LocalReport.Refresh();
this.ReportCOA.Update();