1
votes

I am very much new to Jaspersoft studio. I am trying to create Master Detail kind of report.

Master table does contain details about DEPARTMENT details.

Child table does contain details about departmentwise EMPLOYEES.

DEPARTMENT(DEPTNO, DEPT_NAME, LOC)
EMPLOYEE(EMPNO, ENAME, SALARY, DEPTNO)

Now what I want to do is, when I click on DEPT_NAME hyperlink in Master table, the corresponding employees should be shown in child table like shown in the below image.

enter image description here

I could not get proper results in the Google search.

I am following one document to learn about Jaspersoft Studio (downloaded from Jaspersoft official website).

But, there is NOT much clear information about the procedure how to do.

For examplef, it is written like

Click the button next to Hyperlink When Expression to create

. But what expression to write is my doubt!

AND ALSO,

Can anybody please tell me the location for best tutorials! For example, explanation in this this link is so nice. But, I want to know where it is originated from!

Hence, anybody please help me.

2

2 Answers

1
votes

The Hyperlink When Expression is used if you want the hyperlink to appear conditionally. If the expression evaluates to true, then the link is displayed. In your case, I believe you want every instance of the Dept Name field to display a hyperlink, so you would not put any expression in there.

As for making a child table appear, I don't think you can do that. You have two choices:

  1. You can make the link a ReportExecution link. When the user clicks it, a new report is run that displays the child table. But it won't appear in the same document.
  2. You can make the link a LocalAnchor or LocalPage link. In this case, you would already have to have included all the child tables on the report, and the link would simply navigate the user to the correct place in the document.

Documentation on JasperSoft hyperlinks can be found here.

0
votes
  1. If you are using older version of jasper you will get hyperlink option when you right click on field on which you are giving hyperlink. For later version you will get this option in right hand side properties section while clicking on that particular text field.
  2. Hyperlink section choose blank if you want to open drill down report in new tab or self to open it on same page.
  3. Choose Report Execution.
  4. In parameter section create a parameter name=_report and value="path of drill report"
  5. Create another parameter with department name and in value "field department"

Thanks.This will work.