Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
Auteur : Pick
Crystal Report est livré avec un kit d'installation à la sauce microsoft.
Cependant, il est possible de le faire soi-meme...
Voici les étapes à suivre , attention, uniquement valable pour la version 10 de crystal report viewer :
1 - recuperer les DLL suivants via un fichier .BAT (c'est plus simple) :
Echo off SET CR10_WINDIR=%windir% SET CR10_PFILES=C:\Program Files SET CR10_PCS=C:\INSTALL_AUX ECHO Create directory md "%CR10_PCS%\TO_COMMONFILES" md "%CR10_PCS%\TO_COMMONFILES\2Register" md "%CR10_PCS%\TO_SYSTEM" eCHO COPY FILES copy "%CR10_WINDIR%\SYSTEM32\msvcrt.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\riched20.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\usp10.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\dbghelp.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\cxlib-1-6.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\cxlibw-1-6.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\cxlibw7-1-6.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\msvcp70.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_WINDIR%\SYSTEM32\msvcr70.dll" "%CR10_PCS%\TO_SYSTEM" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\craxdrt.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\craxdrt_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\craxdrt.dep" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\crystalreportviewers10\ActiveXControls\crviewer.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crtowords_fr.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ufmanager.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\sscsdk80.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\sscsdk80_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\CRAnalyzer.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\sscdlg.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\Implode.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crqe.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crqe_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\querybuilder.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\querybuilder_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\exlate32.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crheapalloc.dll" "%CR10_PCS%\TO_COMMONFILES" echo Export dlls copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crxf_pdf.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crxf_pdf_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crxf_xls.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crxf_xls_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2ftext.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2ddisk.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ExportModeller.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crtslv.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\gdiplus.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ReportRenderer.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\pageObjectModel.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\webReporting.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" echo Keycode dll copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\keycode.dll" "%CR10_PCS%\TO_COMMONFILES\2Register" echo Deploy registry file copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crdeploy.reg" "%CR10_PCS%" echo ufmanager.dll copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2l2000.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2lcom.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2ldts.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2lexch.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u2lfinra.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u252000.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u25dts.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\u25samp1.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crdb_p2ssyb10.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crdb_p2s_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES" copy "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crdb_pc_res_fr.dll" "%CR10_PCS%\TO_COMMONFILES"
2 - une fois tout ceci récupéré, il suffit alors de lancer ce bout de code depuis un autre fichier .BAT
Attention, verifiez tout de meme que vous avez bien les droits de creation et de copie sur les repértoires systemes :
Echo off SET CR10_WINDIR=%windir% SET CR10_PFILES=C:\Program Files SET CR10_PCS=C:\INSTALL_AUX ECHO Create directory md "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\" eCHO COPY FILES copy "%CR10_PCS%\TO_COMMONFILES\*.*" "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\*.*" copy "%CR10_PCS%\TO_COMMONFILES\2Register\*.*" "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\*.*" echo COPY FILES - Dependency Files for Craxdrt.dll copy "%CR10_PCS%\TO_SYSTEM\msvcrt.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\riched20.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\usp10.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\dbghelp.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\cxlib-1-6.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\cxlibw-1-6.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\cxlibw7-1-6.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\msvcp70.dll" "%CR10_WINDIR%\system32" copy "%CR10_PCS%\TO_SYSTEM\msvcr70.dll" "%CR10_WINDIR%\system32" Echo Runtime engine regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\Crqe.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\craxdrt.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crviewer.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\keycode.dll" echo Export formats regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ReportRenderer.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\pageObjectModel.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\webReporting.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ExportModeller.dll" regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crtslv.dll" echo Charts regsvr32.exe /S "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\CRAnalyzer.dll" REGEDIT /S "%CR10_PCS%\crdeploy.reg"
3 - Voila, c'est fini ! C'était simple non ?
bon, j'ai mis pas mal de temps pour trouver toute la liste des dll...Certes, il y a une documentation, lorsque vous installer le kit crystal report...mais, il se trouve que certains fichiers ne sont pas mentionnés...
Attention, lorsque vous installez crystal report, la dll de la base de données sybase n'y est pas par defaut ! ainsi que d'autres dlls d'ailleurs !
Prochaine Etape --> Un objet autonome powerbuilder SDK Crystal Report
A suivre...
Hors ligne
voici l'objet SDK Powerbuilder Crystal report ! (version 10)
http://pbadonf.fr/sam1/gescom_crystal_report.pbl
Branchement de l'objet :
juste ce bout de script à mettre.
Dans cet exemple, il s'agit d'un rapport qui demande 2 criteres...
donc à vous d'adapter...
sinon, les criteres doivent tous etre des VARCHAR.
/**********************************************************************************************/ /* Nom : clicked cb_edition */ /* But : */ /* Arguments: */ /* Appel : */ /* Remarques: */ /* Histo : SKA - avril 2006 */ /**********************************************************************************************/ // visualisation d'un rapport crystal via l'objet pb ole // methode d'appel pour lancer la vue s_crystal_report lstr_crystal string ls_parametre[] string ls_fichier string ls_titre long ll_idclient long ll_idproposition long ll_row string ls_idclient string ls_idproposition ll_row = dw_maitre.getrow() if ll_row > 0 then ll_idclient = dw_maitre.getitemnumber(ll_row,'id_cpt_cli') ll_idproposition = dw_maitre.getitemnumber(ll_row,'id_proposition') ls_idclient = string(ll_idclient) ls_idproposition = string(ll_idproposition) if isnull(ls_idclient) then ls_idclient = '' if isnull(ls_idproposition) then ls_idproposition = '' ls_parametre[1] = ls_idclient ls_parametre[2] = ls_idproposition ls_titre = 'DEVIS BETON' ls_fichier = guo_app.is_path + "\etat_devis_beton.rpt" lstr_crystal.as_titre = ls_titre lstr_crystal.as_value = ls_parametre lstr_crystal.as_fichier_rpt = ls_fichier openwithparm(w_olecrystal_resp,lstr_crystal) end if
Hors ligne
Un patch est sorti pour la version 10 de crystal report
il s'agit du patch ID:35982220
Description du probleme existant :
La methode VerifyDatabase contenue dans la bibliothèque Run Time du Crystal Reports Active X Designer entrainait l'affichage systématique de la boite de dialogue "La base de données est à jour"
Nouveau comportement :
Cette boite de dialogue a été supprimée.
Bonne nouvelle que voila ! (merci jdobosz pour l'info)
Hors ligne
mise à jour de la version sdk
correction faite par jdbozc pour la verification des differentes versions de adobe acrobat...
Hors ligne
Voici la procédure de désintallation du kit Rdc Crystal Report, après quelques jours de recherches...
La procédure supprime les centaines de clé du registre, puis les fichiers dll et dep.
Attention, cette procédure ne fonctionne que dans le cas ou il y a uniquement le kit Rdc Crystal Report installé sur le poste utilisateur !
tout d'abord, sur un fichier .BAT :
Echo off REM enleve du registre le kit Rdc Crystal Report 10 REM SKA octobre 2006 SET CR10_PFILES=C:\Program Files Echo Runtime engine regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\Crqe.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\craxdrt.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crviewer.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\keycode.dll" if ERRORLEVEL 1 goto ERR2 echo Export formats regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ReportRenderer.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\pageObjectModel.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\webReporting.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\ExportModeller.dll" if ERRORLEVEL 1 goto ERR2 regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\crtslv.dll" if ERRORLEVEL 1 goto ERR2 echo Charts regsvr32.exe /u /s "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\CRAnalyzer.dll" if ERRORLEVEL 1 goto ERR2 del "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\*.dll" del "%CR10_PFILES%\Fichiers communs\Crystal Decisions\2.5\bin\*.dep" exit 0 :ERR2 echo ***desInstallation du KIT Crystal Report***>>C:\crys_dserr.log echo Impossible de supprimer du registre>>C:\crys_dserr.log exit 2
puis, lancer le fichier .reg pour enlever les résidus...
REGEDIT4 [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\Crystal_RDC] [-HKEY_CLASSES_ROOT\CLSID\{A1B8A30B-8AAA-4A3E-8869-1DA509E8A011}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.0]
Hors ligne
je tiens à preciser ceci...
ce module ne fonctionne que pour les criteres de recherches de type String !
Si vous avez dans vos criteres de recherches du ENTIER, NUMERIQUE, ou DATE
Faites le passer en VARCHAR, et dans votre procédure stockée, il ne vous reste plus qu'à reconvertir tout cela...
Attention, j'ai rencontré recemment un bug... cela est du entre la communication du SDK Crystal Report et l'interface SQL.
Dans ma procédure stockée, j'utilise un somme de 2 Chars, ainsi qu'un convert de datetime...
En lancant la procédure stockée depuis CAST ou autres, cela fonctionne parfaitement.
En lancant depuis Crystal Report, cela fonctionne aussi...
Par contre, en lancant depuis le SDK PB, il ne reconnait pas la conversion !!! Comme si le SDK cherchait à traduire toute cette mixture... Completement ahurissant ce truc !
Alors Faites attention lorsque ca plante...
Hors ligne