Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

RBuilder.ini for preview form

edited November 2015 in General
v16.03 but probably applies to v17

I have my Designer set to store its settings in the registry as
customers have had problems with the ini file option in the past. So I
was surprised to have an error reported yesterday regarding the
RBuilder.ini. Checking out the call stack it seems that there is no
option to have the TppThemeManager save its preferences to anything
other than an INI file. Is the an oversight or WAD?

thanks, Paul.

exception class : EFCreateError
exception message : Cannot create file
"C:\Users\Administratör\AppData\Local\RBuilder\RBuilder.ini". Åtkomst nekad.

main thread ($a14):
00490ab5 +0b9 HireTrackNX.exe Classes TFileStream.Create
004909d8 +020 HireTrackNX.exe Classes TFileStream.Create
0048f51d +015 HireTrackNX.exe Classes
TStrings.SaveToFile
0049e422 +036 HireTrackNX.exe IniFiles
TMemIniFile.UpdateFile
00e63d21 +065 HireTrackNX.exe ppIniStorage 533 +7 TppIniFile.Destroy
00404fd8 +008 HireTrackNX.exe System 489 +0 TObject.Free
00e73540 +044 HireTrackNX.exe ppToolbarTBX 1768 +7
TppThemeManager.SavePreferences
00e735d8 +048 HireTrackNX.exe ppToolbarTBX 1781 +5
TppThemeManager.SetCurrentTheme
00e73491 +049 HireTrackNX.exe ppToolbarTBX 1752 +8
TppThemeManager.LoadPreferences
00e71c93 +023 HireTrackNX.exe ppToolbarTBX 455 +4 TppToolbar.Create
00e9ce09 +05d HireTrackNX.exe ppPreview 991 +10
TppPreview.CreateToolbar
00e9cb5c +070 HireTrackNX.exe ppPreview 933 +11 TppPreview.Create
0143f9b6 +016 HireTrackNX.exe nxRBPreview 329 +2
TnxPreviewPlugin.Create
00e9bf68 +01c HireTrackNX.exe ppPreview 368 +3
TppPreviewPlugIn.CreatePreviewPlugin
0143f8d1 +059 HireTrackNX.exe nxRBPreview 302 +9
TRBPrintPreview.SetReportDetails

Comments

  • edited November 2015
    Hi Paul,

    Most likely a timing issue. TppDesigner will configure the ini storage the
    first time it is used (or at least loads). If the report previews before
    that happens, then the default ini storage is used.

    One solution is to load the Designer prior to printing. Another solution is
    to implement code to configure ini storage, here is an example:

    uses
    ppIniStorage;


    // configure ini storage to use registry
    TppIniStoragePlugin.SetClass(TppRegistry);

    ppReport1.Print;





    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2015
    Thanks for reply,

    Most users of our app never get to use the Designer: their experience of
    reporting is File | Print | Menu of Reports for a Specific Form. And I
    wasn't aware that storage code was in play when just previewing reports.
    So maybe could just call TppIniStoragePlugin.SetClass(TppRegistry) in
    the Project file and just be done with it. Perhaps there should be a
    Wiki article on this?
This discussion has been closed.