To create a Crystal Report which will prompt for a value and if nothing is entered select the alternative value from the database record.

Hi Experts,
I am working on a report in Crystal (2008) which will prompt user to input a value, but if nothing is entered then it will select relevant database value.
I created a string parameter prompt called "{?Pack_Qty_Overide}" and used the following formula.
IF {?Pack_Qty_Overide} = ""
THEN {OITM.SalPackUn}
ELSE {?Pack_Qty_Overide}
However, when I check the formula in editor, it says that there should be a number at the end of "Else" clause.
What am I doing wrong?

Hi Janos,
OITM.SalPackUn is Numeric(19.6). When I used parameter input type as number, my formula returned error that "A number is required here" at the "if .... " statement.
So I used the formula you provided and it worked, such that when I input a quantity in parameter prompt it would display that, but if no override value given, the field remains blank - i.e. it does not display the value stored in OITM.SalPackUn.
What am I doing wrong?
Thanks,
YP

Similar Messages

  • Crystal Report Viewer Credential Prompt for Report with Dynamic Parameters

    The .NET Crystal Report Viewer is prompting for database credentials when launching a report containing dynamic parameters. This only occurs for reports created with SAP Crystal Reports 2011 designer. Reports created with Crystal Reports XI designer (where dynamic parameters were first introduced) work correctly.
    The credential prompt window contains the following fields:
    - Server Name: <server name> (disabled)
    - Database Name: <database name> (disabled)
    - User Name: <empty> (enabled)
    - Password: <empty> (enabled)
    - Use Single Signon Key: false (disabled)
    The values in the prompt window which are disabled are the database connection values used during the design of the report in the SAP Crystal Reports 2011 designer.
    Expected Result:
    - No prompt for database credentials.
    - Values read from the database should be populated in a drop down for the dynamic parameters.
    Environment:
    - Visual Studio 2010 (C#)
    - Windows 7 Enterprise
    - SAP Crystal Reports runtime engine for .NET Framework 4
    - SAP Crystal Reports, version for Visual Studio 2010
    - SAP Crystal Reports 2011
    The database connection is being set to use a DSN. It must be a DSN as the calling application is only aware of the DSN/Username/Password values. These values are being passed to the Crystal Report Viewer contained in a Windows form.
    The database connection for the report is being set as follows:
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection otherwise the connection does not work
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Supposed to set the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    The SetConnection method's signature is as follows:
       SetConnection(string server, string database, string name, string password)
    As you can see from the code snippet above I am setting the DSN name as the server parameter, blank for the database parameter (a database connection using DSN should only require DSN name/Username/Password) and the database username and password respectively.
    Is this a SAP bug?
    Is this the correct way of setting the database connection to use a DSN?
    Is there some other properties that need to be set somewhere else in the report through code?
    Any help would be greatly appreciated.

    Thanks for the pointer to the database connection code generator. After taking a look at the output from the tool I was able to finally get the dynamic parameters to load and populate properly without prompting for credentials. I needed to tweak the outputted code a bit to match my requirements of using a DSN only connection.
    Instead of updating the database connection properties contained within the Report.Database.Tables collection from the CrystalReports.Engine namespace, I changed it to replace the database connection properties in the Report.ReportClientDocument.DatabaseController.Database.Tables collection from the CrystalDecisions.ReportAppServer.DataDefModel namespace. For one reason or another, using the RAS namespace solved the problem.
    Below is the updated code with the change made:
    using RAPTable = CrystalDecisions.ReportAppServer.DataDefModel.Table;
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Sets the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    // The attributes for the QE_LogonProperties which is part of the main property bag
    PropertyBag innerPropertyBag = new PropertyBag();
    innerPropertyBag.Add("DSN", this.DSN);
    innerPropertyBag.Add("UserID", this.LoginName);
    innerPropertyBag.Add("Password", this.Password);
    innerPropertyBag.Add("UseDSNProperties", "true");
    // The attributes collection of the tables ConnectionInfo object
    PropertyBag mainPropertyBag = new PropertyBag();
    mainPropertyBag.Add("Database DLL", "crdb_ado.dll");
    mainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
    mainPropertyBag.Add("QE_LogonProperties", innerPropertyBag);
    // Pass the database properties to a connection info object
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.Attributes = mainPropertyBag;
    connectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    connectionInfo.UserName = this.LoginName;
    connectionInfo.Password = this.Password;
    // Replace the database connection properties of each table in the report
    foreach (RAPTable oldTable in this.report.ReportClientDocument.DatabaseController.Database.Tables)
        RAPTable table = new RAPTable();
        table.ConnectionInfo = connectionInfo;
        table.Name = oldTable.Name;
        table.QualifiedName = oldTable.QualifiedName;
        table.Alias = oldTable.Alias;
        this.report.ReportClientDocument.DatabaseController.SetTableLocation(oldTable, table);
    this.report.VerifyDatabase();
    Thanks again Ludek for the help.

  • Is it possible to stop the system time outs on my imac ,i have tried 5 times in the last 24 hrs.each time it will go for maybe 3hrs and then times out.each time i have to start the download all over again,thanks,

    is it possible to stop the system time out on my imac? i have tried 5 times in the last 24 hrs.it will run for approx.3hrs,and then times out and i have to start
    from the beggining again

    What is the url of the file your are downloading?
    What web browser are you using?
    What type of connection do you have to your isp?  phone line, dsl, cable, fios...
    Try iCab.  It lets you restart a download.
    icab.de
    Robert

  • Crystal Report doesn't prompt for SAP credentials / errors out on refresh

    2 Environments tested with same results:
    <p>
    BOE XI 3.1 SP2 & BOE XI 3.1 SP2 FP2.5<br>
    SAP Intg Kit on mirrored SP/FP levels in each environment.
    <p>
    We've been successfully creating Crystal Reports against BEx queries in BW for months now as well as ECC master data.  We've also built universes and have WebI reports actively working against similar BEx queries in the same.  However, we're getting some curious behavior when we refresh the Crystal Reports against BEx queries in BW.  Verified all necessary transports and authorizations have been provided for both authoring, as well as refreshing/viewing on demand, etc.
    <p>
    We've setup all the Crystal Reports we're testing to:
    <p>
    a) Use custom database logon information specified here.<br>
    b) Specify a custom driver, leveraging the crdb_bwmdx driver<br>
    c) Prompt the user for database login
    <p>
    We have not enabled SNC as of yet.
    <p>
    1) When we refresh a WebI report hitting a BEx query with security applied, it doesn't prompt for the credentials, but we confirmed through tracing on the SAP side that if the user hits a paramater it has access to, the data comes through and when we hit a paramater they do not have access to, we can clearly see SAP reject it and it spits out a logical error on the BO side in InfoView and in the WebI logs on the BO server. 
    <p>
    2) When we refresh a Crystal Report hitting ECC data, we are prompted for the SAP credentials and everything works as expected
    <p>
    However:
    <p>
    3) When we refresh a Crystal Report hitting a BEx query in BW, we are not promtped for SAP credentials.  We immediately get the "LOV" prompts.  Now, if we use a test user in SAP that has NO SECURITY restrictions at all and open access to the query, the data comes through.  However, as soon as any security is applied to the query level, even if it is SAP ALL, we cannot retrieve the data.  Tracing is also strange, as we can see on the SAP side it buffer the selected paramaters, but unlike with the WebI reports, it never shows it reaching the point where it checks each paramater against what the role has access to.  An error is then spit back.  We run the same queries with the same users within SAP and get normal behavior.  It's as though as soon as we apply security to the query the mdx driver doesn't like it.  Dependant on the type of InfoView viewer we use, the errors we consistently get on the BO side are:
    <p>
    Interactive Viewer: "Error in File %reportname%: Encapsulating Page Failed"<br>
    Java Viewer:  "Error in File %reportname%: Database Connection Error"
    <p>
    Nothing glaring in the event logs on the BO servers or in the Crystal logs that I can see, however just because it isn't spitting a specific error in the crystal logs doesn't mean I'm not missing something because I don't know what to look for behavior wise. To reduce the liklihood that it has to do with the way the report was built, we've tried against the same query by building a report using standard methods, as well as the SAP Toolbar using a very plain jane report.  Same behavior.
    <p>
    Thoughts?
    Edited by: Jay Riddle on Mar 1, 2010 8:55 PM

    Hi,
    1) When we refresh a WebI report hitting a BEx query with security applied, it doesn't prompt for the credentials, but we confirmed through tracing on the SAP side that if the user hits a paramater it has access to, the data comes through and when we hit a paramater they do not have access to, we can clearly see SAP reject it and it spits out a logical error on the BO side in InfoView and in the WebI logs on the BO server.
    >> Which authentication are you using to logon to InfoView ? Whats the configuration in the Universe Connection for Authentication ?
    2) When we refresh a Crystal Report hitting ECC data, we are prompted for the SAP credentials and everything works as expected
    >> The user is using which authentication ? and against which system does he log on ?
    However:
    3) When we refresh a Crystal Report hitting a BEx query in BW, we are not promtped for SAP credentials. We immediately get the "LOV" prompts. Now, if we use a test user in SAP that has NO SECURITY restrictions at all and open access to the query, the data comes through. However, as soon as any security is applied to the query level, even if it is SAP ALL, we cannot retrieve the data. Tracing is also strange, as we can see on the SAP side it buffer the selected paramaters, but unlike with the WebI reports, it never shows it reaching the point where it checks each paramater against what the role has access to. An error is then spit back. We run the same queries with the same users within SAP and get normal behavior. It's as though as soon as we apply security to the query the mdx driver doesn't like it. Dependant on the type of InfoView viewer we use, the errors we consistently get on the BO side are:
    >> The user is using which authentication ? and against which system does he log on ?
    >> You mentioned security restrictions and I assume we talk about BI authorizations in form of data level security. If so - does the BW query include the authorization variables ?
    Ingo

  • How to create dynamic stamp that will prompt for Cause number and exhibit number?

    I have a need to have a three line custom stamp that will look like the following but will allow a user to input the Cause number then the exhibit number, then successively number exhibits that the stamp is applied to:
    EXHIBIT
    12:74130
    001
    Exhibit will always be the same, but the cause number would need to be modifiable per batch possibly and I would like to be able to update the exhibit number to have a unique number on each page of exhibits....or just each exhibit.
    Can that be done?
    thanks!

    It sounds like you are trying to use a retail serial as an enterprise serial and would like to bypass it's restrictions by deactivating it . . . I assume that's not possible, but perhaps I don't understand your issue.
    I doubt you'll get a good answer on the forum. Try support, your sales rep, or a help link on the licensing web site (if there is one).
    Ben

  • Crystal reports viewer will not prompt for parameters

    Help,
    I can not get crystal report viewer to prompt for parameters when called from IIS 8 on Server 2012 r2
    I can get crystal report viewer to prompt for parameters when run from vs 2010 built in web service.

    Thanks,
    The solution for me was to uninstall the latest crystal reports runtime 13.10.x and install 13.6.x instead.
    Thanks anyway.

  • Email Message contains "select" & "from" word, system will prompt for security right

    Hi All,
      Is there anyone ever encounter that if the email message is having a "select" & "from" wording, system will prompt for User ID and password?
      I had filled up my CRM User ID & Password, and system will still fail to proceed to send the email.  Instead, it is showing "Internet Explorer cannot display the webpage" page.
      Please help...
    Regards,
    Desmond Chan

    Hi Abhishek,
      Thanks again.  That's what we suspect.  As mentioned, we only have this issue if the email body is having "select...from" wording,
    which it looks like SQL statement.
      Few days ago we had some changes in out network (MPLS).  Now seems the cause maybe from that, as there is no other changes made recently.

  • 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

  • Viewing Report created in Crystal Report Designer

    <p>Hi,</p><p>I&#39;m new to CR4E and tries to work with existing report. I saw many error while trying this, please excuse me to the long email below that I explain all the errors I saw......</p><p>I have some reports that were created in Crystal Report Designer (CR XI Release 2) connecting to the Oracle Database using "Oracle Server" type connection. How can I access it from CR4E? I have the following problem (in the order I see them)</p><p>1) In the Eclipse&#39;s JSP page, I specified the full path to the report, but I get a report not found error. Must the report locate within the project? Is there any way we can open a report outside of the project?</p><p>2) I copied the report to the project, </p><p>    a) followed jrc_print_report example to print the report, get "JNDI name not found" error. </p><p>    b) then generate a viewer page, but I get the Driver "crdb_oracle.dll" is not supported error.</p><p>3) I setup the new JNDI followed the jrc_changedatasource.jsp example to change the datasource, but I still get the "JNDI name not found" error.</p><p>4) I imported the report intoEclipse and changed the connection. Then I can create a jsp page to print it to a printer (I still can&#39;t view it, but my goal is to print, so that&#39;s ok). However, </p><p>    a) the original report has a "Command" object from the Oracle database to control where to select the report&#39;s data, when I remap, this object disappear and I cannot see how to recreate it. Any suggestion?</p><p>    b) also, the report is very complex with many subreports and it will be nightmare to go in and change all of the datasource, also a maintenance nightmare to maintain two copies. Any better suggestions?</p><p>Thank you very much! Your help is very appreciated.</p><p>Celia</p>

    Hi Celia
    1. Yes the Java Reporting Component (JRC) which is the runtime component of the Crystal Reports for Eclipse can open reports outside the project.  Its often better to have the reports inside the project for deployment purposes but you are welcome to put the report where ever you need it.Â
    Note: To use absolute paths, ensure that the CRConfig.xml file does not contain a reportlocation tag.
    2. The JRC can't report off of Oracle directly, you would need to use a JDBC driver to connect your reports to Oracle. The crdb_oracle.dll will never connect because its not Java.Â
    3. When the JRC finds that the report is not using a supported database driver it will do a lookup to find the name of the report datasource. When it finds the datasource name it will then do a JNDI lookup for a JDBC datasource with the same name. If your Application server doesn't have a datasource with that name it will through the error you were seeing.Â
    4. I'm not sure about losing the Command object when changing the datasource but this is probably happening because the Command is linked to the database driver.
    5. What you could try doing is creating a JDBC Datasource on your application server where this app will run with a JNDI name that matches your report datasource name. If your reports datasource name is "MyOracleDatasource" then I believe the JNDI name for new JDBC Datasource would have to be "jdbc/MyOracleDatasource".
    You could give this a try.
    Rob Horne
    http://diamond.businessobjects.com/blog/10

  • Creating a crystal report from R/3

    Hi,
    I am new to R/3. I am trying to create a new crystal report from R/3. I already connect crystal report with R/3 using integration kit. My problem now is i not sure which field i should i take from a which table when i look in R/3.I been provided a link, http://www.sap-img.com/sap-sd/important-tables-for-sap-sd.htm where i can check all the table for SD, PM n etc. For example, i go to t.code VA03 and search for an order, i see there is so many field. How do i know which field is from which table n row. Let said i want to pull the below information to my crystal report, how do i know which table and row i should take ? (this is just an example)
    PO Number, Po Date, Material, Order quantity, pricing date, net value and overall status
    Thank you

    Moved to Integration Kit forum.
    The people in this forum will know more about the data structure than the CR Design forum which typically doesn't know much about the SAP Data sources Structure.
    Don

  • Creating a Crystal Report for B1 without parameters

    Hi Experts,
    My question is a simple one.
    I create a crystal report for SAP B1 8.8 Patch 10 using CR 2008 SP02.
    I have no parameters since its showing sales figures of the past month.
    But when I run the report in SAP, a selection criteria screen pops up without any fields.
    Just OK and Cancel.
    I dont want my users to have to click OK. I need the report to pop-up once the user click on the SAP Menu for the report.
    My report file has no parameters.
    Thanks for the help
    Denis

    Deinis,
    In your report, do you mean:
    - you have parameter created, but not used in the report? OR
    - there is no parameter field in the report at all?
    The reason I am asking is:
    If you have parameter fields, But, you did not use it in the report, I think when you run the report within SAP B1, it will still prompts for user to enter something.
    Also, if you are using subreport, make sure there is no parameter in the subreport, Although you do not use them.  Just delete the parameter field from the list if you are not using them.
    Edited by: Shwu Hua Gan on Jun 20, 2010 2:59 AM

  • How to create a Crystal Report to connect to Oracle

    Hi,
    When I create a Crystal report to connect to SQL Server, I create a stored procedure to get all data I need and connect to it from Crystal Report.(In the stored procedure, I created temp tables, used cusor etc to run data.) But now I need to use a Oracle database. I heard I need to create a package and put this stored procedure in this package. Questions:
    1. if I need to create a package, how can I call the stored procedure from it?
    2. Can I create temp table in this procedure too? I need to create some temp tables to join together to get complex data.
    3. if I want the return data from stored procedure, do I still "select ... from ..." or there is another other ways?
    I am so desperated. Please help. I know this are very silly questions. But please.

    Hi Jenny,
    We are also using Crystal Reports for our Oracle Database, we normally just select the tables we want to use or create our own SQL query.
    However, if you really want to use Oracle stored-procedure (which performs faster than a SQL query because the stored procedure is compiled in advance), you can look at this document:
    http://support.businessobjects.com/communityCS/TechnicalPapers/scr_oracle_stored_procedures.pdf
    Hope this will answer your questions.

  • Using Jsp to create a crystal report

    Hi,
    I am using Jsp to create a crystal report from an oracle database.To create a new report document,i am using the ReportClientDocument class in the
    "com.crystaldecisions.sdk.occa.report.application.ReportClientDocument " package.
    I am using this code:
        ReportClientDocument rpt=new ReportClientDocument ();
                       rpt.newDocument();The report application server running on my machine does not support this.
    I have to use an IReportAppFactory interface method which is part of the package com.crystaldecisions.sdk.occa.managedreports.*,, in order to create a new report document.Can anbody help be know how to use this interface in a Jsp??
    Any help would be appreciated.
    Thanks,

    <p>Hi Tim,</p><p>      For security reasons we do not save the database password with the report. There are a few ways to solve what you are trying to do:</p><ol><li>Use the Create Viewer JSP page wizard to auto-generate the code. You will need to use the API option and select the option to <strong>"Log on to existing data connections" </strong>as well as the option to <strong>"Connect the CrystalReportPageViewer" </strong>(Note: I suspect that the reason you had a blank page the first time you tried this is because you did not have an Output option selected) <br /><br />The code that is generated will provide you with the ability to pass in the database authentication and then launch the report in the viewer.<br /><br /></li><li>The other option is to use a JNDI Connection at runtime. If you setup a JNDI Data Source you should have the ability to store the database authentication with the Data Source. To have the report use a JNDI connection at runtime you will need to set the name of the JNDI Data Source using the Properties View of the database in the Report Designer.</li></ol><p>Anyway, give this a shot and let me know how you make out.</p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <strong><a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a></strong>          </p>

  • Is there a way how to create new Crystal Report template programmatically?

    Hi all,
    I would like to know if there is any way how to call .NET code using Crystal Reports for VS2010 to create Blank Crystal Report template with specific DataDefinition?
    I want to save work with opening Crystal Reports application and manually adding DataDefinition fields which my application provides...
    Thank you for your reply in advance,
    Honza
    Edited by: honzajic on Sep 20, 2011 3:53 PM

    Hello Honza
    You will have to use the InProc RAS SDK as this includes report creation APIs. A few resources to get you started:
    [How to Use The RAS SDK .NET With In-Process RAS Server|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32]
    [Samples|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples]
    [Programming tutorial|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a]
    [Report Application Server .NET API Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_api_en.zip]
    [Report Application Server .NET SDK Developer Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_dg_en.zip]
    You may also find [this|http://book.soundonair.ru/sams/] website quite interesting.
    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]

  • Want to create a function module  which will convert smartform into PDF .

    Hi All ,
    Requirement : I want to create a function module/report  which will convert smartform into PDF .
    Thanks in advance

    Hi All ,
    zsuresh_test : for converting smartform into pdf.
    when I am excuting this report(zsuresh_test) and by passing the smartform name FOPCR_STANDARD_F1
    I am getting error :
    Incorrect parameter with CALL FUNCTION
    Can you  please help me out..
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'FOPCR_STANDARD_F1',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
    " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

Maybe you are looking for

  • Z cube created on IC_C03 not working correctly

    Hello Friends, We are using 0IC_C03 cube in BI 7 for getting the Inventory data from R/3. And have created a query on this cube which shows us the stock on any posting date, basically a replica query of MB5B transaction in R/3. The cube and query is

  • Ok. This is starting to get annoying.

    I have had my silver 80gb iPod Classic for quite awhile now and I have LOVED it. It's treated me extremely well. I've never once had a problem getting music onto it, editing anything on it, absolutely no problems what-so-ever. Until recently. I plugg

  • Can anyone help? installed tiger, now can't open address book

    when i click on the icon, it opens up for about a nanosecond and then disappears. so it's useless. anyone else experience this and know what to do? thanks! --nancy

  • Colors in Photoshop all wrong but OK in other apps. (For example "Whites appear yellow.")

    Q: The colors in Photoshop are all wrong. They have a neon look or are discolored with a blue, red, green or Yellow cast. I look at the same pictures in other applications and they look just fine. How do I fix this? A: Recalibrate your monitor using

  • Screen is going out.

    October 2007 i purchased a MacBook Pro. Since that time ive have not one problem with this computer until here about 5 months ago. Every time i would move my lid the screen would flicker like a bad connection. well it has gotten so bad that i have to