Try to search your question here, if you can't find : Ask Any Question Now ?

Crystal Report Viewer Prompt Database Logon Failed While Navigating Next Page

HomeCategory: stackoverflowCrystal Report Viewer Prompt Database Logon Failed While Navigating Next Page
Avatarrupesh asked 5 months ago

I tried to preview the crystal report by selecting values in dropdown list. It able to show 1st page without any problem. But when I tried to press Next Page button / typing in number of page, it will prompt out Database Logon Failed error.

I tried to google around about this issue and still unable to resolve the issue. Few threads similar to this issue I already go through but still no avail.

I inserted this logOnInfo function

        public void setLogonInfo()
            TableLogOnInfo logOnInfo = new TableLogOnInfo();
            logOnInfo.ConnectionInfo.ServerName = "servername";
            logOnInfo.ConnectionInfo.DatabaseName = "databasename";
            logOnInfo.ConnectionInfo.UserID = "user";
            logOnInfo.ConnectionInfo.Password = "pwd";

            TableLogOnInfos infos = new TableLogOnInfos();
            crystalReportViewer.LogOnInfo = infos;

I have Init() function too

        private void Page_Init(object sender, EventArgs e)
            reportDocument = (ReportDocument)Session["reportDocument"];
            crystalReportViewer.ReportSource = reportDocument;

Lastly, this is the display report function when I clicked Search button

        protected void DisplayReport() // display all value selected
            string customerID = this.ddwn_cust.SelectedValue;
            ReportDocument reportdocument = new ReportDocument();
            reportdocument.SetParameterValue("RepID", lblSalesRep.Text);
            reportdocument.SetParameterValue("CustomerID", lblcustomer.Text);
            reportdocument.SetParameterValue("ItemTypeID", txtItemType.Text);
            reportdocument.SetParameterValue("startdate", Convert.ToDateTime(txtStartDate.Text));
            reportdocument.SetParameterValue("enddate", Convert.ToDateTime(txtEndDate.Text));
            crystalReportViewer.ReportSource = reportdocument;

Yet, I still unable to get to the next page of the crystal report viewer.

Any solutions to this issue?

Thank you in advance!

1 Answers
Best Answer
Avatarnaveen answered 5 months ago
Your Answer

3 + 17 =

Popular Tags

WP Facebook Auto Publish Powered By :