Skip to Content

The types of the parameter field and parameter field current values are not compatible.----

HI,

I am attempting to set report parameters in my .jsp code via URL parameters.

I am able to set the report name, server connection dynamically however when attempting to set the Parameters I receive:

com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: The types of the parameter field and parameter field current values are not compatible.---- Error code:-2147213303 Error code name:invalidParameterField

The parameter on the report is a String Type, named for this example p1.

The value that p1 represents is LERAD

My code:

String stringValue = request.getParameter("p1");

CRJavaHelper.addDiscreteParameterValue( clientDoc, "","p1", stringvalue);

returns the above mentioned error.

I have tried:



String stringValue = (String)request.getParameter("p1");



which returns the above error



And;



String stringValue = new String(request.getParameter("p1")).toString();

which returns



java.lang.NullPointerException

java.lang.String.<init>(Unknown Source)

org.apache.jsp.callReport_jsp._jspService(callReport_jsp.java:105)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)



I notice that the CRjavaHelper.java declares this addDiscreteParameterValue as accepting an Object type for the newValue.

Any ideas???





Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 01, 2012 at 05:47 AM

    Hi,

    nevermind.

    case sensitivty strikes again.

    my URL param was P1 ( case sensitive)

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.