Difference between revisions of "Reports Workspace"

From Lianjapedia
Jump to: navigation, search
(Delegates)
(Delegates)
Line 259: Line 259:
  
 
==Delegates==
 
==Delegates==
The '''Delegates''' settings define the event delegates for the report.  These are Lianja/VFP scripts (server-side for web/mobile Apps).
+
The '''Delegates''' settings define the event delegates for the report.
  
 
Clicking on the [...] displays a popup custom code editor and automatically generates a filename.
 
Clicking on the [...] displays a popup custom code editor and automatically generates a filename.
Line 268: Line 268:
 
|-
 
|-
 
|valign="top"|Before Generate
 
|valign="top"|Before Generate
|valign="top"|Called before report is generated.   
+
|valign="top"|Called before report is generated.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|After Generate
 
|valign="top"|After Generate
|valign="top"|Called after report is generated.
+
|valign="top"|Called after report is generated.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|Before Group
 
|valign="top"|Before Group
|valign="top"|Called before a group is processed.
+
|valign="top"|Called before a group is processed.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|After Generate
 
|valign="top"|After Generate
|valign="top"|Called after a group is processed.
+
|valign="top"|Called after a group is processed.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|Before Open
 
|valign="top"|Before Open
|valign="top"|Called before table is opened or sql is executed.
+
|valign="top"|Called before table is opened or sql is executed.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|After Open
 
|valign="top"|After Open
|valign="top"|Called after table is opened or sql is executed.
+
|valign="top"|Called after table is opened or sql is executed.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|Cell Renderer
 
|valign="top"|Cell Renderer
|valign="top"|Called to render cells in the report.
+
|valign="top"|Called to render cells in the report.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|valign="top"|Row Clicked
 
|valign="top"|Row Clicked
|valign="top"|Called when a row is clicked.
+
|valign="top"|Called when a row is clicked.  This is a JavaScript script.
 
|-
 
|-
 
|valign="top"|Row Double Clicked
 
|valign="top"|Row Double Clicked
|valign="top"|Called when a row is double-clicked.
+
|valign="top"|Called when a row is double-clicked.  This is a JavaScript script.
 
|-
 
|-
 
|valign="top"|Hyperlink
 
|valign="top"|Hyperlink
|valign="top"|Called when a hyperlink is clicked.
+
|valign="top"|Called when a hyperlink is clicked.  This is a JavaScript script.
 
|-
 
|-
 
|valign="top"|Data Changed
 
|valign="top"|Data Changed
|valign="top"|Called after each data row changes during processing.
+
|valign="top"|Called after each data row changes during processing.  This is a Lianja/VFP script (server-side for web/mobile Apps).
 
|-
 
|-
 
|}
 
|}

Revision as of 06:49, 23 October 2019

Coming soon in Lianja v5.0

Overview

Reports Workspace


Buttons

Reports Workspace


Reports

Select an existing report from the pulldown. Reports built in the Report Builder are saved to the Library reports directory so they can be used in multiple Apps. The Lianja App Builder distribution comes with some pre-built demo reports.

Report Builder


Data Source

The Data Source settings allow the ODBC or native Lianja data source to be configured.

Setting Required Description
Connection No The ODBC DSN for the data source. The pulldown lists available 32-bit ODBC DSNs.
Database Yes, unless Custom SQL is specified and references the database name, e.g. select * from southwind!shippers. The database for the data source. The pulldown lists available Lianja databases.
Table Yes, unless Custom SQL is specified The table for the data source. The pulldown lists tables from the specified Database.
Fields Yes, unless Custom SQL is specified The fields to be included from the Table. Click the [...] button to display the 'Choose fields' dialog. The default is * indicating all fields from the Table.
Filter No The filter condition to be applied to the records from the Table. Click the [...] button to display the 'Custom Query Builder'.
Include Memos No Whether to include variable length text memo fields. If true, the text of the memo field contents is displayed. If false (default), 'MEMO' is displayed when the memo field has contents and 'Memo' when it is empty.
Include Images No Whether to include image object fields. If true, the image is displayed. If false (default), the field name is displayed.
Custom SQL No, unless Table is not specified The SQL select query for the data source.

Once the Database and Table or Custom SQL have been specified, additional report configuration tabs are shown and the live report is displayed.

Page Layout

The Page Layout settings determine the layout when the report is printed.

Setting Default Description
Paper Size Letter Select the paper size to be used when printing the report. If Custom is selected, the dimensions can be specified in the Custom Paper Size.
Custom Paper Size The paper dimensions if Custom is selected as the Paper Size.
Rows per page 40 The number of rows to display per page when printing the report.
Row Height 0 (autosize) The row height in pixels when printing the report.
Show Grid Lines True Whether grid lines should be shown when printing the report.
Show Page Numbers True Whether page numbers (nPage of nPages) should be shown in the page footer when printing the report.
Page Top Margin 50 The height in pixels of the page top margin when printing the report.
Page Bottom Margin 0 The height in pixels of the page bottom margin when printing the report.
Show Date/Time True Whether the date and time should be shown in the page footer when printing the report.

Grouping

The Grouping settings determine the optional grouping and sort order columns for the report. These include options to allow the end user to select from a specified list of columns.

Setting Default Description
Group By The grouping column for the records in the report. A Sub-totals: footer will be displayed for each group. Individual columns can be flagged to be sub-totalled in the Detail report configuration tab.
Group By List A | separated list of columns that the user can select from to set the grouping for the records in the report.
Sort By The sort order column for the records in the report.
Sort By List A | separated list of columns that the user can select from to set the sort order for the records in the report.

Here the employees report has been altered to specify the Group By List as:

reportsto|lastname

and the Sort By List as:

lastname|firstname

The user can select from the lists to change the grouping and sort order columns active in the report.

Report Builder Grouping


Header

The Header settings allow the header and main and sub headings to be configured.

Report Header


Setting Default Description
Main Heading {reportname} report for user {username} The main heading. For the default main heading, the {} macros are expanded to display the reportname and current username.
Sub-Heading A sub-heading.
Header Height The height of the header in pixels.
Header Image The name of an image file to be displayed as the background to the header.
Clicking on the [...] displays a file chooser.
Custom Header The name of a Lianja/VFP program or procedure to output HTML5 for the display of a custom header. e.g.
? "<div style='background:lightgray;height:1px;width:100%;'></div>"
? "<br>"
? "<center>-- Custom Header --</center>"
? "<br>"

Clicking on the [...] displays a popup custom code editor and automatically generates a filename.

Header Background Color White The background color of the header (if no Header Image).
Clicking on the [...] displays a color chooser.
Left Header Image The name of an image file to be displayed on the left-hand side of the header.
Clicking on the [...] displays a file chooser.
Right Header Image The name of an image file to be displayed on the right-hand side of the header.
Clicking on the [...] displays a file chooser.

Note that when files are selected via the [...] buttons, they are added to the report's directory. For example, if the report is 'customers', its directory is customers in the reports sub-directory of the Lianja library directory. If file names are entered manually, the files should be located in the report's directory.

Windows

C:\lianja\library\reports\<reportname>

Linux

/opt/lianja/library/reports/<reportname>

macOS

/usr/local/lianja/library/reports/<reportname>

Detail

The Detail settings allow the display of individual columns to be configured.

Setting Default Description
Column Select the column to be configured from the pulldown.
Column Expression The expression to be displayed in the column.
Heading The heading for the column.
Alignment The alignment for the column (Left | Center | Right).
Display Mask The display mask for the column.
Data Mapping The data mapping for the column.
Dynamic BackColor MIME base64 encoded string containing a color value.
Dynamic ForeColor MIME base64 encoded string containing a color value.
Sub-total False Whether the column should be sub-totalled.
Hyperlink False Whether the column contents should be displayed as a hyperlink.
Column Width Column width in pixels.

Delegates

The Delegates settings define the event delegates for the report.

Clicking on the [...] displays a popup custom code editor and automatically generates a filename.

Setting Description
Before Generate Called before report is generated. This is a Lianja/VFP script (server-side for web/mobile Apps).
After Generate Called after report is generated. This is a Lianja/VFP script (server-side for web/mobile Apps).
Before Group Called before a group is processed. This is a Lianja/VFP script (server-side for web/mobile Apps).
After Generate Called after a group is processed. This is a Lianja/VFP script (server-side for web/mobile Apps).
Before Open Called before table is opened or sql is executed. This is a Lianja/VFP script (server-side for web/mobile Apps).
After Open Called after table is opened or sql is executed. This is a Lianja/VFP script (server-side for web/mobile Apps).
Cell Renderer Called to render cells in the report. This is a Lianja/VFP script (server-side for web/mobile Apps).
Row Clicked Called when a row is clicked. This is a JavaScript script.
Row Double Clicked Called when a row is double-clicked. This is a JavaScript script.
Hyperlink Called when a hyperlink is clicked. This is a JavaScript script.
Data Changed Called after each data row changes during processing. This is a Lianja/VFP script (server-side for web/mobile Apps).

Note that when files are created via the [...] buttons, they are added to the report's directory. See Header for further details on the report's directory location.

Footer

The Footer settings determine the display of the page footer when the report is printed/previewed.

Setting Default Description
Footer Height 25 The page footer height in pixels.
Footer Image The name of an image file to be displayed as the background to the footer.
Clicking on the [...] displays a file chooser.
Custom Footer The name of a Lianja/VFP program or procedure to output HTML5 for the display of a custom footer. e.g.
? "<div style='background:lightgray;height:1px;width:100%;'></div>"
? "<center>--- Custom Footer --</center>"

Clicking on the [...] displays a popup custom code editor and automatically generates a filename.

Footer Background Color White The background color of the footer (if no Footer Image).
Clicking on the [...] displays a color chooser.

Note that when files are selected via the [...] buttons, they are added to the report's directory. See Header for further details on the report's directory location.