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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Issue on calling Crystal Report through Dex 2013(GP2013R2)

(0) ShareShare
ReportReport
Posted on by 515

Hi Guys,

I have Dex coding for running Crystal Report. But it through error like,

I have coded in Dex 12.0 and GP2013 R2.

I have added the Library for the COM object.

I have installed SAP 2013 Run time, SAP 2013 Designer, SAP 2013 Viewer with .Net frame work.

Which DLL of Crystal Report to be added in Library of Dex 12.0? And how to resolve the issue? and i have also added my coding.

local long result;
local long session_ID;
local string data_source, user_ID;
local integer status;
local string sortby;
local reference myTable;
local reference myTables;
local reference Report, crxApplication,cpars,cpar;
local reference crviewer;

local reference CRSections, CRSec;
local reference CRReportObjects, CRSubreportObject;

local long x,iTableCount,i;
local string DSN,sUser,sDatabase,sPassword;
local string fromDateString,ToDateString;
local string Path,Date1,Date2;


local string FormName, OptionsID;


if empty('Checkbook ID') = false then


status = Login_GetInfo(data_source, user_ID, session_ID);

clear field Report, crxApplication, crviewer, myTable, myTables,cpar,cpars;
set crviewer to null;

{Path = Path_MakeNative("C:\Program Files\Microsoft Dynamics\GP\Vendor10.rpt");}
status = Login_GetInfo(data_source, user_ID, session_ID);

DSN =data_source;
sDatabase = 'Intercompany ID' of globals;

if 'Password Unencrypted' of globals then
sPassword = Utility_DecodeString(SQLPassword of globals);
else
sPassword = SQLPassword of globals; {sPassword will be the password on the SQL server in whatever form}
end if;
sUser = user_ID;
try
    {create the Crystal Report object}
    crxApplication = COM_CreateObject("CrystalRuntime.Application");
    Report = COM_CreateObject("CrystalRuntime.Report");
    Report = crxApplication.OpenReport("D:\Crystal Report Upgrade\Dex Sourcecode\SQL\Crystal Reports10\Bank Transfer Letter_Posted.rpt", 1);
    Report.DiscardSavedData();

    
    
    iTableCount = Report.Database.Tables.Count;
    myTables = Report.Database.Tables;

    for i = 1 to iTableCount do
    myTable = myTables.Item[i];
    myTable.SetLogOnInfo (DSN, sDatabase, "dynrep","");
    {and set the location to current company}
    myTable.Location = sDatabase + ".dbo." + myTable.Name;
    end for;

    crviewer = COM_CreateObject("ReportView.CRView");
    set crxApplication to null;
    crviewer.ShowForm(Report,"Bank Transfer Letter");
    else
        warning str(crxApplication);
    throw;
end try;
end if;



Thanks for advance.

Sathiya

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    soma Profile Picture
    24,410 on at

    Have a look on the below link and download the Dexterity Sample Application and verify your coding with the comcrystal.zip samples.

    www.microsoft.com/.../details.aspx

    Hope this helps!!!

  • saa3ya Profile Picture
    5 on at

    Thanks a lot Soma..

    But it doesn't helped me out to resolve my issue. Is there any other solution you have..

    Thanks and regards,

    Sathiya

  • soma Profile Picture
    24,410 on at

    Have you checked the coding from Extract.dic file which contain under the comcrystal.zip samples? From this extracted dictionary you can find all the references and coding for running crystal report within dexterity.

    Hope this helps!!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans