Contents

 
Home
ASPRunner Professional 8.1 manual
Prev Page Next Page
 
 

Custom SQL

 

A user with admin permissions (admin) can create custom SQL queries that later may be used by other users as a datasource for reports and charts. Also admin can edit and delete custom SQL queries.

To view/create/edit/delete custom SQL queries use the Custom SQL button on the start window.

webreports_start

To create new custom SQL query:

1. Click the Custom SQL button on the start window.

2. Click the New button.

webreports_custom_sql

3. Enter SQL query name and the query code. If you wish to set permissions for the created query right after its saving, select the Proceed to permissions screen check box. Note that you can set permissions later on the Admin page (use the Admin page button on the start window).

webreports_custom_sql_create

Note that you can use stored procedures in the SQL query for those databases where they are supported (MS SQL Server, MySQL, Oracle, etc.).

Example of calling the stored procedure without parameters in MS SQL Server:

EXEC [Ten Most Expensive Products]

Example of calling the stored procedure with parameters in MS SQL Server:

EXEC [Employee Sales by Country] '10/10/2007','10/10/2009'

4. Click Save.

When creating a report or chart a user can choose custom SQL query as a datasource (go to the SQL queries tab on the Tables window). Admin can also create new custom SQL query using the New query button and edit the existing SQL queries using the SQL Query button.

webreports_query

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)