Toad World® Forums

Newbie question for Report Modifications

I would like to end up w/ a different output while creating an entity report.
Here's the steps I took to create the former report:

  • Menu Model/Generate Report/Run
  • Format -> HTML
  • Report -> Basic HTML
  • File -> "myFile"
  • Layout -> Layout = Frameless, Css Style = Others/Violet
  • What to report --> Entity/Attributes;Indexes;Keys only ...
  • Workspaces --> a very small one (3 tables)
  • Options:
    Sort Alpha
    Add Column's comment
    Generate Model
    Generate Comments
    Generate Notes

I would like to know (step by step) how to eliminate the "Domain" column under the "Entities" Tab, inside the "Attributes" section of each entity. See the report result attached.

According to what I already saw, I will have to work somewhere in the Expert Mode/Customization/packages explorer.
But I would like to understand clearly the process to make sure I will be able to start working on those reports by myself.

Thanks for your time !!!
Serge

Hello Serge,
you need to modify method "ReportTableColumns" of HTML report. Very brief process what to do is

  1. Create Custom Package and insert to Metamodel Report class with method "ReportTableColumns"
  2. Implement your this method without Domain column.

if you write me database type whcih you use it (Oracle 19, MySQL....) I will write for you more detailed sample how to do it.

Regards
Petr

Thanks for the quick reply !!!
I'm working on Oracle, version 10 to 19C.

Serge

Hey Daril I tried to work with the custom package as you described in another post. I'm pretty sure I'm close to find a solution, but here's the error I end up w/ while trying to run the former report.
image

Then TDM is locked on that error. Need to kill application via Task Manager, and restart afterward,
Any idea ?

Serge

Hi Serge,
I prepare for you custom package which you can import to TDM (designed for version 7.1,but probably will work for other too). You can download from this link

Here is a little background

Small Analyze

This table is implemented by method ReportTableColumns of Report class. So first we need to observe in which descendant classes is override. Open Package Explorer and find all packages related to HTML reports and Oracle.


You can open for each its metamodel and check if there is this method.

Method ReportTableColumns is only in package „HTML Reports for PER Model“ in class „BasicHTMLPERReport“.

Create User Package

Now we need to create a user pacakge. Go to Main Menu – Expert Mode – Customization – New Custom Package
image

On the dialog fill the Name and the Package Extension set to „HTML Reports for Oracle“, because we want to modify all Oracle reports.

Find this new package in Package Explorer and open its properties. On tab Visibility set “Oracle”.

Create Metamodel

For new package create a metamodel. Go to Package Explorer, right click on this package and choose “Open Metamodel”. Create new class in metamodel. Call it “BasicHTMLPERReportOR” and set Object Type to “1035”.

Open a properties dialog of this class and create a new method. Set this method:

General tab

Name – ReportTableColumns
Result Data Type – Boolean
External – True
Method - BasicHTMLPERReportOR_2.ReportTableColumns
image
Parameters tab

Document – Dispatch
Entity – Dispatch
image
On the tab General click to button “Edit Script”. It will create new script in package for implementation this method.

Save Metamodel and Save Package.

Script Properties

Now it is necessary to set script properties. Open Script dialog and set visibility same as in package to “Oracle”.

On general Tab fill caption and category to HTML Reports.

Now all save, and Restart TDM.

Script Code

Find implementation of method ReportTableColumns in package „HTML Reports for PER Model“ and copy code to our new method. Now you can in new method modify this code and remove column Domain.

Regards Petr

Error "Expected ')'"
You have probably syntax error in your script "BasicHTMLPERReport", please open this script in script explorer and review line 35 and surround.

Petr

Thank you so muuuuuch for this complete answer !!!

First, found my typo (missing comma). Then I compared the package I created w/ the very clear instructions you sent. I guess the main difference between your example and my package is because I did not modify the code in the specific Oracle package.

Anyway. It's working as expected now, and the only thing I want to say is:

THANK YOU VERY MUCH !!!
You are amazing man.

Serge.