Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc.

Similar presentations


Presentation on theme: "Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc."— Presentation transcript:

1 Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc.

2 Audience Report Designers who are interested in directly developing a report (versus using a Report Wizard.)

3 How to reach the reporter The DenkhReporter.html page is meant for the user’s to search for, list, and run reports. The AdminHTMLRpt.html is meant for use by the report administrators. The exact URL is dependent on the machine name, script path, and broker name as set up by your Webspeed administrator.

4 Data Sources Progress RDBMS Oracle via the Progress Data Server MS SQL via the Progress Data Server Other ODBC via the Progress Data Server Other….

5 Basic pieces of the report One Page Header Multiple Record sections (number of rows returned by the query) One Summary area One Page Footer A name for the report The report’s Query

6 The Macros Macro’s are used as place holders for the data to appear on the screen Some macro’s are related to which database tables and fields are referenced Others are simple date, report name, and time macros More complicated one’s refer to specially written user programs or embedded reports.

7 Putting data from the query into the report Use the @fld() macro The @fld() macro receives the table and field name of the data currently available in the current row available from the query. Example: @fld(Customer.Name)

8 How to put the current date on the report Use the @date() macro Macro uses the current date on the application server machine, not the client’s computer There are no arguments to the macro.

9 How to add the current time to the report Use the @time() macro Uses the current time on the application server machine, not the user’s machine. There are no arguments to the macro.

10 How to add the report name into the report Use the @rptname() macro. Replaced by the name of the report (useful for reports with similar output) There is no arguments for the macro

11 How to place user input into the report Use the @inp() macro. The @inp() macro refers to the entries the user made to generate this report. Example: Dates: @inp(1) Thru @inp(2) Will return Dates: 11/22/02 Thru 11/23/00 If the user entered 11/22/02 and 11/23/00. Tied to the @plc() macro – for each @plc() macro, there is a @inp() macro available.

12 How to get user inputs into the query Use the @plc() macro Accepts the prompting text as an argument @plc(Enter Beginning Date:) Used in the query of the report. When used in strings, should be surrounded by “” as in: FOR EACH Customer WHERE Customer.Name BEGINS “@plc(Customer name:)”

13 How to embed reports into a report Use the @emb() macro Two Arguments seperated by a “,” First is the name of the report Second are arguments to that report Arguments to the embedded report should be in order of the @plc() in it’s query Arguments to the embedded report should be seperated by the | character Example: @emb(OrderHeader,100|110)

14 How to call out to a program Use the @prg() macro Similar to the @emb() macro, except receives a Progress 4GL program in the first argument. Example: @prg(AbbrWeekDay.p,11/10/02|English) Program can only return one output string.

15 How to refer to a ROWID of a table Use the @row() macro. Macro receives the name of the table to report the ROWID on. Example: @row(Customer) Useful for embedded reports and program call-outs.

16 How to perform a calculation Use the @calc() macro. First argument is the formula Can perform +, -, *, / on algebraic expressions of integer/decimal numbers Can perform +, -, *, / on algebraic expressions of integer/decimal numbers Second argument is the format Can include @fld() and @prg() macros. Example: @calc(@fld(OrderLine.Qty) * @fld(OrderLine.Price),>9.99) Example running subtotal: @trksubtotal(GrandTotal, @calc(@fld(OrderLine.Qty) * @fld(OrderLine.Price),>9.99)) @trksubtotal(GrandTotal, @calc(@fld(OrderLine.Qty) * @fld(OrderLine.Price),>9.99))

17 How to perform subtotaling The @trksubtotal() macro populates an internal named accumulator The @rptsubtotal() macro returns the contents of the internal named accumulator. Multiple names means multiple totals can be run. Break By totaling can be done by names which are combinations of the break by values.

18 How to format a value Use the @fmt() macro First Argument is the value (integer or decimal) Second Argument is the format phrase Example: @fmt(@fld(OrderLine.Price),$>>>9.99) @fmt(@fld(OrderLine.Price),$>>>9.99) @fmt(@fld(Audit.StartTime),HH:MM AM) @fmt(@fld(Audit.StartTime),HH:MM AM)

19 How to Drill Down into another report Use the @drill() macro to create a hyperlink to another report First argument is name of the report to drill into Second argument are arguments to that report (as if the user had entered them) The third argument states which window to put the results in (_blank, _self, yourname, etc.) Fourth argument provides what to display on the hyperlink Example:@drill(Look Up Order By Order Number,@fld(Order.OrderNum),_blank,@fld(Or der.OrderNum))

20 How to perform subtotaling The @tblsubtotal() macro prepares a table of all the subtotal accumulators available.

21 Macro Hierarchy Macro’s used in report output are computed in this order: 1.@date(), @time(), @rptname() 2.@fld() 3.@row() 4.@Inp() 5.@prg() 6.@calc() 7.@trksubtotal() 8.@rptsubtotal(), @tblsubtotal() 9.@fmt() 10.@drill() 11.@emb()

22 Macro Combinations Macro’s can be combined Macro’s usually cannot be used in a recursive manner Embedded Reports CAN be recursive, where one report refers to another report, which in turn refers to another report….

23 Using Macro’s to feed data to an embedded report Since the @emb() macro is computed last, previous macro’s can be used within it: @emb(CustomerHeader,@fld(Customer.CustomerNumber)) Calls the report CustomerHeader with the data found in the field CustomerNumber of the current Customer table.

24 Additional Macro Combinations Sending the row ID of the table to @prg(): @prg(FindSubCust.p,@row(Customer)|TRUE) Sends the ROWID of Customer, as well a second argument of TRUE to the program FindSubCust.p

25 More complex macro computations This macro embeds the report SubCustomer with the output of the program FindSubCust.p which receives a ROWID and string TRUE. It also sends SubCustomer the value in the Customer.Number as a second argument. @emb(SubCustomer, @prg(FindSubCust.p,@row(Customer)|TRUE)|@fld(Customer.Number))

26 Embedded Reports An embedded report is a report within a report. Embedded reports can call out to other embedded reports. Allows a report designer to build a repository of report “pieces” to build more and more complex reports. Reports using common embedded reports have a common look and feel to them.

27 Embedded Reports Currently an embedded report cannot exceed 32KB of text data. Be sure not to exceed 32KB on the section of a report calling out to an embedded report.

28 Embedded Reports

29 Previous report has an embedded report for the Line Items of the order. Previous report has as part of it’s Record Section the data from the Order formatted according to HTML Table rules. The embedded report has nothing in it’s Page Header, Summary, and Footer.

30 More information Contact Scott Auge at Amduus Information Works, Inc. At sauge@amduus.com Contact James Arnold at Analyst’s Express, Inc. At 888-889-9091

31 About Amduus Information Works, Inc. http://www.amduus.com United States Based Corporation Can provide Webspeed Training Provides multiple open source applications to the Progress community Can provide application customization Past work with Manufacturing, Court/Law Enforcement, Service industries.


Download ppt "Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc."

Similar presentations


Ads by Google