We are looking for a way to forward a partial (filtered) table through mail as a CSV attachment or worst case the complete table. We know that through GQI (in dashboards) this is possible, but this requires us to migrate towards Elastic which is currently not yet planned. We already have a custom report that is triggered through automation, but we are missing the option to specify the 'report-format'.
Do you know a way to forward a table as a CSV attachment through mail without elastic?
Or, if you can specify the 'report-format' when triggering the report from automation?
Code used from automation:
// prepare a report with the "Daily Report" template
MailReportOptions reportOptions = engine.PrepareMailReport("Daily Report");// set up the email to go to example@example.org
EmailOptions options = new EmailOptions()
{
SendAsPlainText = false,
Title = "Test",
Message = spReportOptions.Value,
TO = "example@example.org"
};
reportOptions.SetMailOptions(options);// send the configured report
engine.SendReport(reportOptions);
Regarding GQI in the new Dashboards app, Elastic is actually not required for regular parameter tables. Only some advanced data sources in GQI require Elastic.
For the legacy Reporter, in a custom report you can get the table data and write it as a csv file to the mail output folder (strOutputdir):
var strOutputFile = strOutputDir + "\\reportcsv.csv";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var textfile = fso.CreateTextFile(strOutputFile, true);
textfile.Write(csv);
textfile.Close();
All files in strOutputDir will get added as an attachment to the email.