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 :
Finance | Project Operations, Human Resources, ...
Answered

How to capture results of a Report Writer report?

(1) ShareShare
ReportReport
Posted on by 379
Hey Everyone:
 
I'm kind of glancing in the direction of David Musgrave on this one, but anyone who knows an answer to this - please feel free.
 
I have a client that is using VBA customziations right now; obviously, these need to go away soon.  The customziations intercept a Report Writer report (there's more than one, but I'll pick an example,) let's say, GL Trial Balance.  The VBA intercepts the report, opens an Excel file, and iteratively goes through the report fields and writes them to Excel.  Note: I did not write this customization, I've inherited it.  Skipping over the fact that it doesn't work 100% of the time, what I need to know is how to do something like this in Dexterity?  I've tried an approach (in the links section below) where I've grabbed the inputs to (what appears to be) the TEMP table that the report uses, but this only gives me a short view on the first report that I've worked with.  (i.e. I only get the "top table" of the report spec, not the data that it compiled.)
 
Now, I don't want to entirely recreate the wheel, meaning I don't want to have to do all of the sub-calls that RW would make to compile its own data, not to mention that my approach wouldn't capture calculated fields that are on the face the report...  (Which I thought of as I wrote this.)
 
My questions: 1) is what I'm proposing even possible?  i.e. replacing the VBA output of an RW report using Dexterity?  And if so, 2) how (loosely) would one go about doing it?  
 
Thank you!
-J
 
Sources:
Categories:
I have the same question (0)
  • Joseph Markovich Profile Picture
    3,976 on at
    Hi James-
     
    I have lots of thoughts.
     
    Could you use an Excel report connected to GP? What about some SSRS reports on a schedule that export to Excel? Or using SSRS and exporting to Excel?
     
    Am just trying to think of out-of-the-box solutions that won't break.
     
    Joe
  • James McCullough Profile Picture
    379 on at
    Hey Joe:
     
    Thanks for the ideas, however in this particular case the client is ... exact ... in their desire to have exported RW reports.  I've supplied them with some replacements to various ones inside Dynamics GP using SSRS (seeRMHATBWrapper for example) but some of them are modificed reports that they've modified with calculated fields.
     
    I'll look into the possibility of an Excel Report - I don't use them much myself, but perhaps that'll get me part way there.  Still wondering if it's possible to get at the RW results via Dexterity, though.
     
    Thanks.
    -J
     
  • Verified answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at
    Hi James
     
    I would use a different method of getting to the temporary table with Dexterity. You can use a method to capture the reference to the table buffer with either Dexterity or GP Power Tools which then gives you full access to the temporary table. You can use this table reference to both read AND UPDATE the contents of the table. 
     
    Once you have the main table, linking to other tables and replicating any calculated fields is just a matter of coding.
     
    Dexterity does not provide a "supported" method to get to the fields on a report other than sending data to RW functions (Dexterity and GPPT), which requires lots of calls or custom RW functions with lots of parameters (Dexterity only).
     
    You could also output the report to a text file and then read the text file and process the data in it. This would need to either output the report as a single line report, or require code to read a formatted report and know how to skip past headers and footers etc. (I have written that once before in an importing tool I created back in my days with Sequel Technology).
     
    There are some undocumented methods which are used for the report template functionality, but I have never tried to use it. There are call back scripts which get called each time a report writer section is generated. This is something that might be possible to tie into, but would need investigation.
     
    Hope this helps
     
    Kind regards

    David
     
     
  • James McCullough Profile Picture
    379 on at
    Hey David:
     
    Much obliged on the answer, thank you.  I was afraid of the answer that you have, which is there's no real way to do what I was hoping for...
     
    "There are call back scripts which get called each time a report writer section is generated."  - am I correct in assuming that you're referring to running a log and finding these, then trying to hook onto them?  If so, I'm running into issues where I can't really tell what the parameter prototypes are for some of the functions / procedures, so when I try to hook, it fails...  If you have ideas on how to get around that I'm all ears, though!
     
    Thank you again for the answer, sir.
     
    -J
     

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans