Table of Contents

  1. Overview
  2. Technologies and Tools Used
  3. Use Case
  4. Steps with Screenshot
  5. Conclusion

 

1. Overview

This document will teach the details about the methods to create control break in classic report. In other reports like interactive report and interactive grid control break option will be provided by default with those reports. By enabling the option we can group the data’s.

But in classic report there is no direct option to generate control break. So here we are going to learn about how to enable control break in classic report.

2. Technologies and Tools Used

The following technology has been used to perform unit testing using Selenium web driver in Oracle Apex.

  • Oracle APEX
  • PLSQL

3. Use Case

  • To enable control break in classic reports.

4. Steps with Screenshot

Step 1:  As I mentioned in the overview section, in this document I’m going to talk about two method’s with which we can enable control break in classic report.

The methods are as follows.

  1.   By PLSQL
  2.   By Inbuild Apex feature

Method:1

Step 2: In method 1, we are going to know about how to enable control break in classic report with the help of PLSQL . let’s take a table named “mass_operator”. With this table I’m going to write SQL select statement like as follows.

 

SELECT CASE

         WHEN ROW_NUMBER()

                over(

                  PARTITION BY emp_role

                  ORDER BY opt_id) = 1 THEN emp_role

         ELSE NULL

       END emp_role,

       CASE

         WHEN ROW_NUMBER()

                over(

                  PARTITION BY emp_role, employee_type

                  ORDER BY opt_id) = 1

         THEN mass_fnd_utils.EMPLOYEE_TYPE(employee_type)

         ELSE NULL

       END employee_type,

       operator_code,

       operator_name,

       prev_experience

FROM   mass_operator

Step 3: Create a region in oracle apex, select the region type as classic report and past the above mentioned select statement in the source section you will get the output as follows.

Step 4: To remove the Hyphen symbol in the empty value columns, Just go to the attributes section there you will see the Appearance -> Show Null Values as option. Remove the Hyphen and you will get the final output as follows.

 

Method:2

Step 5: Similar to the method 1 create a region and select the type as classic report and past the following code in source section.

 

SELECT emp_role,

       mass_fnd_utils.EMPLOYEE_TYPE(employee_type) employee_type,

       operator_code,

       operator_name,

       prev_experience

FROM   mass_operator

ORDER BY 1,2 ASC

 

Step 6: In the next step, go to the attributes section, there you will find the Break Formatting section. In that section, change the Break columns as first and second columns and as usual in the method 1 remove the Hyphen from the Appearance -> Show Null Values and you will get the final output as follows.

Step 7: The final output from the method 2 will also be same as like method 1.

 

5. Conclusion

  • Hope you all get some idea about how to enable control break in classic report.

Thanks for reading ….

Recent Posts

Start typing and press Enter to search