Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Create or Call Crystal Reports inside Foxpro?
Message
De
15/11/2002 02:48:24
Walter Meester
HoogkarspelPays-Bas
 
 
À
14/11/2002 17:13:01
Jane Harper
American Agrisurance
Urbandale, Iowa, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00630954
Message ID:
00723081
Vues:
24
Jane,

Thanks for the update code. Let met know if there are any problems with CR 9.0. Since I don't own a copy of CR 9.0, I could not find out which windows names the reportviewer uses internally. I guess you already know, but you can find out the exact Windows layer hierarchy by using SPY++ with this tool you can also find out which two windows (One for the Grouptree and one for the preview itself) are recieving the keypresses. You need to pass the hwnd of those two windows to the InitHook function.

Thanks and good luck,

Walter,




>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)
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform