Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Filter TempDB Dataset in AX

Posted on by 75

Hello,

i am creating a transaction report in which the transaction are filtered by a country. Naturally, it is possible to use group by but the requirement design is separated in different tablix.
i am currently failed trying to use a table as 2 datasets where resulted in 1 dataset has records where the other is blank

ShipmentPlanSumReportTmp       tmpID, tmpTH;

[SRSReportDataSetAttribute("ShipmentPlanSumReportTmp_ID")]

public ShipmentPlanSumReportTmp getIDTmp()

{

     select tmpID;

     return tmpID;

}

[SRSReportDataSetAttribute("ShipmentPlanSumReportTmp_TH")]

public ShipmentPlanSumReportTmp getTHTmp()

{

     select tmpTH;

     return tmpTH;

}

i have also tried to use 1 table and add where condition inside these getTHTmp and getIDTmp method, but also have different results

is it still possible to separate the data inside the getTmp() method or i should just created multiple tables according to the tablix needed?

Daniel Antineus

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Filter TempDB Dataset in AX

    Hi Daniel,

    I don't see how you can do this using a single dataset. More importantly, with this requirement, you will need to add an additional tablix every time you have fata of a new country in your report.

  • Antineus Daniel Profile Picture
    Antineus Daniel 75 on at
    RE: Filter TempDB Dataset in AX

    Hi Gunjan,

    unfortunately the report would like to have the data splitted by the country side by side(ID in the left, and TH in the right). So grouping the data / put another tablix in another line would not be accepted

    Daniel Antineus

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Filter TempDB Dataset in AX

    Hi Daniel,

    Why are you looking to add multiple tablix controls in the report in that case? If you could have multiple country region Ids, you could group by this field in the tablix and start each country region data on a new page.

    Will that not work for you?

  • Suggested answer
    Antineus Daniel Profile Picture
    Antineus Daniel 75 on at
    RE: Filter TempDB Dataset in AX

    Hi Gunjan, using that method would resulted in 1 Dataset with filtered records

    while another dataset with empty records although both of the dataset should have the records

    I am currently using 2 datasets (tmp_ID, and tmp_TH) at the moment

    but this approach should be avoided as i need to add more datasets when there are more countries to be displayed

    I would also like to ask whether this report design can be changed

    Daniel Antineus

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Filter TempDB Dataset in AX

    Hi Daniel,

    Might be easier with two datasets in RDP in that case. I was thinking about filtering in the report design. Using the code like you have posted, are you able to filter the data as per your requirement?

  • Antineus Daniel Profile Picture
    Antineus Daniel 75 on at
    RE: Filter TempDB Dataset in AX

    Hi Gunjan,

    Yes, i tried to create 2 tablix for each country(ID, and TH) with the same tablix design(only one tablix will select ID transaction and the other is for TH).

    The tablix i am currenty using only have 3 fields (country, customer, shipping date).

    I am trying to split the data in the RDP class because i do not want to hardcode the country as the query filter in report datasets.

    Daniel Antineus

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Filter TempDB Dataset in AX

    Hi Daniel,

    Could you please elaborate on how you are using two tablix controls and how you are trying to filter the data in them? Are you looking to show transactions for each country in a different tablix?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans