web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Approach to convert number into text (SSRS report body to footer)

(0) ShareShare
ReportReport
Posted on by 35

Hi everyone! 

I'm working on  SSRS report that is very similar to CashBook_LV.  But in my customization, I need to  display in words number of rows in report body tablix.

For now, my approach is to write DataMethod  C# code  in the SSRS report. But, I want to use my x++ classes and static methods to achieve my goal.

Because, in the near future we will migrate from ax2012 to ax7, and I need reduce  concomitant work with this.

Thanks for answers.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Oleg_Sokol Profile Picture
    35 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    I resolve this by using AIF Custom Service . Witch I call from Data Method in SSRS report.

  • Oleg_Sokol Profile Picture
    35 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    Good day JMD Technolojii!

    As I understand, this part relates to DP class? Right?

    In this part (processreport ()) you fill tmp tables. I do the same.

    Have you an example of code to call X++ logic from SSRS report?

    I found one here community.dynamics.com/.../212172 and here msdn.microsoft.com/.../bb986590(v=ax.50).aspx

    but, it doesn't look good to write your credentials into code.

  • JII SAADUDDIN Profile Picture
    1,832 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    Hi Oleg_Sokol.

    I have had my example using Classes.

    1. classDeclations.

    2. Create 2 tmptables to call for declations.

    3. processreport()

    example:

    header:

    use ssrsdataproviderbase

    ---your code here

  • Oleg_Sokol Profile Picture
    35 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    Tatian, thanks for your replay! But, using tmp table  with fields  in DP class for  this purpose is not an option. Because (if you look at report that I mention earlier) lines in the body needed to be counted in the footer on each page, and printed in words.

    So, this have to be runtime function in report.  I've done it by C# code in Data Method, but I want to use X++ Classes for this.

  • Community Member Profile Picture
    on at
    RE: Approach to convert number into text (SSRS report body to footer)

    The DataMethod that you are using here is the BI C# project that you can find in the AOT.

    If you want to use the X++ you need to work in the Classes that you created for build you report, If the report is query type, you need to add the method in the query to return what you need.

    You need to add a new field in the temporary table and add the logic in the DP class to set the value.

    After that call the field in the SSRS report

  • Oleg_Sokol Profile Picture
    35 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    I want call it from designer. In the textBox enter, for instace, "numeralsToTxt(ReportItems!CountDebitAmount.Value)".

    For this, I need to write some code into Data Methods on the report.

    just like dill function

       [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]

       public static string DrillMainAccount(string reportContext, string mainAccountValue)

       {

           return DrillThroughCommonHelper.ToMainAccount(reportContext, mainAccountValue);

       }

    But I don't know how to get x++ code from there.

  • Mahmoud Hakim Profile Picture
    17,887 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    You can call it as the following

    YourTableForReport.AstringTypeField = Global::numeralstotxt(AnyRealfield);

  • Oleg_Sokol Profile Picture
    35 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    Maybe,  I not clearly describe what I really mean.

    I need to understand how to call this method from SSRS report DataMethod()? Could you give me a hint?

  • Mahmoud Hakim Profile Picture
    17,887 on at
    RE: Approach to convert number into text (SSRS report body to footer)

    There are standard method achieve that.

    Just check global class , you can see method numeralstotxt

    This method converts number to word , just call it in your report

    msdn.microsoft.com/.../global.numeralstotxt.aspx

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
doninep Profile Picture

doninep 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans