Crystal Reports with stored procedures

Hello Members,
I have come across a unique problem (only for me I guess). When I develop a report using a sql command (with sql script), I can run this report against any server or any datatbase dynamically with out using the "Set Data Source Loaction" found under database fields in field explorer. This report is based on  a stored procedure and uses a OLEDB connection. When I developed this report for the first time, I defined its database connection (servername,database). Now I have created a same procedure with the same name on different server under a different database. I wanted to run this report against the new server, but I am getting an error " Failed to retrieve data from database". If i click OK on this pop up window. It displays another pop up window and says the old database name is not found in the new server. The criteria is the report should be able to run on any database on any server if the same stored procedure exists in there just like the report with sql command runs. How to solve this problem ?
Thanks in Advance!!!!

Hi Raghavendra,
I know that is one of the way to do this ands it is manual process. The problem here is different clients will be running this report. Each client's data is located on different server and different database and this update process should be done automatically. Do you know any way to do this ?
Thanks!!!!

Similar Messages

  • Passing parameters from vb form to a crystal report with stored procedure

    Can someone give me an idea how to use data inputted on vb form to be use as basis of crystal report generation which loads data from a stored procedure. Stored procedure has parameters that was also set in the crystal report. viewing on crystal report is ok but i am having difficulty running the report from vb.

    Hi John,
                  If Not CRRpt.ParameterFields("AgeType") Is Nothing Then
                        CRRpt.ParameterFields("AgeType").CurrentValues.Clear()
                        Dim ParamValue As new CrystalDecisions.Shared.ParameterDiscreteValue
                        ParamValue.Value = AgeType.ToString 
                        CRRpt.ParameterFields("AgeType").CurrentValues.Add(ParamValue)
                    End If
    Note that the ParamValue.Value should be assigned with exact same data type as you declared it in CR.
    If it is string, Convert your Variable to string first.
    If it is date, make sure you are passing a date variable.
    and so on...
    Regards
    Edy

  • Crystal Reports 2008 Stored Procedure and Parameters from LOVs

    Quite simple report using stored procedure as data source. When editing some of the parameters we get this error when clicking OK to close "This stored procedure parameter can only accept multiple values. Please ensure that Allow Multiple Values is true."
    As we all know stored procedure parameters do not access multiple values at all, so this message is very hard to debug. The report does work if we set the 'Allow Multiple Values' to true, but only when using exactly one value for the parameter. We have tried verify database and other things, but cannot find any way around this issue.
    All ideas are appreciated as this is stopping us from utilizing the dynamic parameters.
    Thanks, Stig

    We managed to work around the issue by creating a new stored procedure. First we used the same parameter names and changed the data source to the new stored procedure. After renaming the parameter with the issue the problem then was resolved.
    Note that another parameter that was earlier affected by this issue in the way that it could not be edited and saved due to the same error message now also works fine. This even if this parameter has not changed names.
    Quite a complex situation to debug this. Maybe if the source of the error message is found in the code we could help testing.
    Stig

  • Crystal Reports - Using Stored Procedure with c#

    Post Author: cathalmckenna
    CA Forum: Data Connectivity and SQL
    Hey
    I've got some c# code that sets a reports data source.
    Its works when connecting to a data source that is a Table, however when the datasource is a Stored Procedure the following error is generated.
    The table 'PNL_STATUS_REPORT' could not be found.Error in File C:\DOCUME1\mckennac\LOCALS1\Temp\temp_9b3cb2f4-7e37-4e34-bd18-af7b06c85139 {ACBDC2D4-A275-4CAA-B3C0-E3C92F615007}.rpt:The table could not be found.
    The problem is when setting table.Location. I've tried prefixing this with the package name that the stored proc is in, but no luck. If I set the table Location to the package name, I get no error, but the report returns no results.
    Any ideas why this doesnt work, is there a different way to handle stored procs??
                 ConnectionInfo connInfo = new ConnectionInfo();            connInfo.DatabaseName = dbName;            connInfo.ServerName = serverName;            connInfo.UserID = userName;            connInfo.Password = password;                        foreach (Table table in report.Database.Tables)            {                TableLogOnInfo logOnInfo = table.LogOnInfo;                string[] locations = table.Location.Split('.');                string unqualifiedLocation = locations[locations.Length - 1];                logOnInfo.ConnectionInfo = connInfo;                table.ApplyLogOnInfo(logOnInfo);                table.Location = unqualifiedLocation;            }
    thanks
    Cathal

    Post Author: ianbennett
    CA Forum: Data Connectivity and SQL
    I too am having the same problem.  I have found that when the user has a fast connection it works OK but when they use a "slow" link it does not seem to passs the logon information through before trying to generate the report.

  • Report with Stored Procedure does not return until refresh

    I'm using RAS server 2008 to run many Crystal reports from a web application (TrackWise) over Oracle 10g DB.
    A new report is using a stored procedure that takes several minutes (5-10) to return before the rest of the report's SQL can execute.
    When running the report from Crystal Developer there is no problem,
    but when running from the application (using the RAS), the report seems to be running forever,
    However, if you wait a few minutes for the DB utilization to drop (i.e. for the stored procedure to finish) and refresh - the full report appears on the screen in a second.
    Since I have many other reports that run for much longer time with no issue, I assume that this has nothing to do with the web application, but rather related to the connection between the RAS and the DB (i.e. the idle time between the beginning of the stored procedure execution to its return and the continuation of the report creation).
    I assume that I need to change one of the RAS settings/ parameters (in the properties or in the registry), but which?
    Please assist.

    Since this app is from TrackWise, I'd recommend contacting TrackWise and see if they have an answer for you. As it is, we have no idea how they implemented the CR components in their app. If they cannot help you, it should be them coming here and asking us - or better yet they should be creating a phone incident.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Crystal Report and stored procedure calls

    Hi,
    1.   I am trying to access a Stored Procedure through Crystal Reports 2008. I have 3 Parameters in it and now I need the 2 Parameters from the stored Procedure to be given by User and the 3rd Parameter should be passed from the backend code. Please help me with the setps that would help me do this.
    2.I also have another Stored procedure where I have 3 parameters and in addition to that I should provide two other parameters for user to enter. Now the total number of parameters will be 5 Parameters. Can any one let me know how to implement all these parameters.
    3. In another Storedprocedure I have two Parameters which are discrete and multi select and both of them are cascaded. How do I implement those.
    Thanks
    Pradeep

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Switching Data Source for a report with stored procedure

    Post Author: ysbn
    CA Forum: Data Connectivity and SQL
    I've created a report and deployed it on a Crystal Server. The report is based on a certain stored procedure which also exists on other DB machines in my environment (Oracle machines). When I try to switch my report object to work with other machines (not the one originally used when the report was designed) the activation of the report fails. The error I see in the preview window is:
    Error in File <my rpt file name>: Failed to retrieve data from the database. Details: &#91;Database Vendor Code: 6550 &#93;
    When I try the same thing with a report which is based on a view and not a stored procedure the switching of Data Source works perfectly.
    Is there a problem switching between data sources from the server when the report is based on stored procedure? Are there any configurations I need to do in order to support this scenario?
    Thanks!

    Hi everyone~
    i am now facing the same problem
    i am using CR2008 and Visual Studio 2008 c# to write a window program
    because we have 2 db environment (one is production , the other one is development) so i have set a prarameter to switch db connection in c# code.
    the database is Oracle, and the the report will connect to Oracle procedure (which it is stored in package) this procedure will return reference cursor, so the report will loop up this cursor to generate report.
    at first time, it work fine when i open the report in CR2008 designer and point to dev database (ie datasource point to oracle procedure) . but when i want to deploy this win application to client and point to prod database, it show (vendor error 6550)
    i found that i cannot change the datasource during runtime in c# code...
    am i miss something in code? here attached a part of this code...
    private void setDBLogonForReport(ConnectionInfo info, ReportDocument doc)
                Tables myTables = doc.Database.Tables;
                foreach (Table myTable in myTables)
                    TableLogOnInfo logOnInfo = myTable.LogOnInfo;
                    logOnInfo.ConnectionInfo = info;
                    logOnInfo.TableName = myTable.Name;
                    myTable.ApplyLogOnInfo(logOnInfo);
                    //myTable.Location = info.UserID + "." + "pkg_crystal_report." + myTable.Name;
                    //someone suggest i have to set the 'Location' for change the datasource, but i am not sure how to construct a 
                    //string for point to oracle prcedure
    i will check it freq ... hope any expert can give me some advice ~
    thank you very much!!!

  • Report with stored procedures is unable to run in infoview.

    I developed report for my current employer using stored procedures and saved it to Enterprise environment. When running this report I am getting following Error in Infoview:
    Error in File ~tmp26285c856bf1180.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: -674 ]
    I can run my same report in Crystal Reports. Previous developer was using data source tables instead of stored procedures and report with tables were running successfully in infoview. What should I need to do in order to recognise my stored procedures in Infoview.
    We use informix databases.
    Regards,
    Rashid Khan

    The above issue have been resolved the issue. The problem was our BO administrator changed the Database server on CMC and my report in infoview was failing because of my stored procedure was not found on new database.

  • Executing a report with stored procedure causes error

    Hello,
    I've got a .NET application where a report gets generated from an .rpt template using Crystal Reports. A template has been created using the fields from stored procedure. While creating the template, I've been working with my DEV environment DB server, and with that server the .rpt has been saved. Within the Designer, I can preview the report, all working fine.
    Using the template with my application, if I set in the code for crystal connection to use the same DB server as has been saved with the .rpt, the report runs and I do get the result in my application as expected. But if I move my code to other environment, using another DB server (but not changing anything in the .rpt), while running the report in the application I get the following error:
    Exception: CrystalDecisions.CrystalReports.Engine.InternalException
    Message: Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Could not find stored procedure 'BreachOfAgg'.
    SQL State: 42000
    Native Error:
    Failed to open a rowset.
    Error in File C:\Windows\TEMP\Breach of Aggregate Stop Loss {196B84E5-7DAE-465E-A12D-5C70DDC04CE5}.rpt:
    Failed to open a rowset.
    Source: CrystalDecisions.ReportAppServer.DataSetConversion
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)
       at IFG.ReportsModule.Reporter.CrystalReporter.Export(OutputType outputType, HttpResponse response, String reportName, Boolean asAttachment)
       at IFG.ReportsModule.Reporter.CrystalReporter.Export(OutputType outputType, HttpResponse response, String reportName)
       at IFG.ReportsModule.Proxies.CrystalReporterProxy.ShowResult(OutputType outputType, HttpContext context, CrystalReporter cr)
       at IFG.ReportsModule.Proxies.CrystalReporterProxy.ExecuteReport(ParametersValues parameters, OutputType outputType, HttpContext context)
       at IFG.Web.GetReport.GenerateReport(Int64 reportID) in d:\Jure\PSL\iFish\IFISHRSF\IFISHRSF0100\Root\5. Development\IFISH Portal\SDRMA New\Portal\web\admin\RSF\GetReport.aspx.cs:line 82
       at IFG.Web.GetReport.Page_Load(Object sender, EventArgs e) in d:\Jure\PSL\iFish\IFISHRSF\IFISHRSF0100\Root\5. Development\IFISH Portal\SDRMA New\Portal\web\admin\RSF\GetReport.aspx.cs:line 48
    Nested Exception
    Exception: System.Runtime.InteropServices.COMException
    Message: Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Could not find stored procedure 'BreachOfAgg'.
    SQL State: 42000
    Native Error:
    Failed to open a rowset.
    Error in File C:\Windows\TEMP\Breach of Aggregate Stop Loss {196B84E5-7DAE-465E-A12D-5C70DDC04CE5}.rpt:
    Failed to open a rowset.
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    If I open in the Crystal Designer the rpt and change the DB to my new server, and then run the report in the application using that same new server, the report runs ok and I do get the results. As well, I don't have this problem using tables or views in the report. Independent of what server has been used while created the .rpt in the Designer, I get the report ran and presented according to the server that I point to within my code.
    I hope someone can help me out with thi.
    Thank you.
    Jure

    Hi Jure,
    All I can suggest now is you try this [app|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333933323331%7D.do]:
    It will get the connection if you need.
    If that doesn't work the purchase a support and Rep can connect to your PC to see what is going on...
    Thanks
    Don

  • Error when run crystal report with store procedure in JSP

    I try to run report which is developed by crystal report XI and store procedure (SQL 2005) with JSP.
    But it occurs error that is "com.crystaldecisions.reports.reportengineinterface.JPEReportSource - failed to process getPage request: No results were returned by the query."
    How can I do for solving this problem? Pls, help me !!!!!
    (In other report which is not used store procedure I can run fine.)
    Message was edited by:
    Bonds_Identity

    What version of CR are you using?
    What CR updates are you using?
    See sample apps here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    in particular check out vbnet_win_pass_dataset_main_sub.zip
    The [Crystal Reports for Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23] will also be good to look at.
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Problem With Stored Procedure

    Post Author: Ranjith.403
    CA Forum: General
    Hi,
    Am new to crystal reports with stored procedures
    am created a report using a stored procedure in oracle. In that Stored Procedure am Using a temporary table.
    After inserting values into the table am assigning to ref cursor.
    Refcursor having fields like item,onhandstock,purchase rate
    This report working fine in oracle version 9.2.0.1.0 where comes to oracle version 9.2.0.8.0 it's giving the varchar values correctly.
    The Number values are showing as 0.
    Help me to solve it.
    Thanks in Advance,
    Ranjith

    Try modularising this large procedure into smaller procedures and functions, and determine which part is causing you trouble.

  • Error when linking report to stored procedure defined with one input parm

    Error when linking report to stored procedure defined with one input parameter
    The report will work ok, when the parameter is removed from the stpred procedure
    An unhandled win32 exception occurred in crw32.exe[4480]
    Stored Proc (sql server 2005)
    USE [Allegro]
    GO
    /****** Object:  StoredProcedure [dbo].[SP_Test]    Script Date: 07/08/2009 10:42:14 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER procedure [dbo].[SP_Test](@valuationmode VARCHAR(55)) as
    Begin
    select
         valuation,
         valuationtime,
         valuationmode
    from valuation
    where valuationmode = @valuationmode;
    End;

    This is an example of a stored procedure that is trying to be linked to a new report as the only datasource.
    If I remove the parameter I can create a report, however this will return all of the results of thw query to the report, rather than the desired results. If I add the parameter on the Crystal Report, the stored procedure then has to return all of the results to Crystal and then perform the filtering of records. By using a parameter in the stored procedure, you should be able to do all of the filtering as part of the query on the databse server, making this more efficient.

  • Does BOXI support crystal reports with parameter references in formulas?

    I am designing a report in Crystal Reports XI Developer that contains parameters, which are passed to a stored procedure and are also used within formulas ( in Crystal Syntax ie. {?FORMAT_ID} ) in the report itself.
    I can run the report successfully in CRXI Developer.  The formulas use the correct values from the parameters entered during execution and everything looks good.
    I then deploy the report to Business Objects Enterprise XI.  I do all of the things necessary to manage the report including setting up the proper database connection information and default parameter values.
    When I run the report using the Crystal Report Viewer, I get the following error message:
    Error in File Forecasting.rpt:
    Error in formula <Report Format>.
    'if (not isNull({?FORMAT_ID} ) ) then
    This field name is not known.
    Details: errorKind
    This happens when I press the "Preview" button in the Manage Object dialog from Crystal or when I run the report using InfoView.
    I have changed the formulas and it doesn't seem to matter what the specific content of the formula is; other than the existence of a parameter reference in the formula.  If I comment out the parameter and replace it with a hard-coded value, it gets through the formula fine.
    Does Business Objects Enterprise XI support crystal reports with parameter references in the formulas?
    Thanks,
    Tim H.

    Hi,
       In Crystal Reports under File -> Report Options >check convert Null Values to default > Verify on first refresh > Verify stored procedures on first refresh.
    This corrected the issue by allowing the query engine time to locate those columns and map them to the query being sent by the report.
    The convert null values was added because those field were being used in the record selection and grouping.
    Regards,
    Vinay

  • Passing parameters to sub report's stored procedure

    I'm attempting to pass values from the main report to a linked sub report's stored procedure, but I haven't been successful yet.
    I know how to filter the parameters on the return set of the stored procedure, using parameters from the main report. However, I would like the stored procedure executed for each record of the main report, using those values passed.

    I was getting "missing parameter values" trying to send parameters to a stored procedure in the subreport.  Turns out there is a hot fix for my issue.  Not sure if it matches what you're trying to do; you need to give more information on what you've already tried.
    I was using CR XI, and also CR for VS 2005. The problem seems to be fixed with CR VS2005 SP1, for Visual Studio CR.
    Look up under Business Objects Downloads: Crystal Reports > .NET > Hot Fixes
    Files:
    CRRedist2005_x86.msi
    crvs05sp1.exe
    Then open the report again, and re-save it.
    This has fixed the problem for me.
    Good luck!

  • Sub report using Stored Procedure returns incorrect data

    Post Author: rikleo2001
    CA Forum: Data Connectivity and SQL
    Guys,
    I am using CR 9 in ASP.net application.
    One simple report and one Sub report, sub report is basically linked with Stored procedure accepting one parameter and returns a select query.
    Main report is linked with that sub report using that parameter field.
    Sub report is on demand sub report.
    Now when I execute that main report and click on on demand sub report I am getting Wrong order information.
    Here is out put on main report
    Order 1                                          on demandDetail
    Order 2                                          on demandDetail
    Order 3                                          on demandDetail  
         NOW If I click on Order 3 (On demanddetail link, it displays rondom order details, some time correct on too), I am really stuck and don't know where I am going wrong.
    Please help me to solve this issues.
    Many Thanks

    Post Author: rikleo2001
    CA Forum: Data Connectivity and SQL
    Hi Yangster,
    Thank you so much for your reply.
    On DEMAND Sub report is located in main report, IN DETAIL SECTION
    I am passing Order ID from main report linked to  {?morderid} in subreport under command object, and if I run it in design mode, it works perfectly alright, so problem is isolated to ASP.NET and Crystal report post back method on Crystal report.
    The example I give to you this is a simple example to identify issues in my real application and report.
    My main report contains summary of data base on unique identifier. that summary have 4 differant types of details which has to be on the same report (as Crystal report doesn't provide Nested subreport), so I decided to use 4 subreports on main report and all subreport using Stored procedure command object.(Sub report has it own complex processing requirement to fulfill).
    Please help me with any further ideas? for the sample which I presented to you this is only using one SP on main report with a simple processing.
    Many Thanks

Maybe you are looking for

  • Problems updating or installing the latest version of itunes

    Has anyone had the following message when either updating or trying to install the latest version of itunes? Runtime Error! Program: C:\Program Files (x86)/iTunes\iTunes.exe R6034 An application has made an attempt to load the C runtime library incor

  • .ashx problems? Here are tips!

    I have been having trouble opening .ashx files downloaded in Safari or Firefox. The titles said they were PDF or Word files, but the link had a .ashx extension. They wouldn't open in Preview, Pages or anything else in my Dock. A Google search on ".as

  • Tables in PDF usinx xsl-fo

    Hi I have a pdf file defined with 2 page sequences. First page with total width of 8.5in. In that i have defined xsl-body with left margin 2.375in. If i display a some data in that region, it displays correctly. If i display a table, then it takes to

  • Problem with getting the file name and type from OAMessageFileUploadBean

    Hi Tapash, I am trying the code below to get the file name and mime type from OAMessageFileUploadBean, DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("Documents"); String uFileName = (String)fileUploadData.selectValue(null, "U

  • Can I use UI-API connected company with DI-API business objects?

    Hi. I have to make some inventory transactions, by using DI-API business object Documents: SAPbobsCOM.Documents vInventoryGenEntry; vInventoryGenEntry = (SAPbobsCOM.Documents) oCompany.GetBusinessObject(BoObjectTypes.oInventoryGenEntry); But, the Com