Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".
Philipp Gerber: "

The product is so easy and super built that you can achieve visible and great success after a short time. Also very much possible with the product. A class product. I'm already looking forward to the next versions and extensions. Keep it up.

Support to the product is just perfect. Each Support request is quickly and very competent solved. Also various assistance, which does not fall into a support, are also perfectly processed. There is a direct wire to the manufacturer / developer and this is notth. Thanks for the class Support".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

Print & Export enability methods

The following methods allow to enable/disable various print and export abilities for a page.

 

Signature

Description

setPrintListAvailable($value)

Allows to print all records from a grid.

setExportListAvailable(array $exportFormats)

Allows to export all records from a grid to the given formats.

setAllowPrintSelectedRecords($value)

Allows to print the selected records from a grid.

setExportSelectedRecordsAvailable(array $exportFormats)

Allows to export the selected records from a grid to the given formats.

setPrintListRecordAvailable($value)

Allows to print a single record from a grid.

setExportListRecordAvailable(array $exportFormats)

Allows to export a single record from a grid to the given formats.

setPrintOneRecordAvailable($value)

Allows to print a record from a view form.

setExportOneRecordAvailable(array $exportFormats)

Allows to export a record from a view form to the given formats.

 

The $exportFormats array can include the following values: 'pdf', 'excel', 'word', 'xml', 'csv'.

 

The code in the examples below should be placed into the OnPreparePage event handler:

 

Example 1:

To allow to export the selected records in 'pdf' and 'word' formats only, use the following code:

 

$this->setExportSelectedRecordsAvailable(array('pdf', 'word'));

 

 

Example 2:

To allow to execute any print operations only for users with admin permissions, use the following code:

 

$isPageAdmin = $this->IsLoggedInAsAdmin();

$this->setPrintListAvailable($isPageAdmin);

$this->setAllowPrintSelectedRecords($isPageAdmin);

$this->setPrintListRecordAvailable($isPageAdmin);

$this->setPrintOneRecordAvailable($isPageAdmin);

 

 

Example 3:

To disable any export operations for ordinary users, use the following code:

 

$isOrdinaryUser = !$this->IsLoggedInAsAdmin();

if ($isOrdinaryUser) {

  $this->setExportListAvailable(array());

  $this->setExportSelectedRecordsAvailable(array());

  $this->setExportListRecordAvailable(array());

  $this->setExportOneRecordAvailable(array());

}

 



Prev Return to chapter overview Next