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)

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

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