Skip to main content

Notifications

Announcements

No record found.

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

Recreating Reports.dic file if with VBA

Posted on by 855

Hi,

The company I am working with right now has a report with VBA.

I need to recreate the Reports.dic and Forms.dic files, but I am unsure how to backup the form with VBA - to be sure  I can bring it back once I recreate the dic files.

Can you share your insights please?

Any advise will be highly appreciated.

Thank you!

Categories:
  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: Recreating Reports.dic file if with VBA

    Hi Jennifer & Elena,

    Going forward you should try to avoid as much as possible VBA code in GP customizations, as with Windows 2019 Microsoft doesn't support VBA anymore in GP.

    That being said, it is normal to see 2 versions of a custom report in the Customization Maintenance list, one with and one without VBA. When you export the custom reports with VBA to a .package file, the VBA code is included into the exported .package file and will be used to recreate the DYNAMICS.VBA file on a new GP client when you create a new REPORTS.DIC from scratch based on the .package file(s).

    When you don't select the export by including the VBA code, then your imported reports into the new REPORTS.DIC may not work as expected, since some of the report fields may rely on calculations that are driven by your VBA code...

    HTH.

    PS: one of the caveat of REPORTS.DIC is that it can be located in a shared folder on the network to be used by various GP clients, but the DYNAMICS.VBA cannot, and therefore it needs to be put in the local program folder of GP. This makes managing customizations with VBA code sometimes challenging. 

  • Suggested answer
    DexDev Profile Picture
    DexDev 100 on at
    RE: Recreating Reports.dic file if with VBA

    It seems that reports dictionary is duplicating. Try to remove all the modifications and just print gp  original reports first. If this go well then do report modifications manually and then import only vba files.

    Jennifer5, Also I would suggest you to get rid of vba customization. Keep all the modification on one place, recreate all the modification with dexterity where vba is required.

    For any paid assistance you can also contact me.

  • Jennifer5 Profile Picture
    Jennifer5 5 on at
    RE: Recreating Reports.dic file if with VBA

    Hello, GP2018R2 (18.00.0704) generates a modified report twice (screenshot below), one with and one without VBA after adding the report to Visual Basic from Report Writer.  

    To recreate, I open Report Writer, choose a report, click “Insert”, then select it and click “Open”, “Layout”, then Tools/Add Report to Visual Basic.  Then I close Report Writer and GP, save the VBA changes at the dialog, relaunch and the report displays twice under Customization Maintenance.  I have deleted all .vba files, deleted the REPORTS.DIC, and logged in as an Administrator.  This happens with any reports dictionary I try (GP, HR, PA), and it happens on my local install as well as a client install on a server in another domain.  It also happens if I upgrade a reports dictionary with VBA from GP2015, or import it from Customization Maintenance or from Report Writer.

    Liteblue

  • Suggested answer
    Romryan Profile Picture
    Romryan on at
    RE: Recreating Reports.dic file if with VBA

    Do you have a computer where the report is being printed perfectly?. If so Go to Tools>>Customise>>Customization Maintenance.

    Select/highlight the report from the Customisation Maintenance window. Click export button on the top and save them in one of your preferred directory.

    On the new machine, follow the the same process but this time round, click import and select your package from the directory you saved the exported package.

  • Robert Yao Profile Picture
    Robert Yao 492 on at
    RE: Recreating Reports.dic file if with VBA

    Try export the package from the old and import to the new place, copy any dll files from addins as well if those dll files related to the VBA code.

    Hope it helps,

    Rob

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