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

Problem with IniStorageName

edited May 2008 in General
Hi All,

Sorry for any inconvenience, my English is a bit poor, but I'll try to
explain my problem.

I'm having problems with IniStorageName property when setting it at
runtime. I have a custom version of RBuilder.ini, that is saved on same
app folder, and I need to load the .ini configuration at runtime,
depending on user that connect to my app. Is it possible?

I'm using the following code:

procedure Form1.Button1Click(Sender: TObject);
begin
ppDesigner1.IniStorageName := 'c:\myapp\rbuilder.ini';
end;

But, with this code above, the 'c:\myapp\rbuilder.ini' configuration
aren't load (that is, does not change) the Designer toolbars that is
visible or not.
By the way: the name of the 'rbuilder.ini' can change depending on the
user that connect to my app. Is it clear?
How can I do this?

Using: Delphi 7, RB 7.04

TIA,
Laércio

Comments

  • edited May 2008

    Try download a trial version of RB 10 and perform the same test.

    Might be a timing issue.

    Try setting Designer.IniStorageName at startup, prior to doing anything
    else.



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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2008
    Hi,

    I did the same test with a trial of RB 10.06 and the problem occurs like 7.04.
    I need to change this setting at runtime many times as the app user exchange.

    For instance, will be possible that each user connected to the app has his custom version
    of RBuilder.ini, like: RBuser1.ini, RBuser2.ini, RBuser3.ini and so on...

    The end user app has a button to exchange current app user, and at this time, I'd like
    that the custom RBuilder.ini of the user would be loaded. Is it clear? Is there a way to
    do this?

    TIA,
    Laercio



    Nard Moseley (Digital Metaphors) escreveu:
  • edited May 2008

    The Designer loads the ini settngs the first time it is shown. I recommend,
    dynamically creating and configuring the designer each time.

    Example:

    uses
    ppEndUser;

    var
    lDesigner: TppDesigner;

    begin

    // create and configure designer
    lDesigner := TppDesigner.Create(Self);

    lDesigner.Report := myReport;
    lDesigner.IniStorageName := 'c:\myapp\rbuilder.ini';

    lDesigner.ShowModal;

    lDesigner.Free;

    end;

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2008
    I'll try this.

    Thanks a lot,
    Laercio


    Nard Moseley (Digital Metaphors) escreveu:
This discussion has been closed.