Successfully!

Error!

Data Drill to the Current Template

  • Last update:  2021-03-05
  • I.Description

    When using data drill, you usually drill to another template, but sometimes for the convenience of viewing the data, you want to click on the data drill to drill to the current template, as shown in the figure below. How to achieve it at this time? 

    1.png

    II. Ideas

    Set a web page frame in the main table, then set a hyperlink to the network report, correctly select the template that needs to be linked, and select the current window in the link open in.

    Note: Since the web page frame is equivalent to an iframe, it can be realized by this method.

    III. Examples

    To achieve the above functions, you must first define two templates, one template with a web page frame, and the other is the template referenced in the web page frame.

    1. Templates referenced in the webpage box


    1)Open the template

    Open the template:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc\Advanced\Drill down to the current template subreport.cpt

    2)Modify the template

    Select Template>Page Settings, set the page size to a small point so that it is about the same size as the data, and set both the left and right margins to 0.05.

    3)Save the template

    Save the template, the specific template can refer to:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc\SpecialSubject\HyplinkReport\Drill down to the current template subreport.cpt


    2. Master template settings


    1) Open the template

    Open the template:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc\Advanced\Drill down to the current template subreport.cpt

    2)Modify the data set

    In order to view the data conveniently, we only take 10 pieces of data, so the SQL statement is modified to: SELECT * FROM order limit 10

    3) Form modification

    Select some cells, click the merged cells, and set the control type of this cell to a web page frame.

    The form is as follows:

    2.jpg

    • Define the name of the web frame control as: orderdetail, enter ${servletURL}?

    • Add a parameter viewlet with the value: doc/SpecialSubject/HyplinkReport/ Drill down to the current template subreport.cpt, so that you can open the template in 3.1 in the web page frame;

    • And define a parameter ID to pass the clicked order ID to the sub-template. Because the first preview template did not click the hyperlink ID number, the parameters passed to the sub-template are empty and no data is displayed, so here the default display of 10001 is judged Value, formula: if(len($ID)==0,10001,$ID)

    The set web page frame is as follows:

    3.jpg

    4) Modify the hyperlink

    Click on cell A2, modify the network report to the current template'sdoc\SpecialSubject\HyplinkReport\Drill down to the current template subreport.cpt open it with&op=write, and open the link in the select current window, add the parameter ID =$$$, as shown in the figure below:

    4.jpg

    III.Effect view

    Click Pagination Preview to view the effect, the effect is shown in the description.

     IV. Completed template

    Attachment List


    Theme: Report Features
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback