ODI Runtime Parameter value usage

Hi Gurus,
I need a variable which will be used to capture a value @ run-time of ODI scenario
This value will be used to update a table column.
When I would execute the scenario it should prompt for the value of this variable.
What I tried :-
create a variable: v_test
Data type : alphanumeric
Keep History :Latest Value
Refreshing:
Schema: Scott
Select Query: select 'xyz' from dual
---actually I don't want any value from any table...i dont need this select from dual
When I execute the scenario--->
It prompts for the value for "v_test" showing the devault value 'xyz'
If I select OK --->It updates the Test_Table as expected.
....But when I type in the value in the prompt it does not update.
Question:----
How do I use a run-time parameter value during the scenario execution..... please advise.

Hi starak,
Try this :
- Remove the query from the refresh tab.
- In your package you should a step for the variable in declare mode. You should not have a step in refresh mode.
- When generating a scenario, tell ODI to use the variable as parameter.
Hope it helps,
JeromeFr

Similar Messages

  • Crystal Runtime exception: Missing parameter values

    Our company did a PeopleTools upgrade at one of our clients recently. We upgraded them to PeopleTools 8.50.08. We had to convert all the Crystal Reports to the 2008 format using the RPT converter which is included in the Client install of PeopleTools.
    The only problem now is that a lot of the Crystal processes in PeopleSoft are failing with the following error:
    Crystal Runtime exception: Missing parameter values.
    I've checked the parameters which are being passed to the report and I see both parameters are filled:
    E:\HR881\BIN\CLIENT\WINX86\PSCRRUN.EXE -CTORACLE -CDHRMKPDEV -COPSDUT -CPOPRPSWD -I218609 -RP"PUP202K" -OT6 -OP"G:\PS\PSPRCS\log_output\HRMKPDEV\CRW_PUP202K_218609" -LGDUT -OF2 -ORIENTL "2000-10-01" "2002-06-30"
    Database type is Oracle. HRMS version is 8.8. I can run the Query which gets the data in just fine and I can also run the report from Crystal fine. This only happens with Crystal reports which have a date field as a parameter/prompt in the report.
    There's currently an SR open at Oracle, but I was hoping that someone here can help me nail this issue. I'm not too happy with the quallity of Oracle support, but that's a whole different story.

    <s>Just to be sure, did you put a space after each parameter name or is it a typo over here ?
    E:\HR881\BIN\CLIENT\WINX86\PSCRRUN.EXE -CT ORACLE -CD HRMKPDEV -CO PSDUT -CP OPRPSWD -I 218609 -RP "PUP202K" -OT 6 -OP "G:\PS\PSPRCS\log_output\HRMKPDEV\CRW_PUP202K_218609" -LG DUT -OF 2 -OR IENTL "2000-10-01" "2002-06-30"</s>
    Nicolas.
    sorry, it was wrong assumption.
    Edited by: N Gasparotto on Jun 2, 2010 5:11 PM

  • Unable to get parameter values from a remote database

    I am linking to a remote database view via a synonym in Oracle and trying to retrieve parameter values from it.  The username and password are the same for the local and remote database and I can run the SQL query using SQL plus against the database and values are returned.  However, when I try and run the same query in Crystal Reports (XI) I receive an Oracle error:
    "An attempt was made to connect or log in to a remote database using a connection description that could not be found.
    Action: 
    Specify an existing database link. Query the data dictionary to see all existing database links. See your operating system-specific Net8 documentation for valid connection descriptors. "
    How can it be that Crystal cannot run the query when it is valid in SQL plus?
    Any tips/info would be appreciated.
    many thanks
    Claire
    Oracle is version 10

    When running one of the reports in VS.Net this is the error I receive:
    "A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in crystaldecisions.crystalreports.engine.dll
    Additional information: Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2019 ]
    Failed to retrieve data from the database.
    Error in File C:\DOCUME1\CLAIRE1.REE\LOCALS~1\Temp\{0C6C6DD5-B958-4E10-A2AA-928C58E1B7CE}.rpt:
    Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2019 ]"
    When running the same report in Crystal Reports designer I receive this error message:
    "Prompting failed with the following error message: 'List of Values failure: fail to get values. [Cause of error: Failed to retrieve data from the database.  Details: [Database Vendor Code: 2019].  Failure to retrieve data from the database.  Error in File UNKNOWN.RPT.  Failure to retrieve data from the database.  Details: [Database Vendor Code: 2019]]'.
    Error source: prompt.dll Error code: 0x8004380D"
    So this one is also failing in the designer.
    All the parameters in the main report are static and the ones in the subreport are passed in from the main report.

  • Urgent help required - linked subreport keeps asking for parameter value

    Greetings,
    I have developed a report in the Crystal Reports bundled with Visual Studio 2005. The data is obtained from a stored procedure. One of the fields in the result set is named "Id".
    I have embedded a subreport in the details row of the main report. The subreport also gets its information from a stored procedure. This stored procedure has one parameter named "OpportunityId". This field is linked to the field named "Id" above. the subreport has been set to supress blank subreports.
    In the development environment and running the executable of the application on the development machine the report works perfectly. The subreport displays as it should and all is well.
    When I deploy the report onto user machines where they have the crystal runtime installed, the report keeps asking for a parameter value for the subreport.
    I cannot get this to stop happening.
    This report is urgently required. PLEASE could someone help me out here.
    I am at my wits end.
    I have attached a zipe file containing the following:
    - the two stored procedure
    - the rpt file
    - a sample report
    - a screen showing the report having just been generated
    Thanks in advance,
    Robert Lancaster

    <p>Hi Robert,</p><p>I see your report template and stored procedures. All seems to be ok. <br /></p><p>The most important is to assign the report parameters for all linked subreports (only one in your case).</p><p> </p><p>Try this (in C#, in VB.NET the code are very similary): </p><p>ReportDocument report = new ReportDocument(@"TopFortyReport.rpt");</p><p>AssignParameters(report, paramCollection);</p><p>// and now assign parameters to all linked subreports </p><p>foreach( CrystalDecisions.CrystalReports.Engine.Section section in report.ReportDefinition.Sections)</p><p>{</p><p>    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject reportObject in section.ReportObjects)<br />    {</p><p>        if (reportObject.Kind == ReportObjectKind.SubreportObject) </p><p>        {</p><p>            SubreportObject subReport = (SubreportObject)reportObject;</p><p>            ReportDocument subDocument = subReport.OpenSubreport(subReport.SubreportName);                                               AssignParameters(subDocument, paramsCollection);</p><p>        }</p><p>} </p><p> </p><p>void AssignParameters(ReportDocument report, object[] paramsCollection)</p><p>{</p><p>    int nParams = paramsCollection.Length;</p><p>    for (int iParamIndex = 0; iParamIndex < nParams; iParamIndex++)</p><p>    {</p><p>        if (report.DataDefinition.ParameterFields[iParamIndex].IsLinked())</p><p>            continue;</p><p>        report.SetParameterValue(iParamIndex, paramsCollection[iParamIndex]);</p><p>    }</p><p>}</p><p> </p><p> </p>

  • Crystal Report Prompt For Enter Parameter Values

    Hi,
    I did a report with 2 subreports embeded in VS2005 using VB and it worked fine but when I ported the whole application to VS2008 the above problem occurs. Here are some codes:
        Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click
            Dim viewer As New frmReportPreview
            Dim rpt As New ReportDocument
            Try
                rpt.Load("C:\Report\crptMain.rpt")
                rpt.SetParameterValue("Code", Me.cbxCode.Text)
                rpt.SetParameterValue("Code", Me.cbxCode.Text, "crptSubReport1.rpt")
                rpt.SetParameterValue("Code", Me.cbxCode.Text, "crptSubReport2.rpt")
                viewer.report = rpt
                viewer.WindowState = FormWindowState.Maximized
                viewer.ShowDialog()
            Catch crptEx As CrystalDecisions.CrystalReports.Engine.EngineException
                MessageBox.Show(crptEx.Message, "Crystal Report Errors...")
            Catch ex As Exception
                MessageBox.Show(ex.Message, "Crystal Report Errors...")
            End Try
        End Sub
    Private Sub frmReportPreview_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            Try
                Me.CrystalReportViewer.ReportSource = m_report
                Me.CrystalReportViewer.RefreshReport()
            Catch ex As Exception
                MessageBox.Show(ex.Message, "Error...")
            End Try
        End Sub

    Subreport Parameters are contained within the Main Report's ParameterFieldDefinitions collection. Passing Subreport Parameter values directly to the Subreport will result in the values not being applied and the user being prompted at runtime to provide new values.
    Ludek

  • How to disable "Enter Parameter Values" for optional paramters?

    I'm having issues getting the Crystal Reports .NET Viewer to suppress the "Enter Parameter Values" dialog for optional parameters.  I have templates created using Crystal Reports 2008 and am linking against the CR for VS 2010 runtime.
    Within the report template the optional paramter has "Optional Prompt" set to "True".  This particular parameter also allows multiple values and is used in record selection.  Within the record selection it is using HasValue().
    It seems the parameter is set up properly as I have other parameters that are set within the code that are not prompted for.  If I pass in the optional parameter through the code the "Enter Paramater Values" dialog also does not appear and the report is generated correctly.  All of the parameters are set using ParameterFields and they are set before the ReportSource is set.
    Looking through the .NET API documentation it seems like the CrystalReportViewer should have an "EnableParameterPrompt" property that would do what I want however it doesn't seem to be a valid parameter as I get compile errors when I try to use it...  Not sure if it matters or not but I am using managed C++ and our application is built using Visual Studio 2005.  Could that maybe have something to do with it?
    Thanks,
    -Ben

    OK, I'm going to answer my own question as with a little more digging I was able to find out that I needed to set some stuff on the report document to specify that there are no values.  Still not sure why "EnableParameterPrompt" is not valid for me though as it seems like that would work as well.  At any rate here is what I needed to do:
    ReportDocument->ParameterFields[<Optional Parameter Name>]->CurrentValues->Clear();
    ReportDocument->ParameterFields[<Optional Parameter Name>]->CurrentValues->IsNoValue = true;
    -Ben

  • How to hide the window of Runtime Parameter Form?

    I have a form and I call a report from this form.I have passed some parameters to this report.Before the browser of reports appear the window of Runtime Parameter Form.I want to hide this window of Runtime Parameter Form but I don't know how.
    Please help me!

    When calling the report, set the property PARAMFORM to NO. IF you using parameter list to pass values to report you can do as follows:
    ADD_PARAMETER(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');

  • Not seeing parameter values in SBO while running a crystal report w/Zebra

    I am using the crystal reports addon for SAP Business One.  I created a report which prints a label (1"x3") on a zebra thermal printer.  If I run the report within SAP Business One with a default printer other then the zebra printer I see the drop downs for the parameter values.  However when I select the values and print it , the label does not print correctly.  It appears as if crystal thinks the label is 3"x1".  If I try to run the report with the zebra printer as a default printer within SAP Business One, the drop downs for selecting the parameters are gone.
    If I run the report within crystal 2008 directly, I have no problems with printing the label properly as long as the Zebra Printer is not the default printer.  I have updated crystal 2008 with all available service packs and updates.  I have made registry entries on the server and workstations to allow more than enough values to be seen in the parameter dropdowns.
    Does anyone have any idea why the report will not work when being executed within SAP Business One?

    Susan,
    I'm not sure if the attached thread is relevant for you? I am also searching related to issues with Zebra, although mine are with PLD.
    Re: Crystal Reports viewer(runtime) barcode printing problem

  • CRVS2010 Beta - Missing parameter values

    I want to export my report to pdf file and I want to set some parameters in report in runtime.
    But when I try to do it I have exception "Missing parameter values".
    Productversion: Visual Studio 2010 + Crystal Report 2008 + service pack v3.
    I read that problem was resolved in service pack v2.
    But now I don't have any idea how to fix my problem.
    I create report and add parameters ("MyParameter") as string.
    My test project:
    //Load report
    //Set db connection
    try
                            ParameterValues crParameterValues = report.DataDefinition.ParameterFields["MyParameter"].CurrentValues;
                   ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue {Value = "SBSUrl"};
                   crParameterValues.Clear();
                   crParameterValues.Add(crParameterDiscreteValue);
                   report.DataDefinition.ParameterFields["MyParameter"].ApplyCurrentValues(crParameterValues);
                   report.VerifyDatabase();
                   report.Refresh();
                      string reportFileName = string.Format(@"D:\CrystalReport\CRResult-{0}.pdf", DateTime.Now.Ticks);
                      ExportOptions rptExportOption;
                      var rptFileDestOption = new DiskFileDestinationOptions();
                      var rptFormatOption = new PdfRtfWordFormatOptions();
                      rptFileDestOption.DiskFileName = reportFileName;
                      rptExportOption = report.ExportOptions;
                           rptExportOption.ExportDestinationType = ExportDestinationType.DiskFile;
                           rptExportOption.ExportFormatType = ExportFormatType.PortableDocFormat;
                           rptExportOption.ExportDestinationOptions = rptFileDestOption;
                           rptExportOption.ExportFormatOptions = rptFormatOption;
                      report.Export(); //  I have exception here ("Missing parameter values.")
                 catch (Exception e)
                      Console.WriteLine(e);
              private void SetCurrentValuesForParameterField(ReportDocument reportDocument, ArrayList arrayList)
                   ParameterValues currentParameterValues = new ParameterValues();
                   foreach (object submittedValue in arrayList)
                        ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
                        parameterDiscreteValue.Value = submittedValue.ToString();
                        currentParameterValues.Add(parameterDiscreteValue);
                   ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
                   ParameterFieldDefinition parameterFieldDefinition = parameterFieldDefinitions["MyParameter"];
                   parameterFieldDefinition.CurrentValues.IsNoValue = true;
                   parameterFieldDefinition.ApplyCurrentValues(currentParameterValues);
    Could anybody help me with this exception?

    Make sure you log on to the database, set the parameter, then export.
    See the following KBases:
    [1244475 - Error: Missing parameter value when exporting a Crystal Report with optional parameters using the CR .NET SDK|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
    [1215426 - Err Msg: Missing parameter value when printing or exporting in VS .NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
    [1215536 - Err Msg: Missing parameter field current value when exporting/printing in .NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
    [1216546 - Err Msg: Missing Parameter Field Current Value when viewing a report in VS.NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
    Also, see the following forum thread for possible solutions:
    Passing Parameters CR 2008 VS 2008 ASP.net
    Ludek

  • Missing Parameter Values while using Change SubReport links

    Hi,
    I am using Change SubReport Links to pass data from Main Report to the SubReport. The report works fine at design time when I preview it, but at runtime I get "Missing Parameter Values" error.
    As I have used Chanage SubReport Links do I still need to pass the parameter to the SubReport from the code.
    cr.Export gives this error.
    Below is the code
    ExportOptions crExportOptions;
            DiskFileDestinationOptions crDiskFileDestinationOptions;
            string Fname = string.Empty;
            string strReportName = string.Empty;
            ReportDocument cr = new ReportDocument();
            string strReportPath = Request.PhysicalApplicationPath.ToString() + @"Members\Reports\UnPaidReceipt.rpt";
            if (!System.IO.File.Exists(strReportPath))
                throw (new Exception("Unable to locate report file:\n" + strReportPath));
            cr.Load(strReportPath);
            MtollBLL Unpaid = new MtollBLL();
            cr.SetDataSource(Unpaid.GetUnpaidPayments().DefaultView.Table);
            // Set the Crytal Report Viewer control's source to the report document.
            CrystalReportViewer1.ReportSource = cr;
            MtollBLL Violation= new MtollBLL();
            cr.Subreports[0].SetDataSource(Violation.GetReportViolation().DefaultView.Table);
            // cr.PrintToPrinter(1, False, 0, 0)
            Response.Write( cr.Subreports[0].DataDefinition.ParameterFields.Count);
            Fname = Request.PhysicalApplicationPath.ToString() + Session.SessionID.ToString() + ".pdf";
            crDiskFileDestinationOptions = new DiskFileDestinationOptions();
            crDiskFileDestinationOptions.DiskFileName = Fname;
            crExportOptions = cr.ExportOptions;
            crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
            crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
            crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
            cr.VerifyDatabase();
            cr.Subreports[0].VerifyDatabase();
            cr.Export();//' The following code writes the pdf file to the Clientu2019s browser
    Please Advise.

    Please post your SDK development questions to the Developers forum

  • Missing Parameter Values CR2008 Optional Parameter

    Hi,
    I am getting "Missing Parameter Values" error
    "CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Fehlende Parameterwerte. ---> System.Runtime.InteropServices.COMException (0x8004100E)"
    if I try to export a Report with an optional Parameter without setting the parametervalue.
    The Report works fine with ReportViewer.
    If I uncomment the "Parameterpart" and set a parametervalue it works fine, but it should works without a parametervalue too, its optional.
    I have tried many for a long time and read many Websites but it does not work !
    I use WinXP SP2 CR2008 with C# .NET 2.0 VS2005
    CrystalDecisions.CrystalReports.Engine.dll version 12.0.2000.683 Date: 2008-03-01
    CrystalDecisions.Shared.dll version 12.0.2000.683 Date: 2008-03-01
    Sorry my English is very Bad !
    Thanks a lot!
    ExportFormatType ExportType = ExportFormatType.PortableDocFormat;
                ReportDocument RD = new ReportDocument();
                RD.Load("C:\\ParaTest01.rpt");
                string strServer = "<ServerName>";
                string strDB = "<DBName>";
                string strUser = "<UserID>";
                string strPW = "<PW>";
                RD.SetDatabaseLogon(strUser, strPW, strServer, strDB);
                //ParameterFieldDefinitions crParameterFieldDefinitions = RD.DataDefinition.ParameterFields;
                //ParameterFieldDefinition crParameter1 = crParameterFieldDefinitions[0];
                //ParameterValues crParameter1Values = crParameter1.CurrentValues;
                //ParameterDiscreteValue crDiscrete1Value = new ParameterDiscreteValue();
                //crDiscrete1Value.Value = "GER";
                //crParameter1Values.Add(crDiscrete1Value);
                //crParameter1.ApplyCurrentValues(crParameter1Values);
                RD.ExportToDisk(ExportType, "C:\\Test2.pdf");
    RecordSelectionFormula in Report:
    (not HasValue({?Land}) OR {tab.location_code} = {?Land}) and
    {tab.sup} = "XXX" and
    {tab.Accounting_Period} = "200801"

    You need to be careful when using optional parameters. If you are using the optional parameter in a record selection formula you'll need to check and make sure it has a value before you use it. There is a function call HasValue() that you can use to do this.
    If you have an optional parameter in the record selection formula and you don't pass a value you'll need to make sure your selection formula can be completed with out it.
    This is an excerpt from our help file.
    Crystal Reports supports optional parameters. An optional parameter is a prompted value that does not have to be supplied by the user.
    Report designers should provide some guidance to the end user that a parameter is optional by adding this information to the prompt text.
    Optional parameters are treated by Crystal Reports as optional anywhere within the report that they are used. You cannot set one instance of the parameter to optional and another to mandatory.
    Note: After you set a parameter to optional, if you use the Select Expert, the system will automatically add the selection formula for you using the HasValue() function.
    The Formula Workshop Editor does not automatically add the formula. Only the Select Expert automatically adds the formula for you.
    If you change the parameter from optional to mandatory, the HasValue() function is not automatically removed from your formula.
    Handling a parameter with no value
    When the report engine evaluates any formula which references an optional parameter that does not have a value, it generates a runtime error. All formulas that reference an optional parameter should first use the HasValue() function to check if that parameter has a value before evaluating it. This includes record selection formulas and saved data formulas.
    Note: The system will not automatically drop a statement from the SQL WHERE clause. It is the report designeru2019s responsibility to decide which statement to leave out based on HasValue() testing.

  • Missing parameter values when trying to export to pdf in C#

    HI all,</BR>
    </BR>
    I'm having a problem passing a parameter from my c#.NET code through Crystal Reports 2008...</BR>
    </BR>
    Crystal Reports Developer version 12.1.0.892</BR>
    using a WinXP machine</BR>
    The parameter I've setted up in Crystal Reports Design is one to dynamically change the query that will run on the report:</BR>
    "SELECT * FROM  REPORTS.{?Protocolname}_FC_QUERY"</BR>
    </BR>
    </BR>
    The code I use calling one of the reports I must provide:</BR>
    </BR>
    using System;</BR>
    using System.Collections.Generic;</BR>
    using CrystalDecisions.CrystalReports.Engine;</BR>
    using CrystalDecisions.Shared;</BR>
    using System.Data;</BR>
    using System.Data.OracleClient;</BR>
    using System.Collections;</BR>
    namespace CrystalReportsRapportjes</BR>
    {</BR>
    class MainClass</BR>
    {</BR>
    public static void Main(string[] args)</BR>
    {</BR>
    Console.WriteLine("Start of program!");</BR>
    string connString = "server=CT_PRD;user id=report;password=report";</BR>
    OracleConnection conn = new OracleConnection(connString);</BR>
    try</BR>
    {</BR>
    conn.Open();</BR>
    Console.WriteLine("Connection opened.");</BR>
    </BR>
    Console.WriteLine("Connection Properties:");</BR>
    Console.WriteLine("\tConnection String: {0}", conn.ConnectionString);</BR>
    Console.WriteLine("\tServerVersion: {0}", conn.ServerVersion);</BR>
    Console.WriteLine("\tState: {0}", conn.State);</BR>
    QL_ExportReport("C:\\Data\\converted2crystal\\PLANNING_REPORT_params.rpt");</BR>
    </BR>
    } catch (OracleException e) {</BR>
    Console.WriteLine("Error: " + e);</BR>
    } finally {</BR>
    conn.Close();</BR>
    Console.WriteLine("Connection closed.");</BR>
    }</BR>
    Console.WriteLine("End of program!");</BR>
    Console.ReadKey();</BR>
    }</BR>
    private static void QL_ExportReport(string reportName)</BR>
    {</BR>
    ReportDocument CR_reportDocument = new ReportDocument();</BR>
    DataSet ds = new DataSet();</BR>
    CR_reportDocument.Load(reportName);</BR>
    CR_reportDocument.SetDatabaseLogon("Reports", "Reports");</BR>
    for(int i=0;i<CR_reportDocument.DataDefinition.ParameterFields.Count; i++)</BR>
    {</BR>
    Console.WriteLine("Reading parameters");</BR>
    Console.WriteLine(CR_reportDocument.DataDefinition.ParameterFields<i>.ParameterFieldName);</BR>
    if(CR_reportDocument.DataDefinition.ParameterFields<i>.ParameterFieldName==
    "Protocolname")</BR>
    Console.WriteLine("Correct parameter found, now assigning value");</BR>
    ParameterValues ThisPV = new ParameterValues();</BR>
    ThisPV.AddValue("TMC999C999");</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.Clear();</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.DefaultValues.Clear();</BR>
    </BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.ApplyCurrentValues(ThisPV) ;</BR>
    //CR_reportDocument.SetParameterValue("Protocolname","TMC999C999");</BR>
    //CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.AddValue(ThisPV);</BR>
    }</BR>
    CR_reportDocument.Refresh();</BR>
    CR_reportDocument.ExportToDisk</BR>(ExportFormatType.PortableDocFormat,"C:\\Data\\converted2crystal\\EDC_PLANNING_RPT_params.pdf");</BR>
    CR_reportDocument.Close();</BR>
    }</BR>
    }</BR>
    }</BR>
    </BR>
    The exceptions he throws using this code is = CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: </BR>Missing parameter values. ---> System.Runtime.InteropServices.COMException: Missing parameter values.</BR>
    at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException</BR>
    at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream</BR>
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream</BR>
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export</BR>
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk</BR>
    at CrystalReportsRapportjes.MainClass.QL_ExportReport in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 72</BR>
    at CrystalReportsRapportjes.MainClass.Main in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 33</BR>
    </BR>
    When I use the code</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.AddValue(ThisPV);</BR>
    instead of</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.ApplyCurrentValues(ThisPV) ;</BR>
    </BR>
    the error I get there is:</BR>
    System.ArgumentException: Value does not fall within the expected range.</BR>
    at CrystalDecisions.Shared.SharedUtils.ConvertToDecimal</BR>
    at CrystalDecisions.Shared.ParameterDiscreteValue.set_Value</BR>
    at CrystalDecisions.Shared.ParameterValues.AddValue</BR>
    at CrystalReportsRapportjes.MainClass.QL_ExportReport in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 69</BR>
    at CrystalReportsRapportjes.MainClass.Main in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 33
    </BR>
    </BR>
    </BR>
    Can someone please tell me what's the right way passing a parameter to a report?</BR>
    </BR>
    Thanks in advance.</BR>

    You should use the
    ReportDocument.SetParameterValue("ParameterName", "ParamValue");
    >
    Els Cochez wrote:
    > When I use the code</BR>
    > CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.AddValue(ThisPV);</BR>
    > instead of</BR>
    > CR_reportDocument.DataDefinition.ParameterFields<i>.ApplyCurrentValues(ThisPV) ;</BR>
    > </BR>
    > the error I get there is:</BR>
    > System.ArgumentException: Value does not fall within the expected range.</BR>
    > at CrystalDecisions.Shared.SharedUtils.ConvertToDecimal</BR>
    > at CrystalDecisions.Shared.ParameterDiscreteValue.set_Value</BR>
    > at CrystalDecisions.Shared.ParameterValues.AddValue</BR>
    > at CrystalReportsRapportjes.MainClass.QL_ExportReport in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 69</BR>
    > at CrystalReportsRapportjes.MainClass.Main in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 33</BR>
    > </BR>
    > </BR>
    > Can someone please tell me what's the right way passing a parameter to a report?</BR>
    > </BR>
    Try parsing the parameter value to a decimal value before setting it as parameter value.
    Hope this will help

  • "Missing parameter values" error on Export

    Hi,
    I am getting "Missing Parameter Values" error if all required parameter values are not passed in the report through application. Same error is not coming when all the parameters are passed.
    And parameter window also not displaying if all parameters are not passed to the report for export option. (Parameter window displaying on preview option if all the parameters are not supplied).
    I have tried both Report Viewer's ExportReport function & ReportDocument's Export function. But both are results same.
    Software details:
    Crystal Report created in Version: 10.0.0.533
    .Net 2005
    10.2 Crystal component. Crystal Runtime Version - v2.0.50727 and DLL Version - 10.2
    Please help me to resolve this issue.
    Thanks,
    Venkateswaran.P

    Given example is not working as expected.
    1) Calling of  ExportReport() function invokes the file Save As window to save the exported file eventhough exported path & file name supplied in the program.
    2) After accepting the output file name, "Missing parameter values" error coming instead of displaying Crystal's Parameter window.
    Below is the piece of code to export the output. I am calling Export() function if all the parameters are supplied by the application otherwise i am calling Viewer's ExportReport() fuction. Please have a look and let me know if any code change is required.
                   ReportDocument crRepDocument;
                   String m_strExportPath;
                    Boolean bUseRepViewExport = false;
                    if( crRepDocument.ParameterFields.Count > 0 )
                        if (m_Parameters.Count < crRepDocument.ParameterFields.Count)
                                bUseRepViewExport = true ;
                    ExportOptions crExportOptions;
                    DiskFileDestinationOptions crDiskFileDestinationOptions;
                    crDiskFileDestinationOptions = new DiskFileDestinationOptions();
                    crExportOptions = crRepDocument.ExportOptions;
                    if (base.m_ExportFormat == eExportFormat.RTF)
                       crDiskFileDestinationOptions.DiskFileName = base.m_strExportPath + ".rtf";
                        crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                        crExportOptions.ExportFormatType = ExportFormatType.RichText;
                        crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
                    else if (base.m_ExportFormat == eExportFormat.PDF)
                        crDiskFileDestinationOptions.DiskFileName = base.m_strExportPath + ".pdf";
                        crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
                        crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                        crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
                    else if (base.m_ExportFormat == eExportFormat.DOC)
                     if (bUseRepViewExport)  //If all the parameter are not supplied. I calling Viewer
                        FormReportViewer oFormReportViewer = new FormReportViewer();
                        oFormReportViewer.CrystalReportViewer.ReportSource = crRepDocument;
                        oFormReportViewer.CrystalReportViewer.ExportReport();
                        return true;                 
                    else
                        crRepDocument.Export();  //
                        return true;

  • Java console runtime parameter not working

    I'm tring to increase the size of memory available to my applet by adding a java runtime parameter in my Java Console. The runtime parameter is: Xmx512M
    Which changes the deployment.properties file to:
    #deployment.properties
    #Mon Nov 22 14:46:50 GMT-06:00 2004
    deployment.browser.vm.iexplorer=true
    deployment.browser.vm.mozilla=false
    deployment.version=1.5.0
    deployment.console.startup.mode=SHOW
    deployment.system.tray.icon=true
    deployment.capture.mime.types=true
    deployment.browser.path=C\:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE
    #Java Web Start jre's
    #Mon Nov 22 14:46:50 GMT-06:00 2004
    #Java Plugin jre's
    #Mon Nov 22 14:46:50 GMT-06:00 2004
    deployment.javapi.jre.1.5.0.args=Xmx512M
    deployment.javapi.jre.1.5.0.osname=Windows
    deployment.javapi.jre.1.5.0.osarch=x86
    deployment.javapi.jre.1.5.0.path=C\:\\Program Files\\Java\\jre1.5.0
    But when I run the applet I find that my max memory has not been changed from the default (65MB). I can thell this by outputting the max memory:
    System.out.println("Memory Max = " + Runtime.getRuntime().maxMemory());
    This line results in the output:
    Memory Max = 66650112
    So this output makes me believe that the runtime parameter is not being set correctly . When I run my applet in an executable jar locally (java -Xmx1024M -jar myApplet.jar) it sets the runtime parameter fine and memory is increased as expected.
    Am I doing something wrong in the Java Control panel? Is my syntax incorrect?

    I had no problem using IE6 or mozilla 1.7.3
    html file
    <OBJECT ID="SUN" WIDTH=500 HEIGHT=120 CLASSID="CLSID:8AD9C840-044E-11d1-B3E9-00805F499D93">
    <PARAM NAME="code" value="Test.class">
    </OBJECT>class file
    public class Test extends java.applet.Applet {
        public void init() {
              System.out.println("Memory Max = " + Runtime.getRuntime().maxMemory());
    }deployment props
    #deployment.properties
    #Fri Nov 19 10:38:15 CET 2004
    deployment.browser.vm.iexplorer=false
    deployment.browser.vm.mozilla=true
    deployment.version=1.5.0
    deployment.console.startup.mode=SHOW
    deployment.system.tray.icon=true
    deployment.capture.mime.types=true
    deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe
    #Java Web Start jre's
    #Fri Nov 19 10:38:15 CET 2004
    #Java Plugin jre's
    #Fri Nov 19 10:38:15 CET 2004
    #deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    deployment.javapi.jre.1.5.0.args=-Xmx512M
    deployment.javapi.jre.1.5.0.osname=Windows
    deployment.javapi.jre.1.5.0.osarch=x86
    deployment.javapi.jre.1.5.0.path=C\:\\Program Files\\Java\\jre1.5.0Output of the applet:
    Memory Max = 532742144

  • ODI-17511: No value to be set to variable

    I have a variable in refresh mode (togetfilename) to the interface
    after going through the loop (processed all files) then this vaiable is getting the following error
    I have used this link to make this loop condition
    http://www.odigurus.com/2011/05/multiple-files-single-target-table.html
    How do I get stop this error and get smooth stop the package run (I am using email as the stop, but the operator says error on this step)
    ODI-1226: Step GetTheFileName fails after 1 attempt(s).
    ODI-1236: Error while refreshing variable ACTIVITIES.FILE_NAME.
    Caused By: java.lang.Exception: ODI-17511: No value to be set to variable 'ACTIVITIES.FILE_NAME'.
         at oracle.odi.runtime.agent.execution.sql.RefreshVariableExecutor.execute(RefreshVariableExecutor.java:70)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.processTask(SnpSessTaskSqlV.java:410)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.java:240)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1889)
         at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$2.doAction(StartScenRequestProcessor.java:580)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:513)
         at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:1066)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)Any help would be greatly appreciated.
    Thanks,

    hi,
    you can add a additional variable with count of rows and do validation against 0 i.e., if count(X) > 0 then loop and decrement count by 1 for every iteration.
    Or you can add KO path from this variable to your odisendemail
    regards
    sreekanth

Maybe you are looking for

  • Family sharing calendar not created

    i have set up Family Sharing for two family members and myself.  They accepted my invitatioms and everything appears to be working properly, but a shared calendar wasn't created 'automatically' as promised.  The shard photo album was created and I ha

  • Dazzle Video Bridge

    I have a Dazzle USB Video Bridge. Is there a way to import video into iMovie using this? I cannot get iMovie to recognize that it is there. Any ideas are appreciated.

  • Weblogic Console Access Denied - Admin Role group question

    I need to grant access to a user that is authenticated via OAM. My authentication is succeeding and I am getting the following back as my Principal: <weblogic.security.service.internal.WLSIdentityServiceImpl.getIdentityFromSubject Subject: 3      Pri

  • Cost center user exit

    Hi all, This is what we are doing . We go to tcode KA02 to remove the cost center associated with the cost element. We are  planning to find an exit in tcode MB1C to populate this cost center in the bseg segment based on a custom table.  But if we ar

  • How to get GMT time in Millis?!

    Hello, I'm trying to get the currentime in millis as per GMT timezone. GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT"));                     java.util.Date d =  c.getTime();                     timeNow =  new Timestamp(d.getTi