Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
heyy...

I am using the SSRS report ..when I click navigation button after showing the report ( it is in one page) the next page navigation button is shown ..when i click it ..It shows following error
("page navigation is out of range")

How to solve this ...

I search a lot ...many of saying give

C#
if (IsPostBack)
                return;

But it won't work....

My Code is below..
XML
<rsweb:ReportViewer ID="rvPriceListDetails" BackColor="White"  runat="server" ProcessingMode="Remote"   Width="100%"  ZoomPercent="100" AsyncRendering="true">
         </rsweb:ReportViewer>


Code
-----

C#
private void InitializeReportCredentials()
       {
           string server = ConfigurationManager.AppSettings["ReportServer"];
           string reportpath = ConfigurationManager.AppSettings["ReportsFolder"];
           string username = ConfigurationManager.AppSettings["Username"];
           string password = ConfigurationManager.AppSettings["Password"];
           string Domain = ConfigurationManager.AppSettings["Domain"];
           rvPriceListDetails.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
           if (IsPostBack)
               return;

           rvPriceListDetails.ServerReport.ReportServerUrl = new System.Uri(server);
           rvPriceListDetails.ServerReport.ReportPath = string.Concat(reportpath, ReportName);
           rvPriceListDetails.ShowParameterPrompts = true;
           rvPriceListDetails.ServerReport.ReportServerCredentials = new ReportCredentials(username, password, Domain);
           rvPriceListDetails.ServerReport.Refresh();
           ReportParameter UserName = new ReportParameter("UserName", SessionManager.Current.UserObject.UserName);
           rvPriceListDetails.ServerReport.SetParameters(new ReportParameter[] { UserName });
       }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900