Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Create or Call Crystal Reports inside Foxpro?
Message
From
14/11/2002 17:13:01
 
 
To
16/07/2002 02:11:38
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00630954
Message ID:
00722973
Views:
25
It looks like the names of the windows for Crystal Reports have changed from CR 8.5 to CR 9. Most importantly, the "ReportView" is not found. I guess that it was now "ATL:60084960". I may be mistaken, because this seems to be more of an intermittent problem in CR9. But, so far I think it works.

Here is the updated code....
Local nHwnd

Declare Integer FindWindowEx In User32.dll Integer, Integer, String, Integer

nHwnd = FindWindowEx(Thisform.hWnd, 0, 0, 0)
Activate Screen
? "Thisform"
?? Decimal2hex(nHwnd)

nHwnd = FindWindowEx(nHWnd, 0, "CrystalReports.CRViewer9.ReportAlbum"+Chr(0), 0)
*nHwnd = FindWindowEx(nHWnd, 0, "ReportAlbum"+Chr(0), 0)
Activate Screen
? "ReportAlbum"
?? Decimal2hex(nHwnd)

nHwnd = FindWindowEx(nHWnd, 0, "CrystalReports.CRViewer9.ViewHolder"+Chr(0), 0)
*nHwnd = FindWindowEx(nHWnd, 0, "ViewHolder"+Chr(0), 0)
Activate Screen
? "ViewHolder"
?? Decimal2hex(nHwnd)

Thisform.hTreeView = FindWindowEx(nHwnd, 0, "SysTreeView32"+Chr(0), 0)
Activate Screen
? "SysTreeView"
?? Decimal2hex(Thisform.hTreeView)

Thisform.hReportView = FindWindowEx(nHwnd, 0, "ATL:60084960"+Chr(0), 0)
*Thisform.hReportView = FindWindowEx(nHwnd, 0, "ReportView"+Chr(0), 0)
Activate Screen
? "ReportView"
?? Decimal2hex(Thisform.hReportView)

InitHook(Thisform.hReportView, Thisform.hWnd)
InitHook(Thisform.hTreeView, Thisform.hWnd)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform