Topic by Apolinar Valdez
Content
Hi!!
I need to run a report from C #.
I'm running a report with a filter, doing it from the agent that asks me to put information in the filter
If I put an incident number the report is executed and in case there is an incident it gives me only one record
But if I do not add anything, the report returns 649 records
The code I use is the following:
AnalyticsReportFilter filter = new AnalyticsReportFilter();
filter.Name = "num de ref";
String hardcodedRefNo;
hardcodedRefNo = "171128-000000";
filter.Values = new String[] { hardcodedRefNo };
//Apply the filter to the AnalyticsReport object
analyticsReport.Filters = (new AnalyticsReportFilter[] { filter });
ClientInfoHeader clientInfoHeader = new ClientInfoHeader();
clientInfoHeader.AppID = "Prueba Juan";
for (int start = 0, limit = 10000; ; start = start + limit)
{
CSVTableSet thisset = new CSVTableSet();
byte[] rawResult = null;
thisset = _service.RunAnalyticsReport(clientInfoHeader, analyticsReport, limit, start, ",", false, true, out rawResult);
but this does not seem to work, since it returns 649 records, when I just wait for a record.
I guess I'm doing something wrong, I do not know if I'm going the right way.
Can you help me please!!
Greetings.