[Crystal Reports 2008] - Logon failed in SAP system

Hi everybody,
I have installed on my notebook Crystal Reports 2008 trial version and the Integration Kit for SAP Solutions that I found on this web page: https://boc.sdn.sap.com/node/18962
When I try to open a SAP Data Source, Crystal Reports finds the connections I have in my SAPLogon and ask me credential infos. I get the following credential error:
"You do not have the necessary rights to design reports against the SAP System"
The user I enter has full administration right on the system, which is a SAP R/3 Enterprise.
Thanks,
Valerio

Hello Valerio,
Please make sure you install the corresponding transports for the Driver you are trying to use in Crystal Reports.
The transports are available on the SAP Integration Solution CD.
thanks
Mike

Similar Messages

  • Export from Crystal Reports 2008 viewer fails if run on separate thread

    I have a windows desktop application written in Visual Basic using Visual Studio 2008.  I have installed and am trying Crystal Reports 2008 to run a report.  Everything seems to work well except that when I preview a report (using the viewer control) and click the export button found in the upper left corner of that control, I get the following message:
    Error 5: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.  Ensure that your Main function has STAThreadAttribute marked on it.  This exception is only raised if a debugger is attached to the process.
    I am a little confused on what to do exactly.  Is the problem because I am running in the Visual Studio 2008 IDE?  It says this exception is only raise if a debugger is attached to the process.  No, I tried running it outside the IDE.  The exception wasn't generated but the application hung when the button was clicked.
    It says the current thread must be set to single thread apartment (STA) mode.  If the report is run on its own thread, is the "current" thread the thread the report is running on or is the main application's UI thread?  I don't think I want to set my main application to single thread apartment mode because it is a multi-threaded application (although I really don't know for sure because I am new to multi-threaded programming). 
    My objective is to allow reports to run asynchronously so that the user can do other things while it is being generated.  Here is the code I use to do this:
        ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim backgroundProcess As System.ComponentModel.BackgroundWorker
            ' Start a new thread to run this report.
            backgroundProcess = New System.ComponentModel.BackgroundWorker
            Using (backgroundProcess)
                ' Wire the function we want to run to the 'do work' event.
                AddHandler backgroundProcess.DoWork, AddressOf PreviewReportAsynch_Start
                ' Kick off the report asynchronously and return control to the calling process
                backgroundProcess.RunWorkerAsync(sourceDatabase)
            End Using
        End Sub
        Private Sub PreviewReportAsynch_Start(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
            ' The source database needed to call preview report was passed as the only argument
            Call PreviewReport(CType(e.Argument, clsMainApplicationDatabase))
        End Sub
        ' Previews the report.  From the preview window, the user can print it.
        Public Function PreviewReport(ByVal sourceDatabase As clsMainApplicationDatabase) As FunctionEndedResult
            Dim errorBoxTitle As String
            Dim frmPreview As frmReportPreview
            ' Setup error handling
            errorBoxTitle = "Preview " & Name & " Report"
            PreviewReport = FunctionEndedResult.FAILURE
            On Error GoTo PreviewError
            ' Set up the crxReport object
            If InitializeReportProcess(sourceDatabase) <> FunctionEndedResult.SUCCESS Then
                GoTo PreviewExit
            End If
            ' Use the preview form to preview the report
            frmPreview = New frmReportPreview
            frmPreview.Report = crxReport
            frmPreview.ShowDialog()
            ' Save any settings that should persist from one run to the next
            Call SavePersistentSettings()
            ' If we got this far everything is OK.
            PreviewReport = FunctionEndedResult.SUCCESS
    PreviewExit:
            ' Do any cleanup work
            Call CleanupReportProcess(sourceDatabase)
            Exit Function
    PreviewError:
            ' Report error then exit gracefully
            ErrorBox(errorBoxTitle)
            Resume PreviewExit
        End Function
    The variable crxReport is of type ReportDocument and the windows form called 'frmPreview' has only 1 control, the crystal reports viewer. 
    The print button on the viewer works fine.  Just the export button is failing.  Any ideas?

    Hi Trevor.
    Thank you for the reply.  The report document is create on the main UI thread of my application.  The preview form is created and destroyed on the separate thread.  For reasons I won't get into, restructuring the code to move all the initialization stuff inside the preview form is not an option (OK, if you a really curious, I don't always preview a report, sometimes I print and/or export it directly which means the preview form isn't used).
    What I learned through some other research is that there are some things (like COM calls and evidently some OLE automation stuff) that cannot be run on a thread that uses the MTA threading model.   The export button probably uses some of this technology, thus the message stating that an STA threading model is required.  I restructured the code as follows to accomodate this requirement.  Here is a sample:
    ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim staThread As System.Threading.Thread
            ' Start the preview report function on a new thread
            staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep1)
            staThread.SetApartmentState(System.Threading.ApartmentState.MTA)
            staThread.Start(sourceDatabase)
        End Sub
        Private Sub PreviewReportAsynchStep1(ByVal sourceDatabase As Object)
            Dim staThread As System.Threading.Thread
            ' Initialize report preview.  This includes staging any data and configuring the
            ' crystal report document object for use by the crystal report viewer control.
            If InitializeReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase)) = FunctionEndedResult.SUCCESS Then
                ' Show the report to the user.  This must be done on an STA thread so we will
                ' start another of that type.  See description of PreviewReportAsynchStep2()
                staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep2)
                staThread.SetApartmentState(System.Threading.ApartmentState.STA)
                staThread.Start(mcrxReport)
                ' Wait for step 2 to finish.  This blocks the current thread, but this thread
                ' isn't the main UI thread and this thread has no UI anymore (the progress
                ' form was closed) so it won't matter that is it blocked.
                staThread.Join()
                ' Save any settings that should persist from one successful run to the next
                Call SavePersistentSettings()
            End If
            ' Release the crystal report
            Call CleanupReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase))
        End Sub
        ' The preview form must be launched on a thread that use the single-threaded apartment (STA) model.
        ' Threads use the multi-threaded apartment (MTA) model by default.  This is necessary to make the
        ' export and print buttons on the preview form work.  They do not work when running on a
        ' thread using MTA.
        Public Sub PreviewReportAsynchStep2(ByVal crxInitializedReport As Object)
            Dim frmPreview As frmReportPreview
            ' Use the preview form to preview the report.  The preview form contains the crystal reports viewer control.
            frmPreview = New frmReportPreview
            frmPreview.Report = DirectCast(crxInitializedReport, ReportDocument)
            frmPreview.ShowDialog()
        End Sub
    Thanks for your help!
    Andy

  • Crystal Reports 2008 Loading Failed Error in Windows 7

    Hi,
    We are using Crystal Reports 2008 in our application. These are working fine in XP Professional OS. But the Same code is not working in Windows 7 operating system. When I debug, I found report Load is failing. Error is at below line of code.
    CR.Load( "D:\Sample_Win7.rpt", OpenReportMethod.OpenReportByTempCopy)  ' CR is Report Document
    Can any one suggest me, what settings are required in Win 7 OS to get out of this issue.
    Thanks inadvance,
    Kiran

    Hi,
    Thanks for the reply. Here is the exact issue description.
    CrystalDecisions.Shared.CrystalReportsException was caught
      Message="Load report failed."
      Source="CrystalDecisions.CrystalReports.Engine"
      StackTrace:
           at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod)    at SampleReportInWin7.Form1.Button1_Click(Object sender, EventArgs e) in D:\Brookledge SW\SampleReportInWin7\Form1.vb:line 22
      InnerException: System.Runtime.InteropServices.COMException
           ErrorCode=-2147467259
           Message="The system cannot find the path specified. "
           Source="Analysis Server"
           StackTrace:
                at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
           InnerException:
    Thanks for your time,
    Kiran

  • Crystal report database logon failed through ODBC in report

    Please see viewpage.cs in type = "FPR"  in my web application
    https://sourceforge.net/projects/aspchequesprint/
    is it my program code problem ?
    i edited as following also not work, when i update with crystal report 2008 sp1 it said version is too low
                    TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();
                    for (int i = 0; i < objRpt.Database.Tables.Count - 1; i++)
                        crTableLogonInfo.ConnectionInfo.ServerName = "Cheque";
                        crTableLogonInfo.ConnectionInfo.DatabaseName = database_name;
                        crTableLogonInfo.ConnectionInfo.UserID = "sa";
                        crTableLogonInfo.ConnectionInfo.Password = "fa920711";
                        objRpt.Database.Tables<i>.ApplyLogOnInfo(logOnInfo);
                    TableLogOnInfos crTableLogonInfos = new TableLogOnInfos();
                    crTableLogonInfos.Add(crTableLogonInfo);
                    CrystalReportViewer1.LogOnInfo = crTableLogonInfos;

    can not load database info after edit the code in above link
    i use p2sodbc.dll it said can not load database info,
    error at objRpt.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);
    is the code correct?
    public partial class _Default : System.Web.UI.Page
            private ReportDocument objRpt = null;
            protected void Page_Unload(object sender, EventArgs e)
                if (this.objRpt != null)
                    this.objRpt.Close();
                    this.objRpt.Dispose();
            protected void Page_Load(object sender, EventArgs e)
                CrystalReportViewer1.HasToggleGroupTreeButton = false;
                CrystalReportViewer1.HasToggleParameterPanelButton = false;
                CrystalReportViewer1.HasPrintButton = true;
                CrystalReportViewer1.HasDrilldownTabs = false;
                CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
                CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.ActiveX;
                string database_name = "Cheque_Test";
                string odbc_name = "Cheque";
                string db_username = "martinhylee";
                string db_password = "fa920711";
                objRpt = new ReportDocument();
                string reportPath = @"C:\michael\access_test\Cheque\Ada\Reports\Report1_85.rpt";
                objRpt.Load(reportPath, OpenReportMethod.OpenReportByTempCopy);
                //'Create a new Stored Procedure Table to replace the reports current table.
                CrystalDecisions.ReportAppServer.DataDefModel.Procedure boTable = new CrystalDecisions.ReportAppServer.DataDefModel.Procedure();
                //'boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
                PropertyBag boMainPropertyBag = new PropertyBag();
                //'boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
                //'In the main property bag (boMainPropertyBag)
                PropertyBag boInnerPropertyBag = new PropertyBag();
                //'Set the attributes for the boInnerPropertyBag
                boInnerPropertyBag.Add("Connect Timeout", "15");
                //boInnerPropertyBag.Add("Data Source", "MyDataSource");
                boInnerPropertyBag.Add("Data Source", odbc_name);
                boInnerPropertyBag.Add("DataTypeCompatibility", "0");
                boInnerPropertyBag.Add("General Timeout", "0");
                //boInnerPropertyBag.Add("Initial Catalog", "MyCatalog");
                boInnerPropertyBag.Add("Initial Catalog", database_name);
                boInnerPropertyBag.Add("Integrated Security", "False");
                boInnerPropertyBag.Add("Locale Identifier", "1033");
                boInnerPropertyBag.Add("MARS Connection", "0");
                boInnerPropertyBag.Add("OLE DB Services", "-5");
                boInnerPropertyBag.Add("Provider", "SQLNCLI");
                boInnerPropertyBag.Add("Tag with column collation when possible", "0");
                boInnerPropertyBag.Add("Trust Server Certificate", "0");
                boInnerPropertyBag.Add("Use Encryption for Data", "0");
                //'Set the attributes for the boMainPropertyBag
                //boMainPropertyBag.Add("Database DLL", "crdb_ado.dll");
                boMainPropertyBag.Add("Database DLL", "p2sodbc.dll");
                boMainPropertyBag.Add("QE_DatabaseName", "VEPILOT");
                boMainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
                //'Add the QE_LogonProperties we set in the boInnerPropertyBag Object
                boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
                boMainPropertyBag.Add("QE_ServerDescription", "MyServer");
                boMainPropertyBag.Add("QE_SQLDB", "True");
                boMainPropertyBag.Add("SSO Enabled", "False");
    Edited by: Don Williams on Jul 12, 2011 8:47 AM

  • Crystal Reports 2008 installation fails

    I recently re-installed Windows XP SP3 on my laptop and need to re-install Crystal Reports 2008.
    I place the installation CD into the drive and the Auto-run application starts up and asks for the language to install.
    I select English and click on the Install button.
    After about 10 seconds I get a very cryptic error message.
    Crystal Reports 2008 Setup Error
    Crystal Reports Setup 2008 has failed.
    If the problem persists, please contact Business Objects Product Support.
    Any help in this matter would be greatly appreciated.
    Edited by: Truper on Feb 9, 2010 1:58 PM

    It's likely a dependency issue. Make sure the .NET frame 1.1 and 2.0 are installed. GO to Microsofts site or possibly they are an option in the update page.
    Thank you
    Don

  • Crystal Report 2008 Installation Failed - Registering modules

    HI Folks
    I'm trying to install Crystal Report 2008 on XP Pro SP2. The installation stop on Registering Modules, even if I click Cancel,
    it does not do anything it just hang there. I have to kill the process in Task Manager. If I restarted the installation,
    it says that I have already an installtion process running. So I have to reboot and then restart the installation,
    now it says that it will continue a previous uncompleted installation. But it hangs again at Registering Modules.
    It does not even stop at the same file. I have done this process several time with always the same result.
    Each time it stops on a different file but always during the Registering Modules process.
    By
    Arivalagan s

    As well as that make sure you are a local PC administrator or belong to that group. Also check Microsoft's site to make sure you have the latest Microsoft Installer. I believe there is a test tool to check your PC.
    Do you know what version of CR 2008 you have? There should be a ProductId.txt file to confirm the version. SP 3 should fully support DEP so if you don't have it download it from this [link|https://smpdl.sap-ag.de/~sapidp/012002523100009989492010E/cr2008_sp3_fullbuild.zip].
    Then it should get past Microsoft's security. If it's your Anti-V as Stratos suggests then only option is to disconnect from the network and disable it, install and the reconnect.
    The other common registration issue is due to missing dependencies or possibly updated dependencies that CR found but can't use. Some of our dependencies are specific versions.
    Thank you
    Don

  • Problem in Crystal Report 11 Logon failed Vendor Code 4060- Please help

    We are using VB 6.0 as front end, SQL 2005 Express edition as a data base server back end and crystal report 11 as reporting tool on Windows XP with SP2. The problem is, In the local system where DB exits the report generates fine. But if DB in network system the report will not work and it will ask for connection information (Provide necessary information to Logon to the chosen data source). We are using ODBC to connect the report. And if we give the correct password the report will generate
    I have checked all your help file and sample code but solution not found. please help as soon as possible
    Regards
    Karthik

    Hi Karthik,
    Ensure the report is using the correct connection information. For example, the data source name, server name, database name, and user name are correct.
    In a database-client test tool, ensure that the fields, tables, and procedures used by the report exist and that SQL queries can be executed against them.
    In the Crystal Reports designer, verify that the SQL query, as shown under the Database menu Show SQL Query option, does not contain syntax errors.
    If the SQL query shown in Crystal Reports is valid, execute the same SQL query through a database-client test tool.
    Is report working fine in designer?
    Which database connection are you using?
    Regards,
    Shweta

  • SBO Crystal Report 2008 Add-on on 64bit Windows 2008 Server

    Dear Friend,
    Do you have any experience on installing SBO Crystal Report 2008 Add-on with SAP B1 2007 B on 64bit Windows 2008 Server (SBS)? Could you please explain the exact reason for the following error on installation of the add-on on its final stage?
    Retrieving the COM class factory for component with CLSID {3E...} failed due to the the following error: 80040154

    [crystal report integration for SAP Business One|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/707f51b3-0b20-2b10-8daa-d8ee72ace309 [original link is broken]] version v2.0.0.7
    [Run time Download|https://smpdl.sap-ag.de/~sapidp/012002523100009351352008E/crruntime_120_mlb.msi]
    Thanks
    Krish

  • Crystal Report 2008 Runtime License

    Hi,
    I have a Crystal Report 2008 designer license.
    I want to design reports and distribute to my clients.
    Clients will just execute the reports through my application with the Crystal Report 2008 Runtime.
    There is runtime available on:
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm
    While installing the runtime it does not ask for any license key.
    my query is do we require any license to use the Crystal Report 2008 Runtime?
    Can we install the same runtime on web servers so that multiple clients can use it.
    Do we require any license for the Runtime on server?
    Thanks,
    Abhijit

    Hi Thanks for the reply.
    Just to make it sure is that means?
    1. Crystal Report 2008 Runtime is free for the client applications.
    2. Crystal Report 2008 Runtime requires the 'SAP Crystal Reports runtime server license' to use the runtime on server applications.
    Is it correct.
    Thanks,
    Abhijit

  • Crystal Reports V8.5から.Crystal Reports 2008へのレポートファイルのコンバート

    現在、Crystal Reports V8.5から、Crystal Reports 2008へバージョンアップをしています。
    Crystal Reports V8.5で作成した定義を、Crystal Reports 2008で実行した際に
    データソースの保存場所の設定が、V8.5と2008の間で変わった(と思っています)為
    帳票出力出来ません。
    V8.5の定義では、以下のようにデータソースのパスを指定しています。
    レポート
    |-XXXX.DBF
     |-プロパティ
       |-データベースタイプ:xBase
       |-サーバータイプ:pdbxbse.dll
       |-サーバー名:XXXX.DBF
    ◆メニューバーのデータベース -> データベースの照合 -> データソースの保存場所の設定 -> プロパティのデータベースパスをレポートと同一にする -> レポートファイルを上書き保存
    上記作業を行うと、Crystal Reports 2008でもデータソースを正しく見る事が出来るようになるのですが、
    いかんせんレポートファイルが100本近くあるので手作業で1つ1つ行っていくのが手間です。
    このコンバート作業について、SAP社からユーティリティなどはリリースされていますか?
    ダウンロードサイトは確認しましたが、見つけられてはいません。。。
    また、ユーティリティが無ければ、このコンバート作業をバッチプログラムなどで行いたいと考えています。
    どなたかバッチプログラムを作られた方いらっしゃいますか?それとも、バッチプログラムでの作業は無理なのでしょうか?

    Hi Again,
    That is very strange, almost like a pop up blocker is enabled.
    All I can suggest is to use ProcessMonitor and look for Access Denied errors to see if that helps, likely some security setting is blocking the linking UI from updating itself.
    And/Or purchase a case on line and get someone in Support to work with you directly to fix the issue. It's beyond what forums can do now.
    Here's the link:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551
    Good luck.
    Don

  • Database Logon Failed which created by Crystal Report 2008

    this time i meet the famous error again which is database logon failed.
    i created a crystal report 2008 starting from blank report, then connect with odbc
    i use 2008 method
    objRpt.SetDatabaseLogon(db_username, db_password, odbc_name, database_name);
    2008 method will get database logon failed even set database location and verify database again
    then i use 8.5 method and try again for 2008 report. it said field name is unknown for one of formula
    then i drag field again for formula and set database location and verify database again
    it said the same error.
    then i uninstall 8.5 crytal report software in window 7 deployment machine, and do above again, it said the same error
    //'Create a new Stored Procedure Table to replace the reports current table.
            CrystalDecisions.ReportAppServer.DataDefModel.Procedure boTable = new CrystalDecisions.ReportAppServer.DataDefModel.Procedure();
            //'boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
            PropertyBag boMainPropertyBag = new PropertyBag();
            //'boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
            //'In the main property bag (boMainPropertyBag)
            PropertyBag boInnerPropertyBag = new PropertyBag();
            //'Set the attributes for the boInnerPropertyBag
            boInnerPropertyBag.Add("Connect Timeout", "15");
            //boInnerPropertyBag.Add("Data Source", "MyDataSource");
            boInnerPropertyBag.Add("Data Source", "10.1.1.191");
            boInnerPropertyBag.Add("DataTypeCompatibility", "0");
            boInnerPropertyBag.Add("General Timeout", "0");
            //boInnerPropertyBag.Add("Initial Catalog", "MyCatalog");
            boInnerPropertyBag.Add("Initial Catalog", database_name);
            boInnerPropertyBag.Add("Integrated Security", "False");
            boInnerPropertyBag.Add("Locale Identifier", "1033");
            boInnerPropertyBag.Add("MARS Connection", "0");
            //boInnerPropertyBag.Add("OLE DB Services", "-5");
            //boInnerPropertyBag.Add("ODBC", "-5");
            boInnerPropertyBag.Add("ODBC", "Cheque");
            boInnerPropertyBag.Add("Provider", "SQLNCLI");
            boInnerPropertyBag.Add("Tag with column collation when possible", "0");
            boInnerPropertyBag.Add("Trust Server Certificate", "0");
            boInnerPropertyBag.Add("Use Encryption for Data", "0");
            //'Set the attributes for the boMainPropertyBag
            boMainPropertyBag.Add("Database DLL", "crdb_ado.dll");
            //boMainPropertyBag.Add("Database DLL", "p2sodbc.dll");
            //boMainPropertyBag.Add("QE_DatabaseName", "VEPILOT");
            boMainPropertyBag.Add("QE_DatabaseName", database_name);
            //boMainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
            boMainPropertyBag.Add("QE_DatabaseType", "ODBC");
            //'Add the QE_LogonProperties we set in the boInnerPropertyBag Object
            boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
            boMainPropertyBag.Add("QE_ServerDescription", "MyServer");
            boMainPropertyBag.Add("QE_SQLDB", "True");
            boMainPropertyBag.Add("SSO Enabled", "False");
            //'Create a new ConnectionInfo object
            CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
            //'Pass the database properties to a connection info object
            boConnectionInfo.Attributes = boMainPropertyBag;
            //'Set the connection kind
            boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
            //'*EDIT* Set the User Name and Password if required.
            boConnectionInfo.UserName = db_username;
            boConnectionInfo.Password = db_password;
            //'Pass the connection information to the table
            boTable.ConnectionInfo = boConnectionInfo;
    CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables = objRpt.ReportClientDocument.DatabaseController.Database.Tables;
                CrystalDecisions.CrystalReports.Engine.Tables tables = objRpt.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    if (!string.IsNullOrEmpty(table.Name))
                        //boTable.Name = table.Name;
                        //boTable.QualifiedName = database_name + ".dbo." + table.Name;
                        //boTable.Alias = table.Name;
                        boTable.Name = "sp_ChequeIssueDetRpt";
                        boTable.QualifiedName = database_name + ".dbo.sp_ChequeIssueDetRpt";
                        boTable.Alias = "sp_ChequeIssueDetRpt";
                        objRpt.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);
                objRpt.VerifyDatabase();
    http://sourceforge.net/projects/aspchequesprint/files/ChequeIssueDet.rpt/download

    No subreport, only a stored procedure with final two lines are
    print @m_sql
    exec (@m_sql)
    After use generated code in the link above
    Error at boReportDocument.VerifyDatabase();
    Inner Exception : no error
    Message "Logon failed"
    ErrorID : CrystalDecisions.CrystalReports.Engine.EngineExceptionErrorID.LogOnFailed
    HelpLink : null
    stacktrace :  CrystalDecisions.CrystalReports.Engine.ReportDocument.VerifyDatabase()\r\n   at viewReport.Page_Load(Object sender, EventArgs e) 於 d:
    Data
    My Documents
    Visual Studio 2008
    WebSites
    Cheques
    viewReport.aspx.cs: row 1302\r\n   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)\r\n   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)\r\n   at System.Web.UI.Control.OnLoad(EventArgs e)\r\n   at System.Web.UI.Control.LoadRecursive()\r\n   於 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    TargetSite : {Void VerifyDatabase()}
    string reportPath = report_path + "ChequeIssueDet.rpt";
                boReportDocument = new ReportDocument();
                //**EDIT** Change the path and report name to the report you want to change.
                boReportDocument.Load(reportPath, OpenReportMethod.OpenReportByTempCopy);
                //Create a new Stored Procedure Table to replace the reports current table.
                CrystalDecisions.ReportAppServer.DataDefModel.Procedure boTable =
                new CrystalDecisions.ReportAppServer.DataDefModel.Procedure();
                //boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
                PropertyBag boMainPropertyBag = new PropertyBag();
                //boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
                //In the main property bag (boMainPropertyBag)
                PropertyBag boInnerPropertyBag = new PropertyBag();
                //Set the attributes for the boInnerPropertyBag
                boInnerPropertyBag.Add("Database", database_name);
                boInnerPropertyBag.Add("DSN", "Cheque");
                boInnerPropertyBag.Add("UseDSNProperties", "False");
                //Set the attributes for the boMainPropertyBag
                boMainPropertyBag.Add("Database DLL", "crdb_odbc.dll");
                boMainPropertyBag.Add("QE_DatabaseName", database_name);
                boMainPropertyBag.Add("QE_DatabaseType", "ODBC (RDO)");
                //Add the QE_LogonProperties we set in the boInnerPropertyBag Object
                boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
                boMainPropertyBag.Add("QE_ServerDescription", "Cheque");
                boMainPropertyBag.Add("QE_SQLDB", "True");
                boMainPropertyBag.Add("SSO Enabled", "False");
                //Create a new ConnectionInfo object
                CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
                new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
                //Pass the database properties to a connection info object
                boConnectionInfo.Attributes = boMainPropertyBag;
                //Set the connection kind
                boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
                //**EDIT** Set the User Name and Password if required.
                boConnectionInfo.UserName = db_username;
                boConnectionInfo.Password = db_password;
                //Pass the connection information to the table
                boTable.ConnectionInfo = boConnectionInfo;
                //Get the Database Tables Collection for your report
                CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
                boTables = boReportDocument.ReportClientDocument.DatabaseController.Database.Tables;
                //For each table in the report:
                // - Set the Table Name properties.
                // - Set the table location in the report to use the new modified table
                boTable.Name = "sp_ChequeIssueDetRpt;1";
                boTable.QualifiedName = database_name+".dbo.sp_ChequeIssueDetRpt;1";
                boTable.Alias = "sp_ChequeIssueDetRpt;1";
                boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);
                //Verify the database after adding substituting the new table.
                //To ensure that the table updates properly when adding Command tables or Stored Procedures.
                boReportDocument.VerifyDatabase();
                //**EDIT** Set the value for the Stored Procedure parameters.
                string m_curUser = "";
                int spid = Convert.ToInt32(Request.Cookies["login_cookie"]["spid"]);
                queryString = "select * from v_All_Session where SPID=" + spid.ToString();
                //string _connectionString = ConfigurationManager.ConnectionStrings["ChequeConnectionString"].ConnectionString;
                using (SqlConnection connection = new SqlConnection(_connectionString))
                    SqlCommand command = connection.CreateCommand();
                    command.CommandText = queryString;
                    connection.Open();
                    using (SqlDataReader datareader = command.ExecuteReader())
                        if (datareader.HasRows == true)
                            while (datareader.Read())
                                if (datareader["UserID"] != System.DBNull.Value)
                                    m_curUser = datareader["UserID"].ToString();
                        datareader.Close();
                    connection.Close();
                boReportDocument.SetParameterValue("@UserID", m_curUser);
                if (string.IsNullOrEmpty(Session["fm_CoCode"].ToString()))
                    boReportDocument.SetParameterValue("@fm_CoCode", Session["fm_CoCode"].ToString());
                if (string.IsNullOrEmpty(Session["to_CoCode"].ToString()))
                    boReportDocument.SetParameterValue("@to_CoCode", Session["to_CoCode"].ToString());
                if (string.IsNullOrEmpty(Session["fm_BankACNo"].ToString()))
                    boReportDocument.SetParameterValue("@fm_BankACNo", Session["fm_BankACNo"].ToString());
                if (string.IsNullOrEmpty(Session["to_BankACNo"].ToString()))
                    boReportDocument.SetParameterValue("@to_BankACNo", Session["to_BankACNo"].ToString());
                if (string.IsNullOrEmpty(Session["fm_BatchNo"].ToString()))
                    boReportDocument.SetParameterValue("@fm_BatchNo", Session["fm_BatchNo"].ToString());
                if (string.IsNullOrEmpty(Session["to_BatchNo"].ToString()))
                    boReportDocument.SetParameterValue("@to_BatchNo", Session["to_BatchNo"].ToString());
    Edited by: Mathew_666 on Jul 19, 2011 4:27 AM
    Edited by: Mathew_666 on Jul 19, 2011 4:28 AM

  • Failed to retrieve data from the database crystal reports 2008 in SAP  B1

    Hello friends,
                 I am using Crystal report 2008 with SAP B1 PL 8.8. When I run any report,  it runs correctly from Crystal Report. But whenever I try to open the same report through SAP ( Tools -> Preview External Crystal Report ), it prompts the parameters for that report and then open up the crystal report window and throws an Error message ("failed to retrieve data from the database. Details [Database Vendor Code: 156]").
               Please any one suggest me the corrective solution.
    Thanks in Advance,
    Keyur Raval.

    I had the same problem in SAP B1 2007. Report worked fine except when it was open from B1. Generally there may be different problems. In my case the same problem was caused by using some procedure which was in a specific schema. Changing the schema into "dbo" solved the problem.
    Radoslaw Blaniarz

  • Problems with consuming SAP BW WSDL in Crystal Reports 2008

    Hello,
    I am trying to use the WSDL generated from the SAP BW in Crystal Reports 2008 using the XML and Web Services driver, but when I input the WSDL url Crystal does not interpret the url passed in as a WSDL url and the Services, Port and Method drop downs are blank.
    If I manually input the values I get the error below from Crystal
    "Logon failed.
    Details: Web Service Location is invalid
    WSDL Exception (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL:Encountered unexpected element
    'Policy'."
    I know this is a valid WSDL as I have tested it with Xcelsius 2008 and I am able to get data back in Xcelsius. I found SAP note 1485601 that talks about Crystal Reports not being able to reading a WSDL generated by a SAP system.
               https://websmp230.sap-ag.de/sap/support/notes/1485601
    Based on the error message from Crystal above I feel that Crystal is unable to read the WSDL URL, has anyone else encountered this issue, if so is there a possible work around.
    We are running Crystal Reports 2008 V1 SP3 FP 3 and the SAP Integration Kit is also on the same service pack and patch level.
    Any help or insight into the issue will be very helpful.
    Thanks,
    Kumar

    Ingo,
    I am using the "XML and Web Services" connection option in Crystal Reports, and using a HTTP WSDL.Here is a sample of how WSDL url generated by SAP BW.
    http://servername:8000/sap/bc/srt/wsdl/bndg_DF6E553E117931F19C6B001560A1B616/wsdl11/allinone/ws_policy/document?sap-client=100
    We have a two structure BW query (one for keyfigures and one as characteristic structure ), I know that this will cause the structure for the characteristics to show up as a single field and each element of the structure will result in a row of data, but we need the individual elements on the structure and we were hoping to get around the MDX driver limitation by using the web service connection.
    The data in the Crystal Reports 2008 needs to be in a crosstab layout as shown below, but if we use the Crosstab expert the key figures are stacked one under the other and also we cannot get the labels from the KPI structure to show up on the Crystal Reports.
                   Characteristic Structure
                 Column1            Column2                     Column3     
    Label 1          KeyFigure 1          KeyFigure 2                    KeyFigure 3
    Label 2          KeyFigure 1          KeyFigure 2                KeyFigure 3
    Label 3          KeyFigure 1          KeyFigure 2                    KeyFigure 3
    This layout is already built in a Web Template and therefore we were planning on using the WSDL to get the layout directly into Crystal report, but I keep running into the WSDL error when I try to consume the WSDL in Crystal.
    Thanks,
    Kumar

  • SAP Integration Kits 3.0 with Crystal Report 2008

    Hi,
    I have installed Intergration Kits 3.0 and Crystal Report 2008.
    I open the Crystal Report Designer from Start >Programs >Crystal Reports 2008 > Crystal Reports 2008.
    As mentioned by Ingo, I have ticked the MDX driver setting via SAP menu option.
    I clicked on u201CCreate New report from queryu201D
    Selected the fields from the Query and placed in the report.
    When I click on Preview button, I hits the following:
    Database Connector Error: u2018Function module u201C/CRYSTAL/MDX_GET_STREAM_INFOu201D not found.u2019
    Another problem that I encountered is when I can only enter UPPERCASE for my SAP BW User ID and Password in Crystal Report (when I try to logon into SAP BW in Crystal by clicking on the u201CCreate New report from queryu201D). So I need to change my password to Uppercase in BW.
    Have you encountered this before? I guess it is related to installation problem? Should I uninstall and reinstall again?
    Please advise, thank you.

    Hi,
    So I just need to send the neccessary files mentioned in transports_EN.txt to my basis guys with your instruction. Then I should be able to use the MDX driver in crystal reports already?
    Correct!
    the SAP BusinessObjects documentation (and Ingo) mentions that the transports have to be imported. HOW to do this is an SAP Basis administration related issue and is NOT described in the BusinessObjects documentation.
    As far as I know the appropriate files (there is a dependency related to the version and the type (BW or R/3) of your SAP backend system) described in  transports_EN.txt) have to be copied in the directory which is set to be the tranport queue for your SAP system and then the admin can use the STMS transaction to import them.
    NOTE: In a BW system you have to import BOTH the SAP Basis transports AND the SAP BW related transports. That means you have to import in total 9 transports = 18 files
    Regards,
    Stratos

  • Crystal Reports 2008 Runtime creates Logon Fialed error

    i have a client running Crystal REport 2008 SP4.  They are now receiving this error when running reports.
    Logon failed.
    Details:  [Database Vendor Code: 18456 ]
    Logon failed.
    Details:  [Database Vendor Code: 18456 ]
    Error in File Sick Leave Taken from Anniversary Date {0F164D11-4856-4C12-9EA7-2CE3C3F0861E}.rpt:
    Unable to connect: incorrect log on parameters.
    Details:  [Database Vendor Code: 18456 ]
    The report runs fine on my development environment.  What could be causing the error?

    See if the blog [Understanding "login failed" (Error 18456) error messages in SQL Server 2005|http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx] will help (big assumption on my part re. the db you are using...)
    See the article [Troubleshooting Guide to Database Connectivity Issues with Crystal Reports in Visual Studio .NET Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de]
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Maybe you are looking for

  • How to delete atomically unread messages Mail Maverick?

    I received a ton of emails and I will like to know step by step if is a way to delete unread messages completly for good in automatic way if let say I haven't read the email in 3 days?..... thanks in advance.

  • Adobe Muse

    I have Windows 8.1 and tried to update Muse using my CC account, during this process the programme completely disappeared from my system. In the end it failed stating: Exit Code: 7 Please see specific errors below for troubleshooting. For example,  E

  • Testing of Restful Service with ECATT

    HI, has anyone experience with testing Restful services via ECATT? I didn't find any documentation about this. BR, Oliver

  • Simplest way to support dual monitor with HP 2570P

    Hi, I would like to be able to use my dual monitors with my HP 2570P. I do not yet have a docking station.  What is the simplest way to support dual monitor display with my  HP 2570P ?  I'm not looking for mirror i am looking for an extended desktop.

  • HP Deskjet F4280 - can print test page but nothing else on new Windows 7 laptop on home network

    I hope you can help me.  I have an HP Deskjet F4280 set up on my desktop computer running Windows Vista Home Premium 64x.  I've also got a home network on a D-Link Wireless N router. My new laptop is a Toshiba with Windows 7.  I can connect to the ne