Wrox Programmer Forums
|
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2006, 03:38 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CrystalDecisions.CrystalReports.Engine.InternalExc

Hi Guys,
I am trying to generate a PDF file off a crystal report, when I run my web service via the code(by pressing F5" ) works fine, and the pdf gets generated, however once I publish and consule it using a client ASP.net page I get the following error

ERROR:
CrystalDecisions.CrystalReports.Engine.InternalExc eption: Failed to open a rowset.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
SQL State: 42000
Native Error:
Failed to open a rowset.


my code is listed below

            ReportComData oRepData = new ReportComData();
            oRepData.getReportID = szReportID;
            //getRepComData(oRepData);

            string szReportFileName = "Products.rpt"; //oRepData.getszRptFileName; //"OutbreakPredictReport.rpt";
            string szFileName = "REP" + DateTime.Now.ToString("ddMMyyyyhhmmss") + ".pdf";
            //--Initializing CrystalReport
            ReportDocument myReportDocument;
            myReportDocument = new ReportDocument();
            myReportDocument.Load(System.Web.HttpContext.Curre nt.Server.MapPath(szReportFileName));


            //--------- new
        // 'CrystalReport1' must be the name the CrystalReport
            TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
            ConnectionInfo crConnectionInfo = new ConnectionInfo();

            //Crystal Report Properties
            CrystalDecisions.CrystalReports.Engine.Database crDatabase;
            CrystalDecisions.CrystalReports.Engine.Tables crTables;
           // CrystalDecisions.CrystalReports.Engine.Table crTable;

            crConnectionInfo.ServerName = "bandicoot.cs.rmit.edu.au";
            crConnectionInfo.Type = ConnectionInfoType.SQL;
            crConnectionInfo.DatabaseName = "DPI";
            crConnectionInfo.IntegratedSecurity=true;
            crConnectionInfo.UserID = "RMITCS\\hkoidtuw";
            crConnectionInfo.Password = "monday";
            crDatabase = myReportDocument.Database;
            crTables = crDatabase.Tables;

            foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
            {
                crTableLogOnInfo = crTable.LogOnInfo;
                crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
                string strTableLoc = crTable.Location.Substring(crTable.Location.LastIn dexOf(".") + 1) ;
                crTable.Location = crConnectionInfo.DatabaseName + ".dbo." + strTableLoc;
                crTable.ApplyLogOnInfo(crTableLogOnInfo);
            }
          -----

            myReportDocument.SetParameterValue(0, iFarmID);
            myReportDocument.SetParameterValue(1, FromDate);
            myReportDocument.SetParameterValue(2, toDate);



Your help is greatly appriciated






Similar Threads
Thread Thread Starter Forum Replies Last Post
CrystalDecisions.CrystalReports.Engine.LogOnExcept narendra_patil Crystal Reports 0 May 11th, 2006 01:06 AM
CrystalDecisions.CrystalShared.dll ISSUE Joko Purnomo .NET Web Services 0 March 22nd, 2005 01:19 AM
CrystalDecisions.CrystalReports.Engine.DataSourceE vineee BOOK: Professional Crystal Reports for VS.NET 0 September 8th, 2004 02:03 AM
CrystalDecisions.CrystalReports.Engine.LogOnExcept vineee Crystal Reports 0 September 6th, 2004 04:53 AM
CrystalDecisions.CrystalReports.Engine.DataSourceE suresh_mogrampalli BOOK: Professional Crystal Reports for VS.NET 2 July 5th, 2004 12:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.