Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Suggested answer

How to see function definition of Report Writer user defined function

Posted on by
Greetings, 
 
                        I want to see the Sql(or however result is getting produced) behind a user defined Report writer function. I have a function declared in a report for a calculated field as given below - 
 
                           RW_T_HOG_Claimed_By_Roll'( 'T_Tax_Roll_Certificate_HDR_TEMP'.'D_Roll #''T_Tax_Roll_SETUP'.'D_Taxation Year' ) 
                          
                      Due to some reason its not giving the expected output and I want to see how the result is getting calculated so i can troubleshoot it , but I am not sure how to see RW_T_HOG_Claimed_By_Roll function's definition.
                         
                         Any help will be great. Please let me know if you need further info.                       
 
                       Thanks in advance
 
  • Suggested answer
    Almas Mahfooz Profile Picture
    Almas Mahfooz 10,988 User Group Leader on at
    How to see function definition of Report Writer user defined function
    It's not necessary that sql code run behind this function, may be the code is written in dexterity.
    You can check it by running sql profiler while printing the report so it will show sql code if there is any.
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,799 Moderator on at
    How to see function definition of Report Writer user defined function
    I am not sure what product dictionary the RW_T_HOG_Claimed_By_Roll() report writer function is from.  It is not in the core Dynamics GP modules I have loaded.
     
    Anyhow, you can get the parameter list from the SDK (if it is included) or using GP Power Tools (on a system where it is installed).
     
    You probably can work out the parameters from the example call you have already.
     
    As for what it is doing, you would only be able to get an idea of the tables it accesses by using logging. With GP Power Tools we could enable logging for ONLY the period when that function is being executed. if the script makes a direct SQL call, we would be able to see that, otherwise we can see which tables it accesses, but not what it does with the data retrieved.
     
    The only way to see exactly what the code is doing is if you had access to the source code. Once we identify which product it is from, we can see if viewing the source is possible. Some Microsoft published dictionaries are included in a source code program and so it is possible to check the source code. If the function is in a custom dictionary or ISV product, you would need to discuss with the developer responsible.
     
    Good luck
     
    David

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans