Report Options

From Lianjapedia
Revision as of 11:22, 23 May 2016 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Under Construction

See Also

Report Section Attributes

Overview

Report Section in Lianja Web Client



Report Sections are used to display tabular reports.


Lianja Web UI Demo

example_webapp2 App



The 'Lianja Web UI Demo' (example_webapp2) is included in the Lianja App Builder distribution.


example_webapp2 App



It has three full page Report Sections.


Report options

Report Section options



Double-click the Section header or click the cog icon to access the Section Attributes.


The Details section at the top of the attributes dialog holds the specification of the Database and Table.

If the Database and Table are omitted, the southwind database and the example table are the default values.

Note that the report is based on a single table. However, this table can be a Virtual Table based on a SQL Select query to local or remote tables. See here for information on Virtual Tables.


The Report Section options are described here:

Report type

The Report type attribute specifies the report layout type. Currently, Tabular is supported.

Heading

The Heading attribute specifies text to use as the report heading.

e.g.

Client Credit List (over limit)

The Heading attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportHeading.

Notes on Client Support

Filter

The Filter attribute specifies a logical expression used to restrict which records will be included in the report.

e.g. the Clients over credit limit report filters on the available field being less than zero:

available < 0

The Filter attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportFilter.

Notes on Client Support

Fields

The Fields attribute specifies the fields to be included in the report. This should be a comma separated list of field names or expressions.

e.g.

account_no, upper(concat(title," ",first_name,last_name)),limit

or, to select all fields in the table as in the example_webapp2 reports:

*

The Fields attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportFields.

Notes on Client Support

Columns

The Columns attribute specifies the column positions for the selected fields in the report. This should be a comma separated list of numeric column positions. If Columns is left blank, all fields are displayed and in the same order as in the Fields attribute.

e.g. the Clients over credit limit report omits field 1 (example.account_no) from the display and swaps the order of fields 3 (example.first_name) and 4 (example.last_name).

2,4,3,5,6,7,8,9,10,11

The Columns attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportColumns.

Notes on Client Support

Column headings

The Column headings attribute specifies the text to be used as the report column headings. This should be a comma separated list of text strings.

If Column headings is left blank, the descriptions from the fields in the table are used. Unless Fields is *, the Column headings should be entered to match the chosen field selection and order.

e.g. if Fields is:

account_no, upper(concat(title," ",first_name,last_name)),limit

then Column headings is:

Account,Fullname,Credit Limit

The Column headings attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportColumnHeadings or Lianja.getElementByID("page.section").reportHeadings.

Notes on Client Support

Subtotals

The Subtotals attribute specifies the columns in the report to be sub-totalled. This should be a comma separated list of numeric column positions of numeric fields.

e.g.

9,10,11

The Subtotals attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportSubTotals.

Notes on Client Support

Group by

The Group by attribute specifies the name of the field or the expression that the report data will be grouped by for sub-totalling.

e.g.

state

The Group by attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportGroupBy.

Notes on Client Support

Hyperlinks

The Hyperlinks attribute specifies the field or fields that will be rendered as hyperlinks for searching. This should be a comma separated list of field names.

The Hyperlinks attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportHyperlink.

Notes on Client Support

Show grid lines

The Show grid lines attribute specifies whether grid lines should be displayed for each row of the report (True | False). Grid lines are currently always shown.

The Show grid lines attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportGridLines.

Notes on Client Support

Pagination

The Pagination attribute specifies whether the rows displayed should be paginated (True | False).

Pagination is not currently implemented.

Pagination size

The Pagination size attribute specifies the number of rows to display per page.

Pagination is not currently implemented.

Other options

The Other report options attribute specifies additional option=value pairs to be passed to the report. These should be specified as an ampersand (&) separated list.

Note: to access these options within library:/report.rsp, add a getParameter() for each additional option.

If 'Other options' is set to:

username={username()}&myparam=some text

Library:/report.rsp should include:

private username = getParameter("username","")

private myparam = getParameter("myparam","")

The Other options attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").reportOtherOptions.

Notes on Client Support

Delegate Behavior

Delegate hyperlinks

Delegate hyperlinks in page to page and/or section (True | False).

Delegate page

Delegate page name to search (leave blank if current page).

Delegate section

Delegate section name (leave blank if default searchkey section on page).

Delegate script

Delegate script name (URL is passed as character string).

Notes on Client Support

Attribute Notes
Report type -
Heading Lianja.getElementByID("page.section").reportHeading is exposed on the Desktop client only (Lianja/VFP).
Filter Lianja.getElementByID("page.section").reportFilter is exposed on the Desktop client only (Lianja/VFP).
Fields Lianja.getElementByID("page.section").reportFields is exposed on the Desktop client only (Lianja/VFP).
Columns Lianja.getElementByID("page.section").reportColumns is exposed on the Desktop client only (Lianja/VFP).
Column headings Lianja.getElementByID("page.section").reportColumnHeadings and Lianja.getElementByID("page.section").reportHeadings are exposed on the Desktop client only (Lianja/VFP).
Subtotals Lianja.getElementByID("page.section").reportSubTotals is exposed on the Desktop client only (Lianja/VFP).
Group by Lianja.getElementByID("page.section").reportGroupBy is exposed on the Desktop client only (Lianja/VFP).
Hyperlinks Lianja.getElementByID("page.section").reportHyperlink is exposed on the Desktop client only (Lianja/VFP).
Show grid lines Grid lines are currently always shown.
Lianja.getElementByID("page.section").reportGridLines is exposed on the Desktop client only (Lianja/VFP).
Pagination Pagination is not currently implemented.
Pagination size Pagination is not currently implemented.
Other options Lianja.getElementByID("page.section").reportOtherOptions is exposed on the Desktop client only (Lianja/VFP).
Delegate hyperlinks
Delegate page
Delegate section
Delegate script

report.rsp

The rsp Lianja Server Page script (report.rsp) used by the Report Section WebViewWidget is located in the Lianja Library directory.

Client Location
App Builder \lianja\library\
App Center \lianja\cloudserver\tenants\public\library
Web/Mobile Clients \lianja\cloudserver\tenants\public\wwwroot\library

It can be customized if required, but proceed with caution, as the modifications will apply to all Report Sections and will be overwritten by product upgrades.

Alternatively, report.rsp could be used as a template for your own rsp and specified as the URL/source for a WebView Section.

The Reports in the 'Lianja Demo' (lianjademo) App use quickreport.rsp in this way, e.g. the Report overdue payments report:

URL:quickreport.rsp?database=southwind&table=example&fields=*&groupby=state
    &filter=available<0&heading=Customer Credit List (over limit)
    &columns=2,4,3,5,6,7,8,9,10,11,12&subtotals=9,10,11&gridlines=true

Reporting Alternatives

The Lianja ODBC Driver, in conjunction with the Lianja SQL Server, can be used with third party report writers such as Crystal Reports or Microsoft Report Builder.