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

  • Verified answer
    Indirajith Profile Picture
    Indirajith 50 on at
    RE: Generate SSRS report to PDF file automatically

    Its Working Fine in AX 2009..

  • Suggested answer
    Service order Profile Picture
    Service order 85 on at
    RE: Generate SSRS report to PDF file automatically

    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
    Service order 85 on at
    RE: Generate SSRS report to PDF file automatically in AX 2009

    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();

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,317 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans