Switch to: V11V10V9V8V7V6V5

vproject_make_new_report_with_datasource()

Declaration

report_id = vproject_make_new_report_with_datasource(
 					resource inVProjectID,
 					int	 inReportIndex,
 					string   inDatasource,
 					string	 inQuery )
 
report_id = vproject_make_new_report_with_datasource(
 					resource inVProjectID,
 					string	 inReportName,
 					string   inDatasource,
 					string	 inQuery )

Parameters

Name Description
inVProjectID Identifier of a Valentina Project.
inIndex Index of VReport.
inReportName Name of vReport.
inDatasource The datasource to be used.
inQuery The SQL string of a query.

NOTES:

  • Detailed description of the datasource string can be found in the Valentina API Reference.
  • Parameter inQuery must contain any SQL that returns a set of records.
  • Parameter inQuery can be empty by default. In this case the VReport will use the original query, which is stored in the VProject.

Description

Creates a new instance of VReport based on any supported datasource.

Return Values

Returns id of object.

Examples

Example

<?php
$project_id = vproject_create( $link, $project_name );
...
$report_id = vproject_make_new_report_with_datasource( $project_id, 1, "vserver://host = '127.0.0.1', user = 'sa', password = 'sa', dbname = 'db1', port = 15432", "select * from t1" );
 
?>