I'm trying to create a hyperlink on a report and I keep getting a ClassCastException. When saving the design file it seems to be trying to cast the Expression as a String. If I create a hyperlink using the report designer it seems to work fine. Here's some example code of what I'm doing:
ActionHandle actionHandle = dataItemHandle.setAction(StructureFactory.createAction()); actionHandle.setLinkType(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK);
actionHandle.setTargetWindow(DesignChoiceConstants.TARGET_NAMES_TYPE_BLANK);
actionHandle.setURI("'
http://www.google.com'");
And finally here's the exception:
java.lang.ClassCastException: org.eclipse.birt.report.model.api.Expression cannot be cast to java.lang.String
at org.eclipse.birt.report.model.util.BoundColumnsMgr.dealAction(BoundColumnsMgr.java:604)
Any suggestions?