I am completely new to using VS reports but ive muddled my way through creating the RDLC and the report viewer.
我对使用VS报告完全不熟悉,但是我通过创建RDLC和报表查看器混淆了我的方式。
My question is I've set up the report to use a data source from an SP in the RDLC page, but as soon as I put the control in a panel so I can switch visibility on and off the control stops displaying????
我的问题是我已经设置了报告,以便在RDLC页面中使用来自SP的数据源,但是只要我将控件放在面板中,我就可以打开和关闭控件的可见性,停止显示????
in the source code of the failed page I can see...
在失败页面的源代码中我可以看到......
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client side framework failed to load.');
//]]>
</script>
I don't understand why being in a panel screws up the control
我不明白为什么在一个面板上搞砸了控制器
AHHHHH
AHHHHH
here is the code
这是代码
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Panel runat="server" ID="ReportHeaders" Visible="true">
<h2>Driver Lateness Report</h2><br />
<h3>Set Parameters</h3>
<br />
<br />
<center>
<asp:RadioButtonList ID="rbl_datechoice" runat="server">
<asp:ListItem Text="Yesterday"></asp:ListItem>
<asp:ListItem Text="Today"></asp:ListItem>
<asp:ListItem Text="DateRange" Enabled="false"></asp:ListItem>
</asp:RadioButtonList>
<br />
Select Site :-   <asp:DropDownList runat="server"></asp:DropDownList>
<br />
<br />
<asp:Button ID="btn_Run_Report" runat="server" OnClick="Btn_Run_Report_Click" Text="Run Report" /></center>
</asp:Panel>
<asp:Panel ID="ReportDetails" runat="server" Visible="false">
<table><tr><td>
<rsweb:ReportViewer ID="Rpt_Report" runat="server" Font-Names="Verdana"
Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
EnableTheming="True" ShowToolBar="False" ShowWaitControlCancelLink="False"
ShowZoomControl="False" style="margin-right: 0px" Width="917px">
<LocalReport ReportPath="Reports\Late\Lateness.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="SqlDataSource1" Name="DataSet1" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<div style="min-height:100px"/>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:CNS %>" SelectCommand="Rep_Lateness"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="siteid" Type="Int32" DefaultValue="1" />
<asp:Parameter Name="date" Type="String" DefaultValue="12-12-2014" />
</SelectParameters>
</asp:SqlDataSource>
</td></tr></table>
</asp:Panel>
</asp:Content>
Once I get this working I can get the params to pass into the SP properly in the Behind Code
一旦我开始工作,我可以让params在Behind Code中正确地传递给SP
Any one have any ideas?
有人有主意吗?
1 个解决方案
#1
0
If Anyone else comes across this, I could not find an answer so the only solution was to have 2 separate pages, one for params and another for the report.
如果有其他人遇到这个,我找不到答案,所以唯一的解决方案是有2个单独的页面,一个用于params,另一个用于报告。
#1
0
If Anyone else comes across this, I could not find an answer so the only solution was to have 2 separate pages, one for params and another for the report.
如果有其他人遇到这个,我找不到答案,所以唯一的解决方案是有2个单独的页面,一个用于params,另一个用于报告。