0

I need to connect a report file to a AX application made in Visual Studio. I tried to code it, but I get mostly token errors or my button doesn't respond.

Edit.

I need to connect a report file from Microsoft Report Builder into a form in Dynamics 365. I need to be able to run this report file from a form with a onclick button everything is running in a cloud. I'm new into this and I try to find a solution. I tried to find a answer in microsoft docs and other sites but nothing really did help me, most propably i just don't know how to use this.

Edit2

IM using Microsoft Report Builder and after i create a report i export it into a pdf or excel file. Now i need to run it with 365FO. For it i created a project in visual studio, made a form with a menu and a button that should somehow run it. But still i don't even know where should i store this file to use it.

using System;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.ComponentModel;

class Class1
{
    
    [FormControlEventHandler(formControlStr(Przyjecia, FormButtonControl1), FormControlEventType::Clicked)]
    public static void FormButtonControl1_OnClicked(FormControl sender, FormControlEventArgs e)
    {
        System.Diagnostics.Process proc = new System.Diagnostics.Process();
        proc.EnableRaisingEvents = false;
        proc.StartInfo.FileName = "c:\\rev.pdf";
        proc.Start();
    }

}
Community
  • 1
  • 1
Tweene
  • 257
  • 4
  • 16
  • Could you [edit] your question and tell us a bit more about what you are trying to accomplish and what error messages you encounter? Your code looks like it might be actually [tag:x++] code for [tag:dynamics-365-operations]. If that is correct, consider adding those tags to your question to get additional eyes on it. From what I understand from the documentation of `System.Diagnostics.Process`, it seems you want to open a pdf file. If that is correct, consider that D365 is running in the cloud. Usually, you will not have local pdf files or an installed pdf application. – FH-Inway Dec 25 '19 at 10:28
  • Thanks for the update. Could you make sure that you are using Microsoft Report Builder (which would be unlikely für D365FO reports) and not an integrated SSRS report? If it is actually is Microsoft Report Builder, please [edit] into your question how it is used and how the .pdf files are stored. If it is an integrated SSRS report, you might not be aware that those are already viewed as .pdf documents (a fairly recent change, take a look at [Preview PDF documents with an embedded viewer](https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/preview-pdf-documents)). – FH-Inway Dec 26 '19 at 20:08
  • 1
    Looks to me like your requirement could be covered out of the box by document attachments. Take a look at the [documentation of that feature](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/organization-administration/configure-document-management). – FH-Inway Dec 30 '19 at 09:37

0 Answers0