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)

AX2012 Exporting SSRS report with aggregation to PDF format

(0) ShareShare
ReportReport
Posted on by 11,279

Hi all,

I have a SSRS report. I have used aggregate function (RunningValue() and Previous()) such that I get following behavior in report viewer:
[Page 1 Start Report viewer]----------------------------------------------------

                                                                          Debit         Credit           Balance
Main account 110110       [carry over]                                                          100        
                                                                      (100 is the initial balance of 110110)
3/15/2012                                                                                 10                   90
3/16/2012                                                               20                                    110
3/18/2012                                                                                100                  10
3/19/2012                                                               10                                      20
3/20/2012                                                                                  10                   10 
Main account 110110       [Carry over]                  30              120                   10
                                                         (sum debit/credit, show last value of balance) 

[Page 1 End Report viewer]----------------------------------------------------

[Page 2 Start Report viewer]----------------------------------------------------
                                                                          Debit         Credit           Balance
Main account 110110       [carry over]                                                           10
3/21/2012                                                               30                                     40
3/22/2012                                                               40                                     80
3/23/2012                                                                 5                                     85
Main account 110110        [Continue]                     75                                     85
[Page 2 End Report viewer]----------------------------------------------------

Everything looks good on the report viewer. However, when I try to export the report to PDF, things took a bad turn.

[Page 1 Start PDF]----------------------------------------------------
                                                                          Debit         Credit           Balance
Main account 110110       [carry over]                                                          100
3/15/2012                                                                                 10                   90
3/16/2012                                                               20                                    110
3/18/2012                                                                                100                  10
3/19/2012                                                               10                                      20
Main account 110110        [Continue]                      60            120                 40       
          (The aggregates seems to went down all the way to the 3/22 transaction)
[Page 1 End PDF]----------------------------------------------------

[Page 2 Start PDF]----------------------------------------------------
                                                                          Debit         Credit           Balance
Main account 110110       [carry over]                                                          100       
                              (Here, it showed the initial carry over value of the first page)

3/20/2012                                                                                  10                   10 

3/21/2012                                                               30                                     40
3/22/2012                                                               40                                     80
3/23/2012                                                                 5                                     85
Main account 110110        [Continue]                    60             120                   40       
                                                  (Here, it showed the aggregated of the first page)

[Page 2 End PDF]----------------------------------------------------

In fact, when I export to MHTML it has similar issues. I looked around the web and am a little bit surprised that I couldn't find any similar incidents. Nor can I find any resources claiming that this is a limitation of the report rendering engine. 

Have anyone seen this before? 

*This post is locked for comments

I have the same question (0)
  • Dick Wenning Profile Picture
    8,705 Moderator on at

    is the format of the output, selected in the output dialog of the report, before running the report, or do you export the output from SSRS when the report has been run?

  • dolee Profile Picture
    11,279 on at

    It was output to screen then export to PDF from the report viewer.

    EDIT: and tried direct the output to PDF file in the output dialog. Get the same result.

  • dolee Profile Picture
    11,279 on at

    Hi all,

    I found out what's wrong now. The aggregate functions themselves were actually ok. The problem is on the design of my report.

    The requirement is to show the running total / last balance at the top and bottom of each page, my current design is to use table header/footer to show the running total / balance. I have added hidden textbox in the tablix to calculate the aggregates, then the header/footer refer to those text boxes to get the value.

    This "get a value from a textbox in detail rows @ header/footer" strategy worked in the report viewer but doesn't work when export to pdf.

    Looks like I have to re-think how I'm gonna do it.

    P.S. Thanks Dick for the reply. Hope you didn't waste too much time on this. =]

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