Missing-anchor-value Error using PowerShell MA (Soren Granfeldt)
Hi Everyone,
I'm triying to do a simple sinchronization using PowerShel MA (Soren Granfeld) v5.0. I've already configured the MA, but when I do a Full Import the Sync Engine sent me: missing-anchor-value. I configured the anchor attribute based on the blog PowerShel
MA (Soren Granfeld).
Scheema Script
$obj = New-Object -Type PSCustomObject
$obj | Add-Member -Type NoteProperty -Name "Anchor-Id|String" -Value 1
$obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "user"
$obj | Add-Member -Type NoteProperty -Name "AccountName|String" -Value "SG"
$obj | Add-Member -Type NoteProperty -Name "FirstName|String" -Value "Soren"
$obj | Add-Member -Type NoteProperty -Name "LastName|String" -Value "Granfeldt"
$obj | Add-Member -Type NoteProperty -Name "DisplayName|String" -Value "Soren Granfeldt"
$obj | Add-Member -Type NoteProperty -Name "Description|String" -Value "Standard User"
$obj
Import Script
$obj = @{}
$Obj.Add("Id", "1")
$obj.Add("LastName","Cas")
$obj.Add("[DN]","2")
$obj.Add("AccountName","rodcas")
$obj.Add("FirstName","Rod")
$obj.Add("DisplayName","Rod Cas")
$obj.Add("Description","IT")
$obj
Anyone can help me please?
Thanks in advance,
I think it's because there is no objectclass property on the import object. It's required attribute. The sample on the website may be wrong. Try adding $obj.objectclass = 'user' in the import script
Regards, Soren Granfeldt
blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt
Similar Messages
-
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" 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.PGiven 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,
Shayari2 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 ! -
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 SubPost 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 -
"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.
DanielHi 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 -
Error using Powershell inside a Workflow
Hello,
I have the following scenario: I want to change the Status of every Incident that is created to "Neu". This is a custom Status we created. So my first tought was to use the Authoring Tool with a Workflow. I created a Workflow wich will trigger
whenever a Incident is created (simple) and then I used the Windows PowerShell Script Activity, with the following code:
My First Question Is, I need the ID of the Incident, so I create a new Script Property and as a Value I select
Use a class property -> Incident -> ID, is this way correct?
Then I insert this value in my Code via $id = "$IncidentID";, there is also my question is that correct?
I have tested the Code, it works. If I insert a Incident ID manually it changes the status.
So after I created the Workflow, I saved the MP and copied the .dll to my SM Folder and importet my MP. But if create a new Incident the Status is "Active" and it says the Workflow failed. I looked into the log and found an Error Message, after
some research I found a solution that said I had to modify my MonitoringHost.exe.config
(the error Message had something to with a PowerShell Module/Assembly missing) so I added the follwoing lines:
<dependentAssembly>
<assemblyIdentity name="Microsoft.EnterpriseManagement.Moduls.PowerShell" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />
But now I get the following Message:
Can somebody help me?I made a mistake while editing the xml.
-
"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,
DaveYikes - 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 -
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
AlexThanks 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 -
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 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 " 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. -
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. -
Use of layout when more than one parameter - Error Missing Parameter Values
Hi,
Is it possible to use a crystal report which has more than one parameter as the layout for the bill of materials report.
I have 3 parameters
1. DocKey@ The Bill of Materials to be printed
2. Number of levels to be printed
3. type of levels to print.
When I try to print it gives me the error Missing Parameter Values.
I have tried changing the DocKey@ to CodeKey@ but the same error.
Does anyone now where to find a list of these tokens?
Thanks
ChrisI looked at the crystal report conversion to try to find what parameters it used and found none.
I have managed to create and use a crystal report to replace the production order using DocKey@ as the parameter. This works within SAP. However I have converted the system production order to crystal reports and from the converted report I cannot see any parameters at all.
How and where can you find out what paramters you need to use to replace any PLD report? Several reports have multiple selection criteria before the report prints. How can you find out what their tokens are called? I am starting to pull my hair out. I am getting great help from this forum, but do you know any documentation which actually explains this area.
Thanks
Chris -
Missing right parenthesis error when querying using a list of values
Would anyone know why this statement gives the ORA-00907: missing right parenthesis error..?
SELECT FIELD_X
FROM TABLE_Y
WHERE FIELD_X IN (
'AJD'
'RED'
'ADF'
'MOI'
The reason why I wanted the AJD, RED, ADF, etc values on top of each other is because I need to add the single quotes around those terms in Excel before pasting them into the SQL statement (there are actually over 400 terms so above just shows a subset)Fortunately the SQL syntax is documented in the SQL manual
{ expr [, expr ]...
| ( [expr [, expr ]] ...)
}http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/expressions015.htm#i1033664
Note the comma following each value in the syntax diagram and examples.
Maybe you are looking for
-
What is the better way to join table for ASE 12.5?
To join table with T-SQL, there are 2 options: select * from tab1 a join tab2 b on a.id = b.id where x=y select * from tab1a, tab2 b where a.id = b.id and x=y this is only a syntax difference or there is a performance difference? which one is better
-
How to list all files and directories in another directory
I need to be able to list all the directories and files in a directory. I need to write a servlet that allows me to create an html page that has a list of files in that directory and also list all the directories. That list of files will be put into
-
How to know what level of optimization to use / which symbols to remove
I probably should have asked this question along time ago, but how do you know what level of optimization to use and what symbols you can safely remove when compiling
-
French translation of "Back* button
Hello, when logging on to the Web UI in french the "Back" button of the Web UI (not the one from the Internet Explorer) is displayed in german (Zurück). I searched via transaction SOTR_EDIT for all "Zurück" texts in language french and found the foll
-
Why is my iPad calendar not showing older entries?
Why isn't my iPad2 calander not showing entries past 5 weeks old?