cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to open connection database vendor code-17 error appear when navigate to next page?

Former Member
0 Kudos

Hi.

An ASP application i s created with few reports. All reports are working fine even it configure to the server. The issue is when the report having more than one page user cant able to navigate to next page of the report. when generate the report  opening fine but not able to navigate to next page.

Please do the needful..

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi,

Need more info.

- Version of CR

- Version VS

- Exact error message.

- Does the app work on dev machine?

- Does the report work in CR designer?

Thanks,

Bhushan

Former Member
0 Kudos

Version of CR-13.0

Version VS-2010

Exact error message-

Failed to open the connection.

Details:  Database Vendor Code: 17

Failed to open the connection.

Does the app work on dev machine?-Yes

Does the report work in CR designer?-Yes

When the report is one page its working fine. But when the report more than one page first page only can able to visible,cant able to navigate to next page. And when try to export to Pdf, there also shows same error.

former_member183750
Active Contributor
0 Kudos

The error code is being passed directly from the DB client through the CR database engine, unmodified. E.g.; check your DB documentation.

In my experience the issue is typically an incorrect DB client so compare the one on your dev system to the deployed system.

I suspect you are using MS SQL, so:

For OLE DB then use:

MS SQL 2005 - OLE DB Provider

MS SQL 2008 - SQL Native 10

MS SQL 2013 - SQL Native 11

For ODBC then use:

MS SQL 2005 - SQL Native

MS SQL 2008 - SQL Native 10

MS SQL 2013 - SQL Native 11

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

0 Kudos

Hello,

How are you connecting to your database, ODBC, OLE DB or Native client?

What DB are you using?

32 or 64 bit AppPool?

Is the client for that platform installed?

Are you keeping the report in Session?

If not do it this way:

rd.FileName = url;

if (Session ["rd"] == null)

{

    try

    {

        rd.Load(url, OpenReportMethod.OpenReportByTempCopy);

        Session.Add("rd", rd);

}

finally

    {

    // open the database connection

    }

}

CrystalReportViewer1.ReportSource = Session["rd"];

Don

Former Member
0 Kudos

Hi Don,

How are you connecting to your database, ODBC, OLE DB or Native client?- OLE DB

What DB are you using? MS SQL

32 or 64 bit AppPool? 32 bit

Is the client for that platform installed? Yes

Are you keeping the report in Session? No

Here is the my coding to connect to the report...

  protected void mdlbtn_Click(object sender, EventArgs e)

    {

        ReportDocument cr = new ReportDocument();

        cr.Load(Server.MapPath("~/Reports/MODEL.rpt"));

        TableLogOnInfo logOnInfo = new TableLogOnInfo();

        ConnectionInfo coninfo = new ConnectionInfo();

        coninfo.ServerName = ConfigurationManager.AppSettings["strServer"].ToString();

        coninfo.DatabaseName = ConfigurationManager.AppSettings["strDBase"].ToString();

        coninfo.UserID = ConfigurationManager.AppSettings["strUID"].ToString();

        coninfo.Password = ConfigurationManager.AppSettings["strPWD"].ToString();

        coninfo.Type = ConnectionInfoType.SQL;

        TableLogOnInfo login = default(TableLogOnInfo);

        for (int i = 0; i < CrystalReportViewer8.LogOnInfo.Count; i++)

        {

            foreach (CrystalDecisions.CrystalReports.Engine.Table tbl in cr.Database.Tables)

            {

                login = tbl.LogOnInfo;

                login.ConnectionInfo = coninfo;

                tbl.ApplyLogOnInfo(login);

                cr.SetParameterValue("Model", mdl.Text);

                CrystalReportViewer8.ReportSource = cr;

            }

        }

    }

is this the correct way to connect to report, while move to second page only that error message shows.

Answers (0)