visible=false
我的报表查看器有问题。如果我在事件按钮单击时将报表查看器设置为page_load 页面,如果我已经设置为visible=true
,它仍然是报表查看器visible= false
。谁能帮我解决这个问题?还是有任何其他解决方案..我在 aspx 页面中有 2 个报告查看器,我需要其中一个visible=false
在 page_load 中。这是代码..谢谢你
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDdlCountryValue();
ReportViewer_TotalCountry.Visible = false;
}
protected void btnViewReport_Click2(object sender, EventArgs e)
{
ReportViewer_TTFSSummaryBasedOnCountry.LocalReport.Refresh();
ReportViewer_TTFSSummaryBasedOnCountry.Visible = true;
ReportViewer_TotalCountry.Visible = false;
}
protected void btn_AllCountry_Click(object sender, EventArgs e)
{
ReportViewer_TotalCountry.LocalReport.Refresh();
ReportViewer_TTFSSummaryBasedOnCountry.Visible = false;
ReportViewer_TotalCountry.Visible = true;
}
如您所见,当我单击btn_AllCountry_Click
;
ReportViewer_TotalCountry.Visible = true
生病仍然可见=假 :(
帮帮我..我是这个报告的新手:'(
<div>
<rsweb:ReportViewer ID="ReportViewer_TTFSSummaryBasedOnCountry" runat="server" Font-Names="Verdana" Font-Size="8pt"
InteractiveDeviceInfos="(Collection)" SizeToReportContent="True" WaitMessageFont-Names="Verdana" 6WaitMessageFont-Size="14pt" >
<LocalReport ReportPath="RDLC\TTFSSummaryBasedOnCountry_Report.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource_TTFSSummaryBasedOnCountry"
Name="TTFSSummaryBasedOnCountry_DataSet" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource_TTFSSummaryBasedOnCountry"
runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetData"
TypeName="IMP_report.ttfsListTableAdapters.TTFSSummaryBasedOnCountryTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList_Country" Name="CountryName"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<div id="TotalCountry" align="center" >
<rsweb:ReportViewer ID="ReportViewer_TotalCountry" runat="server" Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" SizeToReportContent="True" >
<LocalReport ReportPath="RDLC\TTFSSummaryBasedOnCountry_Report.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource_ttfsSummaryTotalCountry"
Name="TTFSSummaryBasedOnCountry_DataSet" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource_ttfsSummaryTotalCountry"
runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetData"
TypeName="IMP_report.ttfsListTableAdapters.TTFSSummaryBasedOnCountryTotalTableAdapter">
</asp:ObjectDataSource>
</div>