GetReportByName (string name)
method
Returns Report object by name
Syntax
public static Report GetReportByName (string name)
Parameters
name — string
string name of the report
Return
Report
An object that represents Report.
Example
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;
using PTLRuntime.NETScript.Report;
namespace ReportsExamples
{
public class ReportsExamples : NETStrategy
{
Report[] rep;
//DataTable[] data;
public override void OnQuote()
{
// if you want to get reports you can use such methods:
//1) This method return all available reports
rep = Report.GetAllReports();
for(int i=0;rep.Length-1>i;i++)
{
//Here we can see all properties
Print(rep[i].Id);
Print(rep[i].Name);
Print(rep[i].ReportParameters);
//Let's receive all data from particular report
var data = rep[i].RecieveData();
}
//2) You also can get report by name
Report rep_name = Report.GetReportByName("Report name here");
//3) Or you can get it by Id
Report rep_id = Report.GetReportById(1);
}
}
}
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.