on 12-05-2014 2:25 PM
Friends,
I'm working with RAS SDK to refresh a crystal report. while parameter setup i'm facing this particular exception.Can anyone help?
com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: Only report parameters can be optional.---- Error code:-2147213303 Error code name:invalidParameterField
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException.throwReportSDKParameterFieldException(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.for(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.modify(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.modify(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.setCurrentValues(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.setCurrentValue(Unknown Source)
at reportviewer.Check_Adhoc_Position_Report_Advanced_Report.Report_Connection_Adhoc_Parameters(Check_Adhoc_Position_Report_Advanced_Report.java:204)
at reportviewer.Check_Adhoc_Position_Report_Advanced_Report.main(Check_Adhoc_Position_Report_Advanced_Report.java:57)
Thanks,
Bharath
Hi Bharath,
Please let us know the BO product version you are using. Are the reports managed or unmanaged?
Code snippet where you get the error. As per the error message it seems your are not passing the parameters correctly.
Thanks,
Prithvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Prithvi,
Below are the info.
Product version - BO XI 3.1
Reports - Unmanaged
Code snippet
ParameterFieldController paramFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
paramFieldController.setCurrentValue( " ", "Security_Number", "");
Parameter is of string type. Let me know in case of any Queries.
Thanks in Advance,
Bharath
Can you please run the below snippet and get the details.
===============================
Fields paramFields=rcd.getDataDefController().getDataDefinition().getParameterFields();
for(int i=0;i<paramFields.size();i++)
{
IParameterField paramField=(IParameterField)paramFields.get(i);
String paramName=paramField.getName();
if(paramName.equals("Security_Number"))
{
out.println("<BR>Is Optional Prompt"+paramField.getIsOptionalPrompt());
ParameterFieldType parameterType=paramField.getParameterType();
out.println("<BR>Param Type int value"+parameterType.value());
out.println("<BR>Param Type String value"+parameterType.toString());
}
=========================================
Would need to check the type of the parameter, as stated in the error, only report parameters can be optional.
Please run the test and share the results to narrow down the issue.
Also check the behaviour on the report from crystal report desgner as well.
Thanks,
Prithvi
Prithvi,
I think i got it. I changed the parameter to Mandatory . Its working fine.
I suppose it happens because the report is linked with a subreport created on a Stored Procedure
andso it appears as StoredProcedureParameter
Any idea to handle this situation without changing parameter to Mandatory?
Thanks,
Bharath
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.