Support and Training

Using Reports Based on SQL Reporting Services With MetaCommunications Products

SQL Server Reporting Services is a comprehensive reporting solution for both paper and web-based reports, pulling information directly from the SQL Server database for your MetaCommunications applications. Reporting Services is available as a free add-on for SQL Server 2000 Standard edition or greater. Detailed information about Reporting Services can be found at Microsoft's SQL Server: Reporting Services website:

MetaCommunications provides a solution for invoking Reporting Services reports from Virtual Ticket and Digital Storage Manager forms, allowing easy access to reports right from within the application interface. This solution can be downloaded here. The solution can then be added to Virtual Ticket or Digital Storage Manager through the Stored Solutions tool available in the Administration menu. When a report is invoked via this solution, it can be displayed to the user in PDF, Excel, or other supported formats.

Any report can be invoked from a Global MetaScript window using the GenerateReport function:

GenerateReport(<report name>, {<report parameter 1>:<parameter 1 value>, <report parameter 2>:<parameter 2 value>,..., output_format:<output format>}); 


      <report name> = name of the report to be invoked
      <report parameter 1>...<report parameter X> = parameters for the report
      <parameter 1 value>...<parameter X value> = values for the corresponding parameters for the report
      <output format> = format to display output back to the user


Including an entry for output format in the parameters is optional. If none is specified, the output will be PDF.


A SQL Reporting Service report has been defined to show jobs for a given month of the year with a given status.

      Report Name: MonthlyJobStatus
      Parameter 1: MonthToReport
      Parameter 2: StatusToReport


A form has been defined in Virtual Ticket with fields for current month (CurrentMonth) and current status (CurrentStatus).

In order to invoke the report from the form, the following MetaScript would be entered into a Global MetaScript window:

//@include "database:rs_report.js" 
GenerateReport(MonthlyJobStatus, {MonthToReport : Field('CurrentMonth'), StatusToReport : Field('CurrentStatus')}); 

Since no output format is specified, the report will be generated as a PDF. Here is the same report targeted to output in Excel format:

//@include "database:rs_report.js" 
GenerateReport(MonthlyJobStatus, {MonthToReport : Field('CurrentMonth'), StatusToReport : Field('CurrentStatus'), output_format : 'xls'}); 


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request