Installation ReportBuilder

Discussion forum about all things Report Builder (all versions).
EwaldP
Austria
Posts: 351
Joined: 07 Mar 2017, 08:00
Location: Austria

Installation ReportBuilder

Post by EwaldP » 15 Mar 2016, 15:20

We deploy our application by our own setup routine. In this setup routine included are the TD runtime files (included the olexlsf.dll for export from grid to xls-file). All files are installed in our application directory.

In a different directory we install the ReportBuilder. Because only one user should have access to the ReportBuilder all other users have no rights to this directory. Then it comes to a strange behaviour. This users can't get export data with SalGridDataExport from our application. Process Monitor shows that SalGridDataExport wants to access the olexlsf.dll in the ReportBuilder directory even the olexlsf.dll is installed in the application directory? ReportBuilder installation directory is not in the path and I didn't find any obvious registry entry?

I fixed the problem as I copied the file in a directory where all users have access and registered the file with regsrv32. Now everything works.

Is there any reason for this strange behaviour? It only costs time to look for and fix this problem, has no benefit and the customer is dissatisfied.
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Gueni
Austria
Posts: 25
Joined: 22 Aug 2017, 14:22
Location: Klagenfurt am Wörthersee, Austria

Re: Installation ReportBuilder

Post by Gueni » 24 May 2016, 07:17

I have a similar subject with the SalGridDataExportEx. It works fine in the development environment. In the production area with all .dll's in the application Directory, I get no records exported.
Any News on this one from Gupta?

Thanks for any hint.
Guenter

User avatar
markus.essmayr
Austria
Posts: 892
Joined: 06 Mar 2017, 06:07
Location: Austria

Re: Installation ReportBuilder

Post by markus.essmayr » 24 May 2016, 11:35

Hi,

in our application, we use direct Access to the current user's registry to "Register" olexlsf.dll without specifying the concrete load path.
This should look in the application's Directory first. But agreed, this is Kind of a hack.

Here are some pieces of code sou you can get an idea of what we do.

Code #1: Setting the required registry values.

Code: Select all

!!CB!! 129
! HKEY_CURRENT_USER\Software\Classes\olexlsf.XLSFileObject
Call setRegistryHKCUKeyDefaultValue(
         'Software\\Classes\\olexlsf.XLSFileObject',
         '' )
!
! HKEY_CURRENT_USER\Software\Classes\olexlsf.XLSFileObject\CLSID
Call setRegistryHKCUKeyDefaultValue(
         'Software\\Classes\\olexlsf.XLSFileObject\\CLSID',
         '{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}' )
!
! HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\InprocServer32
Call setRegistryHKCUKeyDefaultValue(
         'Software\\Classes\\Wow6432Node\\CLSID\\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\\InprocServer32',
         'olexlsf.dll' )
!
! HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\ProgID
Call setRegistryHKCUKeyDefaultValue(
         'Software\\Classes\\Wow6432Node\\CLSID\\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\\ProgID',
         'olexlsf.XLSFileObject' )
!
! HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\TypeLib
Call setRegistryHKCUKeyDefaultValue(
         'Software\\Classes\\Wow6432Node\\CLSID\\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\\TypeLib',
         '{49C5B7AB-6005-4B46-A2A9-961D8705356C}' )
!
! HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\Version
Call setRegistryHKCUKeyDefaultValue(
         'Software\\Classes\\Wow6432Node\\CLSID\\{80C3B0A7-BA1B-11D6-871B-CCD480E9F31C}\\Version',
         '4.0' )
Code #2: setRegistryHKCUKeyDefaultValue function.

Code: Select all

!!CB!! 278
Function: setRegistryHKCUKeyDefaultValue
   Description: Setzt den Defaultwert für einen Registryschlüssel in HKEY_CURRENT_USER.
         *Returns: TRUE - Wert wurde gesetzt, FALSE - Fehler
   Returns
      Boolean:
   Parameters
      String: key
         ! [in] Name des Registryschlüssels
      String: value
         ! [in] Wert, der gesetzt werden soll
   Static Variables
   Local variables
      Boolean: result
         ! Ergebnis
      Number: keyHandle
         ! Handle eines Registryschlüssels
      Number: keyDisposition
         ! Informationen über das Öffnen/Erstellen eines Schlüssels
   Actions
      ! Defaultwert setzen
      Set result = FALSE
      If ( RegCreateKeyExW(
               RegistryPredefinedKeys.HKEY_CURRENT_USER,
               key,
               0,
               STRING_Null,
               RegistryCreateOptions.REG_OPTION_NON_VOLATILE,
               RegistryAccessRights.KEY_ALL_ACCESS,
               STRING_Null,
               keyHandle,
               keyDisposition ) = RegistryReturnCodes.ERROR_SUCCESS )
         ! Wert setzen
         If ( RegSetValueExW(
                  keyHandle,
                  STRING_Null,
                  0,
                  RegistryValueTypes.REG_SZ,
                  value,
                  ( SalStrLength( value ) + 1 ) * 2 ) = RegistryReturnCodes.ERROR_SUCCESS )
            Set result = TRUE
         !
         ! Registrykey schließen
         Call RegCloseKey( keyHandle )
      !
      Return result
If other applications also use this component, modifying the Registration may cause Problems!!!!

Max
Markus Eßmayr
teamdeveloper@t-mx.com

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests