web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SSRS report to PDF error

(0) ShareShare
ReportReport
Posted on by 717

HI,

I get below error when I try to save a SSRS report as a file in AX365 on a click with the below code.

Please help me out!!

[FormControlEventHandler(formControlStr(InventQualityOrderTable, ExportToPdf), FormControlEventType::Clicked)]
public static void ExportToPdf_OnClicked(FormControl sender, FormControlEventArgs e)
{
FormRun fr = sender.formRun();
FormDataSource fds = fr.dataSource(formDataSourceStr(InventQualityOrderTable, InventQualityOrderTable));
InventQualityOrderTable inventQualityOrderTable = fds.cursor();
SrsReportRunController controller = new SrsReportRunController();
SRSPrintDestinationSettings srsPrintDestinationSettings;
Args args = new Args();

args.record(inventQualityOrderTable);

controller.parmReportName(ssrsReportStr(XX_InventQualityOrder,QualityOrder));
controller.parmArgs(args);

srsPrintDestinationSettings = controller.parmReportContract().parmPrintSettings();
srsPrintDestinationSettings.printMediumType(SRSPrintMediumType::File);

srsPrintDestinationSettings.fileFormat(SRSReportFileFormat::PDF);
srsPrintDestinationSettings.overwriteFile(true);
srsPrintDestinationSettings.fileName(@"C:\InventQualityOrder.pdf");

controller.parmShowDialog(false);

controller.startOperation();

}

Unable to connect to the remote server at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Table.CloudTable.Exists(Boolean primaryOnly, TableRequestOptions requestOptions, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Table.CloudTable.CreateIfNotExists(TableRequestOptions requestOptions, OperationContext operationContext) at Microsoft.DynamicsOnline.Infrastructure.Components.TableAccessor.TableStorageAccessor.PerformOperation(CloudStorageAccount storageAccount, String tableName, Func`1 operation) at Microsoft.DynamicsOnline.Infrastructure.Components.TableAccessor.TableStorageAccessor.AddRecord[T](CloudStorageAccount storageAccount, String tableName, T record) at Microsoft.DynamicsOnline.Infrastructure.Components.SharedServiceUnitStorage.SharedServiceUnitStorage.UploadData(SharedServiceUnitStorageData data, Stream stream) at Dynamics.AX.Application.SRSFileUploadTempStorageStrategy.completeUpload(Boolean _blobAlreadyExists, String _uniqueFileName, String _originalFilename, String _fileId, Stream _stream, String _contentType, Boolean @_contentType_IsDefaultSet) in xppSource://Source/ApplicationFoundation\AxClass_SRSFileUploadTempStorageStrategy.xpp:line 177

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    Hi Pradeep Prakash,

    If you use dev VM check that Azure Storage Emulator is running.

  • Pradeep_Prakash Profile Picture
    717 on at

    Thanks Ievgen.

    What should be my approach for an Azure hosted machine? 

    Regards,

    Pradeep

  • Mea_ Profile Picture
    60,286 on at

    You don't need to an approach, it should just work. Do you have same issue with Tier 1 or Tier 2 VM ?

  • Pradeep_Prakash Profile Picture
    717 on at

    Hi,

    It works fine in my machine since I’m running azure emulator.

    If I try to do the same operation on an azure hosted machine connected from a different laptop where my azure emulator is not running.

    I would get an error right? How should I handle in this case?

    Regards,

    Pradeep

  • Mea_ Profile Picture
    60,286 on at

    Simplest way to find this out is to try, but it has nothing to do with your laptop it uses Azure Emulator installed on the VM and it does not matter where you are connecting from.

  • Pradeep_Prakash Profile Picture
    717 on at

    Thanks Ievgen. Now I understand.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans