Skip to main content

Notifications

Announcements

No record found.

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

  • soma Profile Picture
    soma 24,410 on at
    RE: Issue on calling Crystal Report through Dex 2013(GP2013R2)

    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!!!

  • saa3ya Profile Picture
    saa3ya 5 on at
    RE: Issue on calling Crystal Report through Dex 2013(GP2013R2)

    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

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: Issue on calling Crystal Report through Dex 2013(GP2013R2)

    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!!!

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans