cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I am having a trouble with two of the 6 reports that I have created. I am using Crystal XI and Oracle 10g. The underlying database object is a stored procedure that accepts as input a start time as a TIMESTAMP, an end time as a TIMESTAMP and a furnace number as a number. I have a cursor ref as a return parameter.

When I run the stored procedure in Oracle I get the selected records and can view them on the screen.

When I refresh data on the report in Crystal XI developer, the designer asks me for the start and end time and furnace number. When I input these values the report displays properly.

When I launch the report from my VB .NET 2005 application I am asked for the username and the password for the database (this is another problem I need to solve as this information I put into the program seems to be ignored in my program) then I receive the following failure message:

Failure to retrieve data from the database (Vendor Code 6550)

When I launch the other reports, they only ask me for the username and password then they display the proper data.

The main difference between my other reports and the two that are returning the above failure code is that the other reports are to either tables or views. The two that don't work are tied to stored procedures. I there any way that I can solve this problem or at least get more information?

Any help would be greatly appreciated. Let me know if you need any other information.

0 Likes
View Entire Topic
Former Member
0 Likes

I have a similar problem, the only difference is that the crystal report error is only thrown when I try to load the sub reports at my web application. When I deploy my report to the Web application the main report loads up fine but when I try to launch the sub reports from the main report it can no longer load.

But when I use the Crystal report developer I am able to load the main report and it's associated sub reports without any issues.

My issue only occurs when I try to load the sub report in the web application. The following sections shows how my reports look like both in my .NET web application and also at the Crystal Report Development IDE.

Failure: Loading my Reports from .NET Web Application

1) When I load from the web application I am able to load the main report as per the print screen below.

2) When I try to click on the hyper links to enter the sub reports I am now able to load them, both sub reports cannot load and will throw the same error "

Failed to retrieve data from the database. Details: [Database Vendor Code:

6550 ] Failed to retrieve data from the database. Details: [Database Vendor

Code: 6550 ] Failed to retrieve data from the database. Error in File OAWR3011A

{CEC8A94A-4490-4640-95FB-2739A679978B}.rpt: Failed to retrieve data from the

database. Details: [Database Vendor Code: 6550 ] "

Success: Loading my Reports from Crystal Report Development Tool

1) This is my Main Report Loaded from the Crystal Report Development Tool, the first two hyperlinked fields are links to my sub reports, step number 2 and number 3 shows my sub reports when I load it using Crystal Report Developer

2) Sub Report 1 Loaded Successfully, when I click on the fields in the first link

3) Sub Report 2 loaded successfully when I click the second field hyper link

Former Member
0 Likes

I have tried "Don Williams suggestion on Aug 26, 2008 11:43 PM" to export the Main report that is loadable from the web application into an RPT file and opening the same RPT file on the Crystal Report Development tool.

I am able to open the main report as per the print screen below:-

From the Crystal Report Development Tool, I click on the refresh button and was prompted for log in credentials to the database, I keyed in the credentials accordingly and the data was re queried.

The next thing I try to do is to sub report by clicking on the hyperlink to the sub report hyper link that is as marked by the previous print screen. But I was prompted for another Database Log in Credential Screen, that is so wired, I already keyed it in for the first time.

This is not suppose to happen because both the main report and the sub report queries from the same Oracle database. I tried to key in the credentials but the DB log in screen jut keep popping up without loading the sub reports as per the print screen.

0 Likes

Hi Kian,

Not the same issue... CR makes a separate connection for EACH subreport.

Code is not complete but you get the idea.... loop through all the sections looking for subreports and set the log on info, same as the main report:

//loop through all the sections to find all the report objects
foreach (CrystalDecisions.CrystalReports.Engine.Section crSection in crSections)
{
    crReportObjects = crSection.ReportObjects;
    //loop through all the report objects to find all the subreports
    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject crReportObject in crReportObjects)
    {
        if (crReportObject.Kind == ReportObjectKind.SubreportObject)
        {
            //you will need to typecast the reportobject to a subreport
            //object once you find it
            crSubreportObject = (CrystalDecisions.CrystalReports.Engine.SubreportObject)crReportObject;
            string mysubname = crSubreportObject.SubreportName.ToString();

            //open the subreport object
            crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);

            //set the database and tables objects to work with the subreport
            crDatabase = crSubreportDocument.Database;
            crTables = crDatabase.Tables;
            tableIndex = 0;
            bool SecureDB;

            //loop through all the tables in the subreport and
            //set up the connection info and apply it to the tables
            foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
            {   // check if integrated security is enabled
                SecureDB = crSubreportDocument.Database.Tables[tableIndex].LogOnInfo.ConnectionInfo.IntegratedSecurity;
                string TableName = crTable.Name.ToString();
                tableIndex++;
                crConnectioninfo.ServerName = "VMW2K8CRSE2K8";
                //if (!SecureDB)
                {
                    crConnectioninfo.UserID = "sa";
                    crConnectioninfo.Password = "PW";
                    crConnectioninfo.DatabaseName = "QTYLTD";
                }

                    crTableLogOnInfo = crTable.LogOnInfo;
                    crTableLogOnInfo.ConnectionInfo = crConnectioninfo;
                    crTable.ApplyLogOnInfo(crTableLogOnInfo);
            }
        }
    }
}

rpt.VerifyDatabase();

Former Member
0 Likes

Dear Don,

Thank you so much for your prompt response, I have forwarded your recommendation to our .NET web application vendor, the .NET web application is actually owned externally by a vendor, we don't have access to the codes, what we do is just created custom reports from CR and plug it in to their .NET web application, I have forwarded you code snippet to them, we are now awaiting their response. There are from UK and our time zone differences would mean that they will only respond in about 7 to 8 hours time.