developing reports with denkh html reporter scott auge amduus information works, inc

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

Upload: elisabeth-dickerson

Post on 16-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

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

Developing Reports with Developing Reports with Denkh HTML ReporterDenkh HTML Reporter

Scott AugeScott Auge

Amduus Information Works, Inc.Amduus Information Works, Inc.

Page 2: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

AudienceAudience

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

Page 3: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to reach the reporterHow to reach the reporter

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

Page 4: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Data SourcesData Sources

Progress RDBMSProgress RDBMS

Oracle via the Progress Data ServerOracle via the Progress Data Server

MS SQL via the Progress Data ServerMS SQL via the Progress Data Server

Other ODBC via the Progress Data ServerOther ODBC via the Progress Data Server

Other….Other….

Page 5: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Basic pieces of the reportBasic pieces of the report

One Page HeaderOne Page Header

Multiple Record sections (number of rows Multiple Record sections (number of rows returned by the query)returned by the query)

One Summary areaOne Summary area

One Page FooterOne Page Footer

A name for the reportA name for the report

The report’s QueryThe report’s Query

Page 6: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

The MacrosThe Macros

Macro’s are used as place holders for the Macro’s are used as place holders for the data to appear on the screendata to appear on the screenSome macro’s are related to which Some macro’s are related to which database tables and fields are referenceddatabase tables and fields are referencedOthers are simple date, report name, and Others are simple date, report name, and time macrostime macrosMore complicated one’s refer to specially More complicated one’s refer to specially written user programs or embedded written user programs or embedded reports.reports.

Page 7: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Putting data from the query into the Putting data from the query into the reportreport

Use the @fld() macroUse the @fld() macro

The @fld() macro receives the table and The @fld() macro receives the table and field name of the data currently available field name of the data currently available in the current row available from the query.in the current row available from the query.

Example: @fld(Customer.Name)Example: @fld(Customer.Name)

Page 8: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to put the current date on the How to put the current date on the reportreport

Use the @date() macroUse the @date() macro

Macro uses the current date on the Macro uses the current date on the application server machine, not the client’s application server machine, not the client’s computercomputer

There are no arguments to the macro.There are no arguments to the macro.

Page 9: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to add the current time to the How to add the current time to the reportreport

Use the @time() macroUse the @time() macro

Uses the current time on the application Uses the current time on the application server machine, not the user’s machine.server machine, not the user’s machine.

There are no arguments to the macro.There are no arguments to the macro.

Page 10: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to add the report name into How to add the report name into the reportthe report

Use the @rptname() macro.Use the @rptname() macro.

Replaced by the name of the report (useful Replaced by the name of the report (useful for reports with similar output)for reports with similar output)

There is no arguments for the macroThere is no arguments for the macro

Page 11: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to place user input into the How to place user input into the reportreport

Use the @inp() macro.Use the @inp() macro.

The @inp() macro refers to the entries the user The @inp() macro refers to the entries the user made to generate this report.made to generate this report.

Example: Example: Dates: @inp(1) Thru @inp(2) Dates: @inp(1) Thru @inp(2)

Will returnWill return

Dates: 11/22/02 Thru 11/23/00Dates: 11/22/02 Thru 11/23/00

If the user entered 11/22/02 and 11/23/00.If the user entered 11/22/02 and 11/23/00.

Tied to the @plc() macro – for each @plc() Tied to the @plc() macro – for each @plc() macro, there is a @inp() macro available.macro, there is a @inp() macro available.

Page 12: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to get user inputs into the How to get user inputs into the queryquery

Use the @plc() macroUse the @plc() macroAccepts the prompting text as an Accepts the prompting text as an argumentargument@plc(Enter Beginning Date:)@plc(Enter Beginning Date:)Used in the query of the report.Used in the query of the report.When used in strings, should be When used in strings, should be surrounded by “” as in:surrounded by “” as in:

FOR EACH Customer WHERE Customer.Name FOR EACH Customer WHERE Customer.Name BEGINS “@plc(Customer name:)”BEGINS “@plc(Customer name:)”

Page 13: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to embed reports into a reportHow to embed reports into a report

Use the @emb() macroUse the @emb() macro

Two Arguments seperated by a “,”Two Arguments seperated by a “,”

First is the name of the reportFirst is the name of the report

Second are arguments to that reportSecond are arguments to that report

Arguments to the embedded report should be in Arguments to the embedded report should be in order of the @plc() in it’s queryorder of the @plc() in it’s query

Arguments to the embedded report should be Arguments to the embedded report should be seperated by the | characterseperated by the | character

Example: @emb(OrderHeader,100|110)Example: @emb(OrderHeader,100|110)

Page 14: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to call out to a programHow to call out to a program

Use the @prg() macroUse the @prg() macro

Similar to the @emb() macro, except Similar to the @emb() macro, except receives a Progress 4GL program in the receives a Progress 4GL program in the first argument.first argument.

Example: @prg(AbbrWeekDay.p,11/10/02|Example: @prg(AbbrWeekDay.p,11/10/02|English)English)

Program can only return one output string.Program can only return one output string.

Page 15: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to refer to a ROWID of a tableHow to refer to a ROWID of a table

Use the @row() macro.Use the @row() macro.

Macro receives the name of the table to Macro receives the name of the table to report the ROWID on.report the ROWID on.

Example: @row(Customer)Example: @row(Customer)

Useful for embedded reports and program Useful for embedded reports and program call-outs.call-outs.

Page 16: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to perform a calculationHow to perform a calculation

Use the @calc() macro.Use the @calc() macro.

First argument is the formulaFirst argument is the formula Can perform +, -, *, / on algebraic expressions Can perform +, -, *, / on algebraic expressions

of integer/decimal numbersof integer/decimal numbers

Second argument is the formatSecond argument is the format

Can include @fld() and @prg() macros.Can include @fld() and @prg() macros.Example: @calc(@fld(OrderLine.Qty) * @fld(OrderLine.Price),>9.99)Example: @calc(@fld(OrderLine.Qty) * @fld(OrderLine.Price),>9.99)

Example running subtotal:Example running subtotal: @trksubtotal(GrandTotal, @calc(@fld(OrderLine.Qty) * @trksubtotal(GrandTotal, @calc(@fld(OrderLine.Qty) *

@fld(OrderLine.Price),>9.99))@fld(OrderLine.Price),>9.99))

Page 17: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to perform subtotalingHow to perform subtotaling

The @trksubtotal() macro populates an internal The @trksubtotal() macro populates an internal named accumulatornamed accumulator

The @rptsubtotal() macro returns the contents The @rptsubtotal() macro returns the contents of the internal named accumulator.of the internal named accumulator.

Multiple names means multiple totals can be Multiple names means multiple totals can be run.run.

Break By totaling can be done by names which Break By totaling can be done by names which are combinations of the break by values.are combinations of the break by values.

Page 18: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to format a valueHow to format a value

Use the @fmt() macroUse the @fmt() macro

First Argument is the value (integer or First Argument is the value (integer or decimal)decimal)

Second Argument is the format phraseSecond Argument is the format phrase

Example: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)

Page 19: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to Drill Down into another How to Drill Down into another reportreport

Use the @drill() macro to create a hyperlink to Use the @drill() macro to create a hyperlink to another reportanother reportFirst argument is name of the report to drill intoFirst argument is name of the report to drill intoSecond argument are arguments to that report (as if Second argument are arguments to that report (as if the user had entered them)the user had entered them)The third argument states which window to put the The third argument states which window to put the results in (_blank, _self, yourname, etc.)results in (_blank, _self, yourname, etc.)Fourth argument provides what to display on the Fourth argument provides what to display on the hyperlinkhyperlinkExample:@drill(Look Up Order By Order Example:@drill(Look Up Order By Order Number,@fld(Order.OrderNum),_blank,@fld(Order.ONumber,@fld(Order.OrderNum),_blank,@fld(Order.OrderNum))rderNum))

Page 20: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

How to perform subtotalingHow to perform subtotaling

The @tblsubtotal() macro prepares a table The @tblsubtotal() macro prepares a table of all the subtotal accumulators available.of all the subtotal accumulators available.

Page 21: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Macro HierarchyMacro HierarchyMacro’s used in report output are computed in this order:Macro’s used in report output are computed in this order:

1.1. @date(), @time(), @rptname()@date(), @time(), @rptname()2.2. @fld()@fld()3.3. @row()@row()4.4. @Inp()@Inp()5.5. @prg()@prg()6.6. @calc()@calc()7.7. @trksubtotal()@trksubtotal()8.8. @rptsubtotal(), @tblsubtotal()@rptsubtotal(), @tblsubtotal()9.9. @fmt()@fmt()10.10. @drill()@drill()11.11. @emb()@emb()

Page 22: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Macro CombinationsMacro Combinations

Macro’s can be combinedMacro’s can be combined

Macro’s usually cannot be used in a Macro’s usually cannot be used in a recursive mannerrecursive manner

Embedded Reports CAN be recursive, Embedded Reports CAN be recursive, where one report refers to another report, where one report refers to another report, which in turn refers to another report….which in turn refers to another report….

Page 23: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Using Macro’s to feed data to an Using Macro’s to feed data to an embedded reportembedded report

Since the @emb() macro is computed last, Since the @emb() macro is computed last, previous macro’s can be used within it:previous macro’s can be used within it:

@emb(CustomerHeader,@fld(Customer.CustomerNumber))@emb(CustomerHeader,@fld(Customer.CustomerNumber))

Calls the report CustomerHeader with the data found in the Calls the report CustomerHeader with the data found in the field CustomerNumber of the current Customer table.field CustomerNumber of the current Customer table.

Page 24: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Additional Macro CombinationsAdditional Macro Combinations

Sending the row ID of the table to @prg():Sending the row ID of the table to @prg():

@prg(FindSubCust.p,@row(Customer)|TRUE)@prg(FindSubCust.p,@row(Customer)|TRUE)

Sends the ROWID of Customer, as well a second argument Sends the ROWID of Customer, as well a second argument of TRUE to the program FindSubCust.pof TRUE to the program FindSubCust.p

Page 25: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

More complex macro computationsMore complex macro computations

This macro embeds the report This macro embeds the report SubCustomer with the output of the SubCustomer with the output of the program FindSubCust.p which receives a program FindSubCust.p which receives a ROWID and string TRUE. It also sends ROWID and string TRUE. It also sends SubCustomer the value in the SubCustomer the value in the Customer.Number as a second argument.Customer.Number as a second argument.

@emb(SubCustomer, @prg(FindSubCust.p,@row(Customer)|TRUE)|@emb(SubCustomer, @prg(FindSubCust.p,@row(Customer)|TRUE)|@fld(Customer.Number))@fld(Customer.Number))

Page 26: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Embedded ReportsEmbedded Reports

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

Page 27: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Embedded ReportsEmbedded Reports

Currently an embedded report cannot Currently an embedded report cannot exceed 32KB of text data.exceed 32KB of text data.

Be sure not to exceed 32KB on the section Be sure not to exceed 32KB on the section of a report calling out to an embedded of a report calling out to an embedded report.report.

Page 28: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Embedded ReportsEmbedded Reports

Page 29: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

Embedded ReportsEmbedded Reports

Previous report has an embedded report Previous report has an embedded report for the Line Items of the order.for the Line Items of the order.

Previous report has as part of it’s Record Previous report has as part of it’s Record Section the data from the Order formatted Section the data from the Order formatted according to HTML Table rules.according to HTML Table rules.

The embedded report has nothing in it’s The embedded report has nothing in it’s Page Header, Summary, and Footer.Page Header, Summary, and Footer.

Page 30: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

More informationMore information

Contact Scott Auge at Amduus Information Contact Scott Auge at Amduus Information Works, Inc. At [email protected], Inc. At [email protected]

Contact James Arnold at Analyst’s Contact James Arnold at Analyst’s Express, Inc. At 888-889-9091Express, Inc. At 888-889-9091

Page 31: Developing Reports with Denkh HTML Reporter Scott Auge Amduus Information Works, Inc

About Amduus Information Works, Inc.About Amduus Information Works, Inc.http://www.amduus.comhttp://www.amduus.com

United States Based CorporationUnited States Based Corporation

Can provide Webspeed TrainingCan provide Webspeed Training

Provides multiple open source applications Provides multiple open source applications to the Progress communityto the Progress community

Can provide application customizationCan provide application customization

Past work with Manufacturing, Court/Law Past work with Manufacturing, Court/Law Enforcement, Service industries.Enforcement, Service industries.