hello guys,
when i run a report (System admin - record level security) in R2 (6.2.1000.4051) and print to a printer then following error occurs.
“An error occurred rendering the report. Accessing the report server URL caused an error. The remote server returned an error: (500) Internal Server Error.”
Strangely it happens when printing to printer only, report runs fine on Screen. I have tried debuggging the code but i have stuck at the point. please help me.
The following code belongs to Classes\SRSProxy\renderReportToPrinter() . I have found that due to some reason boolean variable success hold “false” value and so unable to execute method setExecutionInformation(). where in other out of the box machine success is true. not sure why it’s getting false value in Success. any guess how to find and fix it.
try
{
methodInfo = SRSProxy::getSharedProxyMethodInfo(‘PrintReportWithPageSettings’, false);
if (methodInfo != null)
{
proxyObject = reportingServicesProxy;
success = proxyObject.PrintReportWithPageSettings(reportPath,
parameterValueArray,
printerName,
overridePrintContractSettings,
deviceInfo,
numberOfCopies,
overridePaperSettings,
pageSettings);
}
else
{
success = reportingServicesProxy.PrintReport(reportPath, parameterValueArray, printerName, deviceInfo, numberOfCopies, overridePaperSettings, pageSettings);
}
if (success)
{
this.setExecutionInformation();
}
}
catch(Exception::CLRError)
{
// We must trap CLRError explicitly, to be able to retrieve the CLR exception later (using CLRInterop::getLastException() )
SRSProxy::handleClrException(Exception::Error);
}
I hope if i can find true value in Success then setExecutionInformation(); will be called and it will print the report to the printer however, Success holds false and there is no condition defined for false, might be a cause of an exception.
Please help, i’m new to AX.