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)

Aggregate string fields in a report dataset into a single textbox

(0) ShareShare
ReportReport
Posted on by

Hi my fellows!

My problem is that I want to represent a FormTreeControl's data in an SSRS report.

I generate the tree's lines with special table characters like this:

─┬11110100
 ├─┬ 11110100
 │ └─┬ 11110100
 │   └─ 11110100
 ├─┬ 11110100
 │ └─ 11110100

I store the lines in a regular table line by line.

In the report the line by line display is not solvable for me, because there is a little gap in the top of the cells, and it foul up the continous appearance of the tree. So I imagined that I aggregate the lines into a single global variable, and display it in a textbox.

I created a Row Group to a Tablix, and used the RunningValue method to reach the single lines one by one in the table. I wrote 2 data methods for concatenation and display:

public partial class InventTrackingReport_INS
{
    public static string Lines = "";

    [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
    public static int ConcatenateLines(string line, int LineNum)
    {
        if (Lines.Length > 0)
            Lines += "\n";
        Lines += line;
        return LineNum;
    }

    [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
    public static string GetLines()
    {
        return Lines;
    }
}

I call the first in tablix aggrgation like this:

=RunningValue(ConcatenateLines(Fields!Line.Value, Fields!LineNum.Value), Sum, "InventTrackingDetails")


And I call the second one in the textbox, in which I want to display the result.

The solution is works fine at the first time, but after second run, the report shows all previous results, that it creates in previous runs. I see all previously generated trees before the new tree in the report, despite the table stores the correct data. I tried everything... query, DP class, Tmp table, regular table, but the result is the same. I think that is a weird cache problem or something like this.

*This post is locked for comments

I have the same question (0)

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans