1302816 - How to get the datatype of fields used in the Crystal report using Java Reporting Component SDK.

SAP Knowledge Base Article - Public

1302816 - How to get the datatype of fields used in the Crystal report using Java Reporting Component SDK.

Symptom

How to get the datatype of the fields used in the Crystal report using Java Reporting Component SDK.

Reproducing the Issue

  • Java Reporting Component SDK.
  • Tomcat 5.0

Resolution

Use the getType() method of Java Reporting Component SDK to get the datatype of fields used in Crystal report.

The following snippet of code illustrates the use of getType() method

ParameterField ParameterField = (ParameterField)ParameterFields.findField(lsParameterName, FieldDisplayNameType.fieldName, null);
if (ParameterField != null)
{
this.writeDebug("boCrystal.setParameters", "Set parameter:"+lsParameterName +"="+lsParameterValues+" Type="+ParameterField.getType()+" RangeKind="+boParameterField.getValueRangeKind());
}

Keywords

JRC, parameter type

, KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , How To

Product

SAP Crystal Reports XI R2