Why do I get Missing Parameter Values error from CrystalReportViewer in VS2005

Post Author: eseidel
CA Forum: .NET
Hi everyone,
I have spent way to much time trying to figure this problem out and am getting no where now. I was hoping someone with more experience in CR for VS2005(I think v.9) and VS2005 may be able to help.  I have a report with 10 parameters that Im setting in code.  I have another 3 parameters in a subreport(with same names as 3 in main report) that are being pushed in(I hope) through my ApplyParams() method.  I have checked the output of each parameter before and after it is assigned in ApplyParams.  All values are being set....So why do I keep getting an error when I run it for Missing Parameter Values no matter what I do?  The error comes after SetDBLogonForReport(myConnectionInfo).  I have been struggling with this problem for almost 3 days now and have tried numerous approaches.  If I remove the subreport it works ok.  Why is subreport not getting parameters(I think this is where the problem stems from)?  Please any advice would be greatly appreciated.  Thank you. If need be I can e-mail the report but I don't know how much that will help without being able to access the datasources.
Eric
Code Snippet
Private _Parameters As New System.Collections.Specialized.StringDictionary
Public Property Parameters() As System.Collections.Specialized.StringDictionary
     Get
         Return (_Parameters)
     End Get
     Set(ByVal Value As System.Collections.Specialized.StringDictionary)
        If (Value Is Nothing Or _Parameters Is Nothing) Then Exit Property
        For Each entry As DictionaryEntry In Value
            _Parameters.Add(entry.Key, entry.Value)
        Next
   End Set
End Property
Private Sub SetParameters()
    Parameters("kiPerformance") = rptKi.ToString
    Parameters("PreparedBy") = rptPreparedBy
    Parameters("SupplierName") = rptSupplierName
    Parameters("Supplier") = rptSupplier  'Param in subreport too
    Parameters("ApprovedBy") = rptApprovedBy
    Parameters("kiPerformanceGoal") = rptKiThisGoal.ToString
    Parameters("kiForecastGoal") = rptKiForecast.ToString
    Parameters("kiNextGoal") = rptKiNextGoal.ToString
    Parameters("kiBegRange") = rptBegDate.ToString("d") 'Param in subreport too
    Parameters("kiEndRange") = rptEndDate.ToString("d") 'Param in subreport too
End Sub
Public Function ApplyParams()
    Me.SuspendLayout()
    Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument = _
    crv.ReportSource
    If (rpt Is Nothing OrElse _Parameters Is Nothing) Then Return False
    Dim crParameterFieldDefinitions As ParameterFieldDefinitions = rpt.DataDefinition.ParameterFields
     If (crParameterFieldDefinitions Is Nothing) Then Return False
     For Each crParameterFieldDefinition As ParameterFieldDefinition In crParameterFieldDefinitions
         If ((Not crParameterFieldDefinition.IsLinked) And _
             _Parameters.ContainsKey(crParameterFieldDefinition.Name)) Then
               Dim crParameterValues As ParameterValues = _
               crParameterFieldDefinition.CurrentValues
               If Not (crParameterValues Is Nothing) Then
                     Dim crParameterDiscreteValue As New ParameterDiscreteValue
                     crParameterDiscreteValue.Value =  _Parameters.Item(crParameterFieldDefinition.Name)
                     crParameterValues.Add(crParameterDiscreteValue)
                     'Console.WriteLine(crParameterFieldDefinition.Name & ": " & crParameterDiscreteValue.Value)
                    crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
              End If
          End If
       Next
       crv.ReportSource = rpt
       Me.ResumeLayout()
       Return Nothing
End Function
Private Sub ConfigureCrystalReports()
        Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo
        Dim pFields As New ParameterFields()
         Dim pField As New ParameterField()
         Dim disVal As New ParameterDiscreteValue()
         'Connection stuff,sorry I can't show you this part
         'Bind report
        rptCard = New ReportCard
       LoadDataSource()
       rptCard.SetDataSource(dsOcc)
       rptCard.Subreports("FailOcc").SetDataSource(dsOcc)  'Ive tried without this line as well
       rptCard.PrintOptions.PaperSize = PaperSize.Paper11x17
       rptCard.PrintOptions.PaperOrientation = PaperOrientation.Landscape
       crv.ReportSource = rptCard
       'Load parameters for report
       SetParameters()
       crv.RefreshReport()
       SetDBLogonForReport(myConnectionInfo)
End sub
Private Sub SetDBLogonForReport(ByVal conn As ConnectionInfo)
         Dim tableLogOnInfos As TableLogOnInfos = crv.LogOnInfo
         For Each myTableLogOnInfo As TableLogOnInfo In tableLogOnInfos
              myTableLogOnInfo.ConnectionInfo = conn
         Next
End Sub
Private Sub crv_Error(ByVal source As Object, ByVal e As CrystalDecisions.Windows.Forms.ExceptionEventArgs) Handles crv.Error
      MsgBox(e.Exception.Message)
      e.Handled = True
End Sub
Private Sub crv_ReportRefresh(ByVal source As Object, ByVal e As CrystalDecisions.Windows.Forms.ViewerEventArgs) Handles crv.ReportRefresh
       ApplyParams()
End Sub

Post Author: mewdied
CA Forum: .NET
By any chance are the parameters in your subreport stored procedure parameters?
There was a specific fix for stored procedure parameters available from:ftp://ftp1.businessobjects.com/outgoing/CHF/crnet20win32x86_en_chf.zip
The specific fix is described in the readme under Problem ID # ADAPT00532856

Similar Messages

  • "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;

  • Missing Parameter values - Error

    Post Author: Shayari
    CA Forum: .NET
    Hello,
    There is a main report,from which we pass the parameters to the subreport.The subreports parameters are the stored procedure's input parameters which are created when the SP is included as the datasource.When we integrate the master .rpt file with the C# application it throws a error saying "Missing parameter values" at the exporting line in the code. .We also get an error when we try to 'Verify database' for the subreports in the CRXI UI. The errror states "Prompting failed with the following error message Error source: Error code 0*8000FFF". This error occurs when in "Change the Subreport links" we update the "Subreport parameter fields to use" to match with the input parameters of the subreport's SP.
    We are using Crystal reports XI with Visual Studio 2005.
    Any help is much appreciated.Thank you.
    Regards,
    Shayari

    2 Things:
    1) CRXI is not compatible with VS2005. You need to upgrade to CRXIR2.
    2) You need to pass the parameters to the report before exporting the report, as Crystal need to get the report data and then exports it. It will not prompt for parameters as we are not viewing it.
    But before all this you need to make sure that you can view the report in Designer properly. Because once the report works fine in designer we can concentrate on the sdks and its working.
    Hope it helps !

  • "Missing parameter value" error on autoprinting with CR layout

    Hi all, i had recently run into the following:
    document layouts that work perfectly from preview and after adding a document, dont work if the document is auto printed on add.
    Gives an error:
    missing parameter value
    And in system messages log:
    Error during printing: ensure all parameter values are defined.
    With only @dockey token  present in the layouts (so no other parameter).
    What makes me wonder is that this doesn't happen to all the layouts, most of them works perfectly the same way (only dockey parameter, autoprint is set etc.) but the stock related documents do this on add.
    Any ideas?
    I found a likely issue in note 1466274 but it's listed as fixed in 8.8 PL 13, we are on PL 15. Could reproduce on PL 18.
    Thanks and regards.
    Daniel

    Hi Gordon.
    I could reproduce on the test copy of the db even on different patch levels.
    Can this be the almost same issue as stated in the note? I mean same code problem but at another point?
    Yesterday i found another example:
    uppon exiting the dunning wizard with print and exit option allmost the same error. The difference is that beforehand the same error messages one pops up with the following:
    title:Crystal Reports Windows form viewer
    "A report application server meghibásodott." (this is even with sap b1 gui langugage set to english)
    "The Report application server crashed/broke down(?)"
    Will try to test it on the demo database now..
    Any ideas?
    Thank you.
    Regards.
    D
    Edited by: Daniel Omaisz Takacs on Feb 1, 2011 9:09 AM

  • Why do I get "Missing signed entry" error?

    I am distributing jar files that have been signed (by thawte). Sometimes, a certain build will throw up a "Missing signed entry" error when I try to launch the jnlp file.
    Why does this happen?
    I used add/remove programs (on Windows) to delete the cache.
    I am really puzzled by this.
    Anyone knows why?
    thanks,
    Anil

    when I did a jar tvf on the obfuscated jar and compared output with a jar tvf on the unobfuscated jar, I found my mistake!
    Anil

  • "Missing parameter values" error on Export - rehash

    VS2008, CR2008, no SP.
    I am getting this when trying to use the export button on the CrystalReportViewer tool bar.  I am pretty sure I need to refresh the report when the export button is clicked, but I cannot find a CrystalReportViewer event for this.  I created my own Export button and refresh the report when it is clicked and it works fine - no errors.  So now I want to get rid of the Export button from the button bar, but it seems that this is not possible?
    I guess my question is... is there an event I can trap associated with when the export button on the original CrystalReportViewer toolbar is pressed OR is there a way to get rid of the Export button on the toolbar?
    Thanks,
    Dave

    Yikes - I can't believe I missed that!  OK the button is gone and all is well.
    This has been an interesting project.  I usually set up my reports with BOTH the CrystalReportSource and the CrystalReportViewer and that combination seems to always work great.  Its really easy to pass parameters and selection formulas with this combination.  However, I have one report that I need to pass both parameters AND a selection formula to the main report AND a subreport so I have to get rid of the CrystalReportSource and instead use the CrystalReports.Engine.  This gets a bit more tricky as I have found out.
    Anyways all is well.  Thanks for your help - you showed me something that was right in front of my face.
    Dave

  • 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.

  • Error: Missing Parameter Values on

    I've started experiencing the "Missing Parameter Values" error on a report containing a subreport. All of my other reports can export just fine, but just not the one with the subreport. The report (and the subreport) both use a stored procedure to retrieve their data, with 4 parameters. The first three parameters are linked directly from the report to the subreport. The 4th parameter is optional, and is linked to the subreport with a Formula Field.
    When I delete the subreport, the report exports just fine, so the issue is definitely with the subreport ?configuration?
    I'm using Visual Studio 2005, with Crystal Reports for VS 2005. I've been searching the forums, and I downloaded and installed a package: crnet20win32x86_en_chf.zip, but it didn't solve my problem. Just to be sure, I restarted and installed it with nothing running, in case that could be a factor.
    Is there anything I can do to work through this? Any other fix I'm missing?
    Thanks
    Alex

    Thanks for the tip. I did that just now, and I found the [Hot Fix|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%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313339333533393334%7D.do]
    That particular Hot Fix describes my situation exactly, in that a report Stored Procedure parameter is "supposed" to be passed on to the Subreport. However, the Hot Fix describes prompting, which isn't occurring in my case, since I'm exporting the report entirely in code. My situation is just the error, Missing Parameter Values.
    In any case, I've already run that entire Hot Fix package (twice), and I've found that I have 2 of the crpe32.dlls. Neither one is the version specified in the Hot Fix, (Version 10.2.0.1256). The second dll listed below seems to be of a version prior to the Hot Fix, I don't know if it could be the reason why it still doesn't work after applying the Hot Fix.
    C:Program FilesCommon FilesBusiness Objects2.7Bin (Date 1/11/2007, version: 10.2.0.1624) and
    C:Program FilesCommon FilesCrystal Decisions2.5Bin (Date 10/5/2005, version: 10.0.5.1177).
    I've checked all the versions of references in my projects, and they all reference the 2.7 dlls, but I'd like to know if there is a way to replace the 2.5 version, just in case.
    As far as the other search results, they hinted at things I've already tried. What else can I try?
    Thanks,
    Alex

  • Missing parameter values while getting the RowsetCursor

    Hi,
    We are getting the below stack trace while getting the RowsetCursor from reportClientDocument. Please advice if are doing something wrong here or some alternate to get this working.
    //Exception Occured : com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError
    |1249487250|Exception occurred : Missing parameter values.
    |1249487250|StackTrace : com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError
            at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.s.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.RowsetController.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.RowsetController.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.RowsetCursor.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.RowsetCursor.getRowset(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.RowsetController.createCursor(Unknown Source)
    The code we are using is as follows
    //Adding parameter
                                                 Fields pFields = new Fields();
              IParameterField parameterField = new ParameterField();
              parameterField.setName("PP");
              parameterField.setDescription("PPDesc");
              parameterField.setValueRangeKind(ParameterValueRangeKind.discrete);
              parameterField.setParameterType(ParameterFieldType.queryParameter);
              parameterField.setType(FieldValueType.stringField);
              parameterField.setAllowCustomCurrentValues(true);
              parameterField.setAllowMultiValue(false);
              parameterField.setAllowNullValue(false);          
              Values strValues = new Values();        
             ParameterFieldDiscreteValue pFDVStr = new ParameterFieldDiscreteValue();
             pFDVStr.setValue("myValue");
             strValues.add(pFDVStr);          
              parameterField.setDefaultValues(strValues);
              //parameterField.setCurrentValues(strValues);
              parameterField.getCurrentValues().clear();
              parameterField.getCurrentValues().add(pFDVStr);
              pFields.add(parameterField);
    //Adding the parameterised SQL to report as command table where {?PP} is a parameter
                                boNewCommandTable.setConnectionInfo(connectionInfo);
               boNewCommandTable.setCommandText(strSelect);
               boNewCommandTable.setName("MyCommandTable");
               boNewCommandTable.setParameters(pFields);
               try {
                    logger.debug(" adding query to report");
                    reportClientDocument.getDatabaseController().addTable(boNewCommandTable, null);
                    logger.debug(" done adding query to report");
               }catch(Exception e){
                    logger.fatal("query not set" + e);
                    throw e;
              reportClientDocument.getDatabaseController().logon(dbUid, dbPass);
              try {
                   reportClientDocument.verifyDatabase();
                   logger.debug("Database verified for ReportClientDocument");
              } catch (Exception e) {
                   logger.fatal("ReportSDKException Occurred " + e);
                   throw e;
    //Rowset                    
                        int rptRecordCount = 0;
              try{
                   RowsetMetaData rowsetMetadata = new RowsetMetaData();
                   Fields resultFields = reportClientDocument.getDataDefinition().getResultFields();
                   rowsetMetadata.setDataFields(resultFields);
                   RowsetCursor rowsetCursor = reportClientDocument.getRowsetController().createCursor(null, rowsetMetadata);
                   rptRecordCount = rowsetCursor.getRowset().getTotalRecordCount();
                   System.out.println("Processed: got rowset and report record count="+rptRecordCount+".");
              }catch(Exception ex){
                   logger.fatal("Exception Occured : " + ex);
                   ex.printStackTrace();
                   throw ex;

    Please post your SDK development questions to the Developers forum

  • "Missing parameter values."  --  Export and Print only...

    I have a web application and I am using CrystalReportViewer.  I am passing several parameters to Crystal using: 
    report.SetParameterValue(field.Name, Session[field.Name]);
    I have session variables which will hold parameters needed to pass into the report.  The session variables are populated from controls on my webpage after an onclick event.  This even not only populates session, but also passes parameters to the report with the following code: 
    ReportDocument report = new ReportDocument();
    Session["MapPathName"] = "./Reporting/CaseStudy.rpt";
    report.FileName = Server.MapPath(Session["MapPathName"].ToString());
    ParameterFields fields = new CrystalDecisions.Shared.ParameterFields();
    fields = report.ParameterFields;
    foreach (ParameterField field in fields)
          report.SetParameterValue(field.Name, Session[field.Name]);
    CrystalReportViewer1.ReportSource = report;
    This works great for reporting and is very extensible.  However, when clicking on the "Print" or "Export" buttons on the toolbar I get "Missing parameter values."  I attempted to export manually in code using the .ExportToStream function but I still get the error, "Missing parameter values." 
    I received this error also in Refresh, Search, and Navigate functions.  This was corrected by calling a function that supplies the above code block to these functions.  However, I do not see any events for controlling the Print nor the Export events. 
    QUESTION: How can I print or export a report when passing parameters using CrystalReportViewer?  Thanks in advance!
    P.S. - Crystal Reports XI Release 2
    Edited by: KyleSavant on Jun 18, 2009 5:42 PM

    There are no Export or Print events accessible for the viewer
    Since it sounds like you are creating the reportdocument object in your click event, the settings on this object become out of scope on successive postbacks executed by other events.
    to get around this without major changes, you can place your "report" object in session in this event and retrieve it from session on successive postbacks.  This should solve your problems around navigation, printing and exporting.  What you will need to do is check if the session object exists (usually in page_load or page_initialze) and if so, retrieve it from session and bind it to the viewer's reportsource.  If the session object does not exist, then do nothing (ie you have not clicked your button yet that retrieves the parameter values from session and loads the report).  Also, in your click event you can check if the report session object exists and if so, remove it so that it can be re-created with your new parameter values (ie i'm assuming the only time you want to set parameter values is in this event).
    Dan

  • ReportDocument.Export() raises "Missing Parameter Values" exception

    Hi
    Recently I encountered a question about SAP Crystal Report that I have a rpt file with several sub reports and I am required to make the data source to be XML with http/https URLs. I created different .NET pages which returns XML stream as data source for both main report and sub reports in my rpt file, and also created a sub report links which pass dynamic parameters from main report to the sub reports, everything worked fine when I entered the necessary parameters only for the main report in the design tool, both the main report and sub reports displayed perfectly.
    But it did not work in my .NET application which export the reports to PDFs, I referenced “CrystalDecisions.CrystalReports.Engine” and some other necessary DLLs into my project, and then I created an instance of ReportDocument, loaded the rpt file, set parameters which used in the main report, set connection info, and at last when I export the report it throw out an exception with “Missing Parameter Values” error message, even though I removed the sub report links which pass parameters from main report, the exception still occurred, but when I removed all the sub reports, and only export the main report it worked!!
    Here is a result of my attempts:
    Main Report
    Sub Report
    Result
    1
    With XML data source
    No report
    Works fine with dynamic parameters set to the http/https url which returns an xml results
    2
    With XML data source
    Pass a static value and print it on the report
    Works fine.
    3
    With XML data source
    Create a SQL command WITHOUT any parameters passed from main report
    Works fine
    4
    With XML data source
    Create a SQL command WITH a dynamic parameter passed from main report
    Works fine
    5
    With XML data source
    Create a xml data source WITHOUT any parameters passed from main report
    Failed with "Missing Parameter Values"
    6
    With XML data source
    Create a xml data source WITH a dynamic parameter passed from main report
    Failed with "Missing Parameter Values"
    I am confused about this issue for a few days, is there any ideas or helps? many thanks!

    OK:
    We upgraded to CR 13.0.2000.0 and Visual Studio 2012 and .Net Framework 4.5.
    Problem still happens.
    When we display the report in the designer, the url has parameters.  Here are the IIS log entries:
    2014-05-01 18:24:56 192.168.251.10 GET /quotit/apps/leadspro/CrystalServiceGateway_test.aspx @IFPPSID=1899582751211388&@styleColorScheme=10511658/13343077/10511658/13343077/16777215/15720656/16777215/15720656/24831/13426687|10511658/16777215/16777215/16777215/0/0/0/0/0/0 80 - 10.16.26.44 Java/1.6.0_37 200 0 0 959
    2014-05-01 18:24:56 192.168.251.10 GET /quotit/apps/leadspro/CrystalServiceGateway_test2.aspx @BrokerID=23433176 80 - 10.16.26.44 Java/1.6.0_37 200 0 0 742
    When we use the crystaldecisions.crystalreports.engine, no parameters are passed.  Here are the IIS log entries:
    2014-05-01 18:22:28 192.168.251.10 GET /quotit/apps/leadspro/CrystalServiceGateway_test2.aspx - 80 - 10.16.26.44 Java/1.7.0_45 200 0 0 58
    2014-05-01 18:22:28 192.168.251.10 GET /quotit/apps/leadspro/CrystalServiceGateway_test.aspx - 80 - 10.16.26.44 Java/1.7.0_45 200 0 0 115
    I cannot attach the rpt file here.  If you need it, please let me know how to get it to you.  I am attaching a screenshot of the datasource location.  I am pasting in the striped down .NET code.  Any help or pointers would be greatly appreciated.
    Thanks,
    Tom
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Configuration;
    using System.IO;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using System.Collections;
    namespace CrystalTest
        class Program
            static void Main(string[] args)
                string source = Path.Combine(@"C:\Users\thomas\Desktop\reports\eProIFP\iProReports", "summaryReportByPremium_ACA_UltraColor.rpt");
                string destination = Path.Combine(@"C:\Users\thomas\Desktop\testReports", "output.pdf");
                if (File.Exists(destination))
                    File.Delete(destination);
                ReportDocument rptDoc = new ReportDocument();
                if (File.Exists(source))
                    rptDoc.Load(source);
                    rptDoc.SetParameterValue("@IFPPSID", "1899582751211388");
                    rptDoc.SetParameterValue("@styleColorScheme", "10511658/13343077/10511658/13343077/16777215/15720656/16777215/15720656/24831/13426687|10511658/16777215/16777215/16777215/0/0/0/0/0/0");
                    rptDoc.SetParameterValue("@testID", "1");
                    CrystalDecisions.Shared.TableLogOnInfo logOnInfo = new CrystalDecisions.Shared.TableLogOnInfo();
                    foreach (CrystalDecisions.CrystalReports.Engine.Table objTable in rptDoc.Database.Tables)
                        logOnInfo.ConnectionInfo.IntegratedSecurity = true;
                        objTable.ApplyLogOnInfo(logOnInfo);
                    ExportOptions CrExportOptions = new ExportOptions();
                    DiskFileDestinationOptions crDiskFileDestinationOptions = new DiskFileDestinationOptions();
                    crDiskFileDestinationOptions.DiskFileName = destination;
                    CrExportOptions = rptDoc.ExportOptions;
                    CrExportOptions.DestinationOptions = crDiskFileDestinationOptions;
                    CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                    CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
                    rptDoc.Export();

  • Missing Parameter Values - I'm not using parameters linking to sub

    I'm developing reports for use in an aspx environment using Visual Studio 2010 and CR 13.
    I have a main report and a subreport. Each report is linked to the database with a view that is connected to a dataset.
    When I place the subreport in the main report I edit the change links option and select identical fields from each report.
    When I run the code with the subreport commented out I get what I expect on the page.
    When I uncomment the subreport I get "Missing parameter values"
    Here's the code that I uncomment for the subreport. I've already checked to ensure that there is data in the dataset.
    mySection = CaseAssignmentRpt.ReportDefinition.Sections("dsCaseOffender")
    mySubObj = mySection.ReportObjects("srCaseOffender")
    mySubRep = mySubObj.OpenSubreport(mySubObj.SubreportName)
    mySubRep.SetDataSource(dsCaseAoffender)
    Do I need to do anything special to my dataset for the two fields to get linked?

    Hi Chris
    Nothing special needed - just making sure that the data is exactly what the report and subreport expect. It is quite typical for this issue to come up if the dataset contains date that is not as expected (e.g.; field formats (including nulls / spaces, etc, missing fields, and so on).
    See if following the dataset troubleshooting wiki will help:
    Troubleshooting Issues with VS .NET Datasets and Crystal Reports - Business Intelligence (BusinessObjects) - SCN Wiki
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • "Missing parameter values " when passing parameter to subreport

    i have a subreport embedded in main report.
    sub report take a procedure with parameter.the main report does nothing but only holds many sub report.now i have to pass parameter from code to sub report.ive used the following code but it gives "missing parameter values" error
    Any help??
       ParameterField paramField = new ParameterField();
            ParameterFields paramFields = new ParameterFields();
            ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
            paramField.Name = "@LabNo";
            paramDiscreteValue.Value = "1034";
            paramFields.Add(paramField);
            ParameterValues paramvalues = new ParameterValues();
           paramvalues.Add(paramDiscreteValue);
            paramField.CurrentValues.Add(paramDiscreteValue);
    rptDocument.ParameterFields[0].CurrentValues = paramvalues;

    does the sub report have parameters in it as well?
    if the sp used for the sub report has parameters you need to pass them to the sub. i would probably remove the parameters from the sub and join the sub to the main by the parameter from the main to the field in the sub.

  • Error Missing parameter values - I get this in 11g app server only

    Hi.. I had an application in JSP-Struts, previously on 10g app server.  I now migrated the code into 11g. 
    I get the error on CrystalViewer.jsp 
    Error
    Missing parameter values
    Steps that lead up to the error:
    The very first time anyone enters the application and clicks a submit button on the jsp, after entering data and/or picking from drop menus, the error shows up on a separate page (thrown by crystalViewer.jsp)
    When I get this error, and click the browsers back button, and simply click the submit button on the jsp screen again, the reports work fine (like they do in 10g).
    Tried the following:
    I used log4j and followed the data as it made its way from Struts to Crystal Factory.  But once it gets out of Struts, and forwards to Crystal, I receive the error from the CrystalViewer.jsp
    Next, I removed code in struts-action, that used crystal factory to 'set parameter', and didnt send any parameters, letting my crystal report bring back some random records.. And this works even the first submit!  So the problem is only when I have to send parameters to crystsl
    Additional info:
    I do not send any null values across, since I read on these forums that folks were having issues with setting nulls etc... I check for null and then force 'All' in the parameter if the user does not enter data or pick from the drop-down.
    I need help resolving this . Thanks and have a great day.
    (Are there any changes to be made to the Struts config, or any additions to Web.xml? Should Crystal reports be changed in anyway so they can function like they did in 10g?)

    The Crystal SDK doesn't know or care that you're using Struts. 
    The exception is stating you're not setting parameters. 
    So wherever you're trying to set parameters, whatever's reaching the viewer don't have them set.
    Why not trace the workflow to see what's where?
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Lost ability to print PDF's

    I'm running a Window Vista machine with an HP7960 printer. I've had no problem in the past printing PDF's, but when I tried to the other day, I could no longer print them. The print progress box comes up, it starts with 0% and immediately jumps to 10

  • Import database on error ...

    Hi All, Will 'import database ... on error write to "error.txt";' exhaust all the errors? Willpartial import be possible? i.e. 5 records out of 10 will be imported. Regards, nww

  • RAC realated queries

    Dear Team As i am configuring RAC using redhat-5 on vmware. I have done basic settings and have installed cluster software but last two scripts are not working on node 2. and i am not able to run vipca command and getting the error as given below. [r

  • I am from Canada, why can't I purchase iTunes with my PayPal? I want to request that iTunes works this out for Canadians.

    I am from Canada, why can't I purchase iTunes with my PayPal? I want to request that iTunes works this out for Canadians.

  • Filtering a group

    Hi there, I was wondering if you a had any suggestions on how to query a list of organisation. The organisations are repeating (in a maximum of three each) because there is another class variable on the table that has different relevant values and NU