Professional Documents
Culture Documents
Date:
2012-05-02
OZ REPORT
Training Workbook
The workbook has been developed for training classes and for self-study. Chapter 1 describes structure of OZ products and OZ server. Chapter 2 briefs on OZ Query Designer, how to create query and dataset. Chapter 3 briefs on OZ Report Designer, how to create report components and how to bind them with datasets created by Query Designer. In Chapter 4, 10 target reports are given as design challenges, the most typical and widely used styles of business report, by himself, with help of given design guide. After this class, the student will be able to design various styles of professional business report by applying these target reports.
Chapter 1 : Introduction 1. 2. 3. OZ product configuration OZ server structure Report design & operating procedure
Chapter 3 : OZ Report Designer 1. 2. 3. 4. 5. 6. 7. Adding ODI Running & Saving Report Band Label Multiplex User defined parameter Calculated field
Chapter 4 : Designing Target Reports 1. 2. 3. 4. 5. 6. 7. 8. 9. List style report (Simple Table) Grouped list report (Grouped Table) Matrix table report (Crosstab) Master-detail report (Group Above Style) Single Query Master-detail report (Group Above Style) Multi Query Multi Column report Fixed form report using script Drill-down report Table Of Content link report
Date:
5/2/2012
Chapter 1 : Introduction
1. OZ Product configuration 2. OZ server structure 3. Report design & operating procedure
Date:
5/2/2012
1. OZ Product configuration
OZ Report Designer Design report forms and bind with datasets created using OZ Query Designer. OZ Query Designer Define and manage datasets to be used with OZ Report Designer. OZ Server Store and manage OZ report forms and send to the client. Create query result dataset and send to the client. Manage OZ repository. 3 of server types: Daemon Type(standalone), Servlet Type(WAS integrated), .NET Type(.NET Framework based) OZ Scheduler Server Create and publish reports automatically by given schedule. OZ Report Viewer - Preview and print OZ reports on the web. - Provide ActiveX, Applet, Flash, Silverlight, .Net, mobile App Viewer. - Export to PDF, HTML, Excel, DOC, TIFF, PPT format OZ Enterprise Manager - Register and manage reporting tasks to be auto-executed by the scheduler server. - Provide centralized management for multiple OZ servers and multiple scheduler servers. OZ Repository Manager Manage report form files(*.OZR) and dataset files(*.ODI) stored on the OZ server.
Date:
5/2/2012
2. OZ server structure
2.1. Daemon type server
Web Server HTML Database HTTP Firewall
Client
OZ Viewer
First download
OZ DB Pool
-
OZ Server
TCP/IP
Run in standalone and the client connects to it via the independent port number. OZ viewer is auto-downloaded from the port of web server. Use OZ servers own DB Pool.
Firewall Database EJB Beans OZ DB Pool or WAS DB Pool WAS JSP Container Web Server HTML HTTP Client
OZ Server
OZ Viewer
Integrated with WAS(Web Application Server) and the client connects to it via the WAS port number. OZ viewer is auto-downloaded from the port of WAS. Use OZ servers own DB Pool or WASs DB Pool.
Database
Firewall .NET Framework Web Service aspx Container IIS HTML HTTP Client
OZ DB Pool
OZ Server
OZ Viewer
Integrated with .NET framework(IIS) and the client connects to it via the IIS port number. OZ viewer is auto-downloaded from the port of IIS. Use OZ servers own DB Pool.
Date:
5/2/2012
Execute report processing logic OZ Report Flash/Applet Viewer Viewer OCX load
Data Source Web Server HTMLs OZ Viewer WAS/.NET Framework EJB OZ Enterprise Server (Servlet type) Data processing XML (DTD/XSD) RDBMS
File Data
Ask form file Send form file Bind form and data Show report Ask data send data
Call HTML Tag from web browser to request the report. Automatic download and install the OZ viewer from the webserver to the client computer. Launch the OZ viewer. OZ viewer requests report form file from OZ server. OZ server send form file to OZ viewer. OZ viewer requests data from OZ server.. OZ server create data module from data source. OZ server send data module to OZ viewer. OZ viewer shows report by binding form file and data module.
Date:
5/2/2012
Query design
Create data store (database connection setup) Create dataset (create query) Save data information file (ODI file)
2nd step
Report design
Add ODI Design report forms Component property setup Bind component with ODI Save report (OZR file)
3rd step
Preview report
Run and Preview report
Start OZ server
Database connection setup Start OZ server
2nd step
3rd step
4th step
Run Report
View, print and export report
Date:
5/2/2012
Date:
5/2/2012
1. OZ Data Structure
OZ data structure consists of Data Store, Dataset, Dataset Field and they are stored in ODI (OZ Data Information) file. Student should understand concept of data objects, relationship between them, and usage of various data stores.
2.2. Dataset
Dataset is a set of data fields selected from data store. The way to define dataset depends on the types of data store. Dataset for database store is defined by a query.
2.3. ODI
ODI is a file in XML format storing data stores. OZ Report Designer use ODI to map or bind report forms to data. Other Non-database Data store
Split a dataset of any data source into multiple datasets by the specified field. GDS is used to reconstuct a dataset into master-detail datasets. A data source interface to CSV file or XML file without DTD located on the server (accessed by path) A data interface to CSV file or XML file without DTD located on the web (accessed by URL) A data source interface to XML file with DTD/XSD A data source interface to result data from SAP R/3 RFC. A data source interface to result database from IBM Rational Clear Quest program. A data source interface to result data from web services.
File Store HTTP Store XML Store SAP Store CLEAR QUEST Store SOAP Store
Date:
5/2/2012
Date:
5/2/2012
3. Query Design
Learns how to design query in Design View mode and Manual mode. Student should get used to the query wizard.
10
Date:
5/2/2012
11
Date:
5/2/2012
12
Date:
5/2/2012
13
Date:
5/2/2012
1. Adding ODI
When launched Report Designer, the first thing you have to do is adding ODI to the report. All of dataset components (label, table, chart, crosstab, etc.) and dataset wizards dealing with dataset require ODI, because ODI provides data information. Student should be able to add ODI and understand its major properties.
1.1 Add ODI to report Select Insert ODI from the right mouse click popup menu on the Data Tree item in the data window and select your ODI file with the Repository File Window.
1.2 ODI Properties If select ODI from Data Tree in Data Information window, Property window shows its properties.
ODI file path relative to the work folder. It must be the same as the ODI file path relative to the server repository. Get From Server :
If set to True, get ODI file from the server repository. It is used when the local computer on which Report Designer runs does not have the ODI file.
14
Date:
5/2/2012
3. Band component
OZ Report Designer use a "band-oriented" design approach. A Report Band represents a specific area on a report page, used to specify where and when and how report components to be displayed on the report. All components in the report (label, table, crosstab, chart, shape, input component, etc.) are located in one of several bands. Student has to understand and master the usage of each band.
Date:
5/2/2012
16
Date:
5/2/2012
5. Label component
Label component represents values (text, dataset field value, system date, image, etc.) in various format (drawing type) on the report page. Various label types are provided for diverse data representation. User can select the label type according to the data type and drawing type of the value. Student should understand the data type and drawing type of a label, and should be able to change label type by changing data type and drawing type.
Description
Data label
Group Label
Dataset Field Name Grouping Rule Data Type ODI Name Dataset Field Name Summary Type Data Type Expression Expression ODI Name Data Type System Field Name Delimiter Data Type Parameter Set Name Parameter Name Data Type Image Style Data Type Barcode Data Type Data Type User Class
Data type
Summary Label
Expression Label
- Result of the expression - All bands - System date of user PC & page numbering - All bands - User Defined Parameter (QD) & Form Parameter (RD) - All bands - Image - All bands - Barcode - All bands - HTML Text - All bands - Custom component - All bands - Very Large Text - All bands except Tail & Page Footer
System label
Parameter Label
Image Label Barcode Label Drawing Type HTML Label User Component
Note
17
Date:
5/2/2012
6. Multiplex component
Label is the smallest unit of component that represents a value such as one dataset field. Contrastively, multiplex component represents multiple dataset fields as various types of complex forms according to the component type. Multiplex components are very essential for designing real business reports. Student has to understand features of various multiplex component and master usage of their wizard and major properties.
Fixed Table
18
Date:
5/2/2012
Option Set Row Count Outline Fixing Empty Label To Page End Display Row No Display Title Fix Title
Description The maximum number of rows to print If the row count above is larger than the one of actual result dataset, the remaining number of rows are printed as empty row. When the last page have empty space, fill the page with empty labels. Create a serial number column at the first column. Prints table header Prints table header on every page.
19
Date:
5/2/2012
Option Merged By row pivot By column pivot Using row title Title of field Show fields title Using column title Cell merge Merge cells on same data
Description Main title (the view selector on the top left) is independent from row title and column title. User can modify it. Main title follows row title Main title follows column title Show value titles at below the column title Show value titles at the right of row title Merge column cells with the same value.
20
Date:
5/2/2012
Option Available Data Sets Available Fields X-Axis Y-Axis Left Y-Axis Right Series Label Select fields for the chart.
Description Select the dataset for the chart. Fields to be used as x-axis label. Select data type of the label from one of Item, Number, Date. Fields to be used as y-axis left label. Aggregation function (sum, avg, max, min) is allowed for the fields. Fields to be used as y-axis right label. Aggregation function (sum, avg, max, min) is allowed for the fields. Fields to be used as series. Fields to be used as data labels of the chart. The number of labels must be the same as one of y-axis fields. If not set, y-axis field data will be shown as data label.
21
Date:
5/2/2012
22
Date:
5/2/2012
8. Calculated field
Calculated Field is a virtual field defined by user script with OZ Query Designer or Report Designer. Dataset field value comes from data source, although calculated field value comes from the result of script execution. Calculated field is used in the same way as dataset field. Learn how to define calculated field.
23
Date:
2012-05-02
8. Drill-down report
- Target report: Sales by country report, drill down from country on the chart or table to country detail
24
Date:
2012-05-02
Implementation guide:
Display the current date in YYYY/MM/DD format on the top right corner of every page. (Use page header band, system label, label format). Display the page number in current page/total pages format on the bottom center of every page. (Use page footer band, system label). Configure customer information table (Use table wizard). Display the serial number on the first field of table (Use option in the table wizard). Display table header on every page (Use option in the table wizard). Set auto sizing and auto line warp and text align of table cells according to data. Change table header or title to your own text.
25
Date:
2012-05-02
Design tip:
green bar printout : set background color for every even row (use script) fill empty space of the last page with blank form (Use option in the table wizard)
Query:
SELECT Customer.CustomerID, Customer.CustomerName, Address.PostalCode & ' ' & Address.AddressLine1 & ', ' & Address.City & ', ' & Address.StateProvince & ', ' & Address.Country as FullAddr, Customer.Channel, Customer.AccountNumber, Customer.CreditCardID, Customer.EmailAddress, Customer.Phone FROM Customer, Address WHERE Customer.AddressID = Address.AddressID Order by Customer.CustomerID
26
Date:
2012-05-02
Implementation guide :
Configure product information table (Use table wizard) If multiple rows have the same CategoryName field value and SubCategoryName field value, merge them. (use [Grouping] property of the table value) Even though SubCategoryNames value is the same, but if CategoryNames value is different, not merge. (Set SubCategoryNames prior label group field to CategoryName using Prior label property of table value) Set the format of numeric fields to #,### and to right alignment. Query SELECT Category.CategoryName, SubCategory.SubcategoryName, Product.ProductName, Product.Color, Product.Size, Product.StandardCost, Product.ListPrice, Product.Style, Product.Class, Product.Weight FROM Category, SubCategory, Product SubCategory.SubcategoryID = Product.SubcategoryID WHERE Category.CategoryID = SubCategory.CategoryID AND
27
Date:
2012-05-02
Implementation guide:
Set Country, State, City to pivot row, set Year to pivot column, set Order Count, Total Amount to value (Use Crosstab wizard)
Print Sum of pivot rows on the top and Sum of pivot column on the right. (PreviousSum function of the wizard)
Set text alignment of Country and State to Top. Set the format of value and Sum to #,### and to right alignment. Configure pivot title and value title as above example (Use Crosstab wizard)
Query: SELECT Format(OrderHeader.Orderdate, 'yyyy') as YY, Address.Country, Address.StateProvince, Address.City, COUNT(OrderHeader.SalesOrderID) AS OrderCount, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalSales FROM OrderHeader, OrderDetail, Address WHERE OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND OrderHeader.AddressID = Address.AddressID GROUP BY Address.Country, Address.StateProvince, Address.City, Format(OrderHeader.Orderdate, 'yyyy') 28
Date:
2012-05-02
Table
component
1 Page
2 Page
Implementation guide:
Display year and country from external parameter (Design dataset with year & country parameter). Set group break for State Province, City, Product Category. (Use Insert Band > Upper Group Header Band on the data band. Set the group footer band that is not required to Invisible. Set the format of total and subtotals of groups (use summary label) to $#,### and to right alignment. Use table component and fixed table component (use Insert Connected Table of fixed table) Display current State, City, Category on every page (use Fix Prior Group Header of band) Learn how to create master-detail from one dataset using group header/footer band.
29
Date:
5/2/2012
Query:
SELECT Address.StateProvince, Address.City, Category.CategoryName, OrderHeader.SalesOrderID, Format(OrderHeader.OrderDate, 'yyyy-mm-dd') as OrderDate, Product.ProductName, SUM(OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount) as Price, SUM(OrderDetail.OrderQty) as OrderQty, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalAmount FROM OrderHeader, OrderDetail, Address, Product, SubCategory, Category OrderHeader.AddressID = Address.AddressID AND OrderDetail.ProductID = Product.ProductID AND Product.SubCategoryID = SubCategory.SubCategoryID AND SubCategory.CategoryID = Category.CategoryID AND DatePart('yyyy', OrderHeader.Orderdate) = '#OZParam.Year#' AND Address.Country = '#OZParam.Country# group by Address.StateProvince, Address.City, Category.CategoryName, OrderHeader.SalesOrderID, Format(OrderHeader.OrderDate, 'yyyy-mm-dd'), Product.ProductName WHERE OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND
30
Date:
2012-05-02
Fixed table
component
Table
component
1 Page
2 Page
Implementation guide:
Configure Invoice as master and Packing list as detail with Invoice NO key (use Master band Settings of the detail dataset) Display total by Invoice (use summary label), Set the format of total to $#,### and to right alignment. Display Freight and Total Amount (= Total + Freight) Use table component and fixed table component Learn how to create master-detail between two dataset by setting the master band for the detail band.
31
Date:
5/2/2012
Query: SELECT OrderID, OrderDate, RequiredDate, ShippedDate, ShipVia, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry, Trim(ShipRegion& ' ' & ShipCity& ' ' & ShipAddress) AS ShipFullAddr, Freight, O.CustomerID, C.CompanyName, C.ContactName, C.ContactTitle, C.PostalCode, C.Phone, C.Fax, Trim(C.Region & ' ' & C.City & ' ' & C.Address) AS FullAddr, Country, S.CompanyName AS ShipperCompany FROM "Invoice Orders" O, "Invoice Customers" C, "Invoice Shippers" S WHERE O.CustomerID = C.CustomerID AND O.ShipVia= S.ShipperID order by OrderID
SELECT O.OrderID, P.ProductName, OD.UnitPrice, OD.Quantity, OD.Discount, (OD.UnitPrice*OD.Quantity*(1-OD.Discount)/100)*100 AS ExtendedPrice FROM "Invoice Orders" O, "Invoice Order Details" OD, "Invoice Products" P WHERE O.OrderID = OD.OrderID AND OD.ProductID = P.ProductID order by O.OrderID
32
Date:
2012-05-02
fixed table
Region component
Implementation guide:
Mailing label with customer address using region Label with Zip code, fixed table with address and name Print mailing label horizontally first, and down to the next line, print horizontally again ( Out Direction property of the region is Horizontal Limited ) Horizontal and vertical spacing between mailing labels (Horizontal Gap and Vertical Gap)
Query: SELECT PostalCode, Address + ' ' + City + ' ' + Country as fullAddress, ContactName FROM "Invoice Customers"
33
Date:
5/2/2012
Implementation guide:
Define Year and Month as input parameters. Parameters are used for Date functions in the script. (No need for dataset, hence create form parameter with Report Designer) Create 7*6 Table, display date on each cell using script. Create Search toolbar for parameters.
34
Date:
5/2/2012
8. Drill-down report
Target report: Sales by country report, drill down from country on the chart or table to country detail
35
Date:
5/2/2012
Implementation guide:
Create the chart showing sales by country with chart wizard Chart Type tab : Pie chart X Axis tab: Country Y axis: SUM(TotalSales)
Legend tab: bottom location, symbol width 8 Data Label tab: show tooltip, Data to Show: Item name and Percentage Pie tab: Data label Position: Show With Link Line Write OZ script to link the pie to the detail report (Link to Target report 4. Master-detail report(Group Above Style) Single Query) Create data table for the chart Write OZ script to link the Country cell to the detail report (same link as chart) Set viewer option to show report tree on the viewer. Write Java script for OnStartUp event of ReportTemplate as below: ReportTemplate.SetReportOption("viewer.smartframesize", "true"); ReportTemplate.SetReportOption("viewer.showtree", "true"); Reference the external parameter Year in the query. Query: SELECT Address.Country, SUM(OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount) as UnitPrice, SUM(OrderDetail.OrderQty) as OrderQty, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalSales FROM OrderHeader, OrderDetail, Address OrderHeader.AddressID = Address.AddressID AND DatePart('yyyy', OrderHeader.Orderdate) = '#OZParam.Year# GROUP BY Address.Country WHERE OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND
36
Date:
5/2/2012
Implementation guide:
Show report list in the OZ Viewer Tree and move to detailed report by clicking the TOC labels in the TOC page. Set labels TOC Level property. If TOC Level is greater than -1, TOC labels captions are listed in the tree of OZ Viewer when previewing the report. This numeric value means a level in the tree and 0 means the highest level. The root node of the tree is the report template object and shown with its Display Name property. Report consists of the TOC page, 1. Sales Summary page, 2. By Sales Person page, 3. By Country page, 4. By page. Each page is an independent report object so the report includes 5 report object. Create the link from TOC labels to the target page of the report. Create script on each source TOC label implementing link to the target TOC label using SetLinkToc(TocName) function. SetLinkToc function provides navigation through the tree and move to the target in the report. Set the TocName to the target label.
37
Date:
5/2/2012
Date:
5/2/2012
39
Date:
5/2/2012
SELECT * FROM ( SELECT SalesPerson.SalesPersonName, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalSales FROM OrderDetail, OrderHeader, SalesPerson WHERE OrderHeader.SalesPersonID = SalesPerson.SalesPersonID AND OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND Format(OrderHeader.Orderdate, 'yyyy-mm') = '#OZParam.YearMonth#' GROUP BY SalesPerson.SalesPersonName )T ORDER BY TotalSales desc SELECT * FROM ( SELECT Left(Customer.CustomerName, 20) AS CustomerName, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalSales FROM OrderDetail, OrderHeader, Customer WHERE Customer.CustomerID = OrderHeader.CustomerID AND OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND Format(OrderHeader.Orderdate, 'yyyy-mm') = '#OZParam.YearMonth#' GROUP BY Customer.CustomerName )T ORDER BY TotalSales desc SELECT * FROM ( SELECT Category.CategoryName, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalSales FROM OrderDetail, Product, OrderHeader, SubCategory, Category WHERE OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND OrderDetail.ProductID=Product.ProductID AND Product.SubcategoryID = SubCategory.SubcategoryID AND SubCategory.CategoryID = Category.CategoryID AND Format(OrderHeader.Orderdate, 'yyyy-mm') = '#OZParam.YearMonth#' GROUP BY Category.CategoryName )T ORDER BY TotalSales desc SELECT * FROM ( SELECT Address.Country, SUM((OrderDetail.UnitPrice - OrderDetail.UnitPriceDiscount)*OrderDetail.OrderQty) AS TotalSales FROM OrderDetail, OrderHeader, Address WHERE OrderHeader.AddressID=Address.AddressID AND OrderHeader.SalesOrderID = OrderDetail.SalesOrderID AND Format(OrderHeader.Orderdate, 'yyyy-mm') = '#OZParam.YearMonth#' GROUP BY Address.Country )T ORDER BY TotalSales desc
40
Date:
5/2/2012
SELECT Format(OrderHeader.Orderdate, 'yyyy-mm') AS OrderDate, OrderHeader.SalesOrderID, SalesPerson.SalesPersonName, Address.Country, Address.StateProvince, Address.City, Category.CategoryName, SubCategory.SubCategoryName, Product.ProductName, Count(OrderHeader.SalesOrderID) AS NOrders, SUM((UnitPrice - UnitPriceDiscount)*OrderQty) AS TotalSales, SUM(OrderQty*Product.StandardCost) AS ProductCost, TotalSales-ProductCost AS NetSales FROM OrderHeader, OrderDetail, Address, Product, SubCategory, Category, Customer, SalesPerson WHERE OrderHeader.SalesOrderID = OrderDetail.SalesOrderID and OrderHeader.AddressID = Address.AddressID and OrderHeader.CustomerID = Customer.CustomerID AND OrderHeader.SalesPersonID = SalesPerson.SalesPersonID AND OrderDetail.ProductID=Product.ProductID and Product.SubCategoryID = SubCategory.SubCategoryID and SubCategory.CategoryID = Category.CategoryID and Format(OrderHeader.Orderdate, 'yyyy-mm') = '#OZParam.YearMonth#' GROUP BY Format(OrderHeader.Orderdate, 'yyyy-mm'), OrderHeader.SalesOrderID, SalesPerson.SalesPersonName, Address.Country, Address.StateProvince, Address.City, Category.CategoryName, SubCategory.SubCategoryName, Product.ProductName
41
Date:
5/2/2012
Implementation guide:
Change the resource of target report 5. Master -detail report to multi language resource. OZ Report Designer allow the user to convert all of general labels to resource labels.
42
Date:
5/2/2012
Description
Table component Auto sizing of a cell Set background color of even rows using script Report header and tail Table component -Grouping -Prior label Display format of numeric label Crosstab component -Pivot row, pivot column, value -PreviousSum function -Title configuration -Fixing header Group header/footer band setup User defined parameter Master bans setup Fixing master Subtotal (aggregation function in script) Region component Various output direction Using Date in script
Report file
CustomerList_1.ozr CustomerList.ozr
ProductGroupTable.ozr
SalesMatrixTable.ozr
4. Master-detail report (Group Above Style) Single Query 5. Master-detail report (Group Above Style) Multi Query 6. Multi Column report
DetailSales.ozr
Invoice.ozr
MailingLabel.ozr
Calendar.ozr
Link to the detail report Link from a label of chart or table to the detail report Navigate from the TOC to the detail report Set a report to supports multiple language for global business report
TotalSalesbyCountry.ozr
A SalesReport.ozr
Invoice_Multi.ozr
43