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