dbpListPrint

Purpose:

Print all records matching current search query (see dbpQuery). If no query is active, the entire table will be printed. The report is printed in a tabular format optionally using the color and font settings applied to the current table grid. Custom headers and footers for the report may be created using dbpListAddHeader and dbpListAddFooter. The report may also be sorted by calling dbpSort prior to printing.

Category:

Simple Reporting

Syntax:

dbpListPrint "database id" "table" "properties"

database id

The name assigned to the database.

table

The name of the table to be printed.

properties

This is a compound parameter and can contain any combination of the following items:


PrintDialog=Yes/No

Yes = display the standard Windows print dialog prior to printing. No = do not display the print dialog - report will be printed immediately.

Orientation=Portrait/Landscape

Portrait = print the report in portrait (vertical) mode. Landscape = print the report in landscape (horizontal) mode.

GridLines=Yes/No

Yes = draw lines between columns and rows. No = do not draw lines between columns and rows.

ColumnTitles=Yes/No

Yes = display the column heading row at the top of each page. No = do not display the column heading row.

RecordNumbers=Yes/No

Yes = display record numbers along the left side of the report. No = do not display record numbers.

AutoWidth=Yes/No

Yes = automatically adjust the width of each column to fit the page. No = use the column widths assigned to the table grid by dbpSetColumnWidths.

UseGridAttributes=Yes/No

Yes = use the colors, fonts and other properties assigned to the table grid with the dbpSetGridProperties action. No = do not use the grid properties.

LeftMargin=value

RightMargin=value

TopMargin=value

BottomMargin=value


Page margins to be used for the report. Margins can be  specified as inches or centimeters which is indicated by adding "in" or "cm" after the value. For example:


"LeftMargin=1.5in"

"LeftMargin=3.25cm"


Separate multiple items in a compound variable with semicolons (;). Because of the large number of options, it is recommended that you use the wizard provided for the dbpListPrint Action.

Example:

dbpListPrint "AddrBook" "Contacts" "PrintDialog=Yes;Orientation=Landscape;GridLines=Yes;ColumnTitles=Yes; RecordNumbers=Yes;AutoWidth=Yes;UseGridAttributes=Yes;LeftMargin=0.25in; RightMargin=0.25in;TopMargin=0.5in;BottomMargin=0.5in"

SQL Equivalent:


N/A


dbpListAddHeader

Purpose:

Add a header to appear at the top of a printed list report. You may call this action more than once to create multiple headers. After specifying headers and footers, use dbpListPrint to actually send the report to the printer. You can use dbpListClearHeadersAndFooters to remove headers and footers.

Category:

Simple Reporting

Syntax:

dbpListAddHeader "database id" "table" "line" "text" "properties"

database id

The name assigned to the database.

table

The name of the table.

line

The line number from the top of the page where the header will appear. Subsequent headers (lines 2, 3, etc.) will be printed below the first header (line 1).

text

The text that you want to appear in the header. You may use any combination of text, VisualNEO for Windows variables and the following special codes:


&p

Report page number.

&n

Total number of pages in report.

&t

Current time.

&d

Current date.

&&

Prints the & symbol.

properties

This is a compound parameter and can contain any combination of the following items:


Alignment=

Alignment method used to display the header text. Can be either Left, Right or Center.

Font=font

The font name, size, style and character set of the font used for the grid cells. See Defining Fonts.

FontColor=color

The color used for the header text. See Defining Colors.


Separate multiple items in a compound variable with semicolons (;).

Example:

The following adds a left and right header to the top of a report:


dbpListAddHeader "AddrBook" "Contacts" "1" "Address Book" "Alignment=Left;Font=Arial,12,Bold,ANSI_CHARSET;FontColor=Black"

dbpListAddHeader "AddrBook" "Contacts" "1" "Page &p of &n" "Alignment=Right;Font=Arial,10,Normal,ANSI_CHARSET;FontColor=Black"


SQL Equivalent:


N/A


dbpListAddFooter

Purpose:

Add a footer to appear at the bottom of a printed list report. You may call this action more than once to create multiple footers. After specifying headers and footers, use dbpListPrint to actually send the report to the printer. You can use dbpListClearHeadersAndFooters to remove headers and footers.

Category:

Simple Reporting

Syntax:

dbpListAddFooter "database id" "table" "line" "text" "properties"

database id

The name assigned to the database.

table

The name of the table.

line

The line number from the bottom of the page where the footer will appear. Subsequent footers (lines 2, 3, etc.) will be printed below the first footer (line 1).

text

The text that you want to appear in the header. You may use any combination of text, VisualNEO for Windows variables and the following special codes:


&p

Report page number.

&n

Total number of pages in report.

&t

Current time.

&d

Current date.

&&

Prints the & symbol.

properties

This is a compound parameter and can contain any combination of the following items:


Alignment=value

Alignment method used to display the header text. Can be either Left, Right or Center.

Font=font

The font name, size, style and character set of the font used for the grid cells. See Defining Fonts.

FontColor=color

The color used for the header text. See Defining Colors.


Separate multiple items in a compound variable with semicolons (;).

Example:

dbpListAddFooter "AddrBook" "Contacts" "1" "Page &p of &n" "Alignment=Center;Font=Arial,9,Normal,ANSI_CHARSET;FontColor=Black"

SQL Equivalent:


N/A


dbpListClearHeadersAndFooters

Purpose:

Remove headers and footers previously created using dbpListAddHeader and dbpListAddFooter.

Category:

Simple Reporting

Syntax:

dbpListClearHeadersAndFooters "database id" "table"

database id

The name assigned to the database.

table

The name of the table.

Example:

dbpListClearHeadersAndFooters "AddrBook" "Contacts"

SQL Equivalent:


N/A