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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Generate SSRS report to PDF file automatically

(0) ShareShare
ReportReport
Posted on by 85

I want to generate SSRS report and save the file to PDF automatically and send through mail in AX 2009.

If is possible or Not?

If is possible kindly share the related document and Link. It really helpful to me.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Service order Profile Picture
    85 on at

    System.Net.WebRequest httpRequest = null;

    System.Net.WebResponse httpResponse = null;

    System.IO.Stream stream = null;

    System.IO.FileStream FileStream = null;

    System.Byte[] buffer = new System.Byte[1024]();

    voucher voucher;

    str M_FileName ='filepath';

    int len;

    ;

    voucher ="69673_81";

    url = "url "+voucher;

    httpRequest = System.Net.WebRequest::Create(url);

    httpRequest.set_Credentials(System.Net.CredentialCache::get_DefaultNetworkCredentials());

    httpResponse = httpRequest.GetResponse();

    FileStream = new System.IO.FileStream(M_FileName, System.IO.FileMode::Create);

    stream = httpResponse.GetResponseStream();

    len = stream.Read(buffer, 0, 1024);

    while (len > 0)

    {

    FileStream.Write(buffer, 0, len);

    len = stream.Read(buffer, 0, 1024);

    }

    stream.Close();

    FileStream.Close();

  • Suggested answer
    Service order Profile Picture
    85 on at

    System.Net.WebRequest httpRequest = null;

    System.Net.WebResponse httpResponse = null;

    System.IO.Stream stream = null;

    System.IO.FileStream FileStream = null;

    System.Byte[] buffer = new System.Byte[1024]();

    voucher voucher;

    str M_FileName ='filepath';

    int len;

    ;

    voucher ="69673_81";

    url = "url "+voucher;

    httpRequest = System.Net.WebRequest::Create(url);

    httpRequest.set_Credentials(System.Net.CredentialCache::get_DefaultNetworkCredentials());

    httpResponse = httpRequest.GetResponse();

    FileStream = new System.IO.FileStream(M_FileName, System.IO.FileMode::Create);

    stream = httpResponse.GetResponseStream();

    len = stream.Read(buffer, 0, 1024);

    while (len > 0)

    {

    FileStream.Write(buffer, 0, len);

    len = stream.Read(buffer, 0, 1024);

    }

    stream.Close();

    FileStream.Close();

  • Verified answer
    Indirajith Profile Picture
    50 on at

    Its Working Fine in AX 2009..

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans