Jump to content
We've recently updated our Privacy Statement, available here ×

configured hyperlink throws an exception


teamireport

Recommended Posts

Folks,

 I have 1 Master report that has 1 subreport and have 1 Report separately all these are using same queries and same parameters.
 
 I uploaded the subreport jrxml in jasperserver as 'filetype' and uploaded the master report as JasperServer Report.Pointing to the subreport in the master report is been configured correctly.
 i.e ("repo:/<path to subreport>")
 Tried to execute the report with parameter passing it executed well.

 Next, in this master report i want to add hyperlink that should open a separate report.

 Uploaded separate report jrxml  as filetype in jasperserver

 below are the steps i configured to create a hyperlink in the master report.

 1. Created one static text field.
 2. Right click - > Hyperlink.
 3. Set Hyperlink target - Self , Hyperlink type - Report Execution.
 4. Under Link parameter - created 4 parameter as follows
 
      _report   - "/path to report /" and 3 parameters of mine which is 'java.lang.Long' datatype

 5. Saved master report  and uploaded the same in jasperserver- executed the master report.it executed well.

   while clicking on hyperlinked report. jasperserver throws an following exception.

java.lang.ClassCastException: com.jaspersoft.jasperserver.api.metadata.common.domain.client.FileResourceImpl cannot be cast to com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit
        at com.jaspersoft.jasperserver.war.action.ReportParametersAction.loadReportUnit(ReportParametersAction.java:167)
        at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:110)
        at com.jaspersoft.jasperserver.war.action.ViewReportAction.checkForParams(ViewReportAction.java:148)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.webflow.util.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:103)
        at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:136)
        at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:203)
        at org.springframework.webflow.engine.AnnotatedAction.execute(AnnotatedAction.java:142)
        at org.springframework.webflow.engine.ActionExecutor.execute(ActionExecutor.java:61)
        at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:180)
        at org.springframework.webflow.engine.State.enter(State.java:200)
        at org.springframework.webflow.engine.Flow.start(Flow.java:557)
        at org.springframework.webflow.engine.impl.RequestControlContextImpl.start(RequestControlContextImpl.java:195)
        at org.springframework.webflow.engine.SubflowState.doEnter(SubflowState.java:120)

Note : I have checked all the parameters datatype in all 3 reports .all are in same data type.


I'm struggling on this problem for past 2 days..

Can anyone help me out ? what the problem here ? where am doing wrong

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...