Hi All,
I need to set a value to a parameter which takes datetime type values. I am using java SDK in Crystal Enterprise 10 environment. Here is my code :
IReport oInfoReport = (IReport)oInfoObject;
IReportParameter oParam = null;
try {
int j = 0;
//Get a list of Parameters from the Report
java.util.List oReportParamaters = oInfoReport.getReportParameters();
while ( j < oReportParamaters.size())
{
oParam = (IReportParameter)oReportParamaters.get(j);
if ( oParam != null ) {
oParam.getCurrentValues().clear();
String sValue = parameters.getProperty(oParam.getParameterName().toUpperCase());
IReportParameterSingleValue currentValue = oParam.getCurrentValues().addSingleValue();
if (sValue != null)
{
currentValue.setValue(sValue);
currentValue.setNull(false);
}
}
j++;
}
}
catch ( SDKException sdke) {
System.out.println( "Exceptions getting paramater" );
System.out.print( sdke.toString() );
}
SetValue is only takes String as parameter, on the other end I am trying to set datetime value. How could I set a datetime value in Crystal Report from Java. I appreciate if some one could help me resolving this issue please.
Thanks
Podi.
I need to set a value to a parameter which takes datetime type values. I am using java SDK in Crystal Enterprise 10 environment. Here is my code :
IReport oInfoReport = (IReport)oInfoObject;
IReportParameter oParam = null;
try {
int j = 0;
//Get a list of Parameters from the Report
java.util.List oReportParamaters = oInfoReport.getReportParameters();
while ( j < oReportParamaters.size())
{
oParam = (IReportParameter)oReportParamaters.get(j);
if ( oParam != null ) {
oParam.getCurrentValues().clear();
String sValue = parameters.getProperty(oParam.getParameterName().toUpperCase());
IReportParameterSingleValue currentValue = oParam.getCurrentValues().addSingleValue();
if (sValue != null)
{
currentValue.setValue(sValue);
currentValue.setNull(false);
}
}
j++;
}
}
catch ( SDKException sdke) {
System.out.println( "Exceptions getting paramater" );
System.out.print( sdke.toString() );
}
SetValue is only takes String as parameter, on the other end I am trying to set datetime value. How could I set a datetime value in Crystal Report from Java. I appreciate if some one could help me resolving this issue please.
Thanks
Podi.