Hi there
I need to save a report as PDF on server tier, but the caller was original a client object. However, the report is always saved on client machine - not on server.
All involved objects are hosted on server. I have no clue why how to force the report object to be runned on server.
Here's my example code:
static server void y()
{
fileName f = @"c:\Temp\y.pdf";
FileIOPermission fileIOPermission = new FileIOPermission(f, 'w');
Args args = new Args(reportstr(report1));
ReportRun y = Classfactory.reportRunClass(args);
PrintJobSettings printJobSettings = SysPrintOptions::newPrintJobSettingsOnServer();
;
printJobSettings.setTarget(PrintMedium::File);
printJobSettings.fileName(f);
y.printJobSettings(printJobSettings.packPrintJobSettings());
y.report().interactive(false);
y.query().interactive(false);
y.run(); // --> goes to client instead stays on server
}