Can I skip the dialog ?

Hi all.

Anyone ever wondered ... "Can I skip the parameter dialog?"

If the dialog asks for say a order id - and you wish to use the same report several places in your programming.
Some places the input regarding the order id is needed ... and others you simply dont want to bother the user with - yet another dialog.

Can this be done?

btw : im using latest version - and mainly using Delphi 2010 VCL.

Regards
Bimmer_R

Comments

  • edited 8:08PM
    Bimmer_R wrote: »
    Hi all.

    Anyone ever wondered ... "Can I skip the parameter dialog?"

    If the dialog asks for say a order id - and you wish to use the same report several places in your programming.
    Some places the input regarding the order id is needed ... and others you simply dont want to bother the user with - yet another dialog.

    Can this be done?

    btw : im using latest version - and mainly using Delphi 2010 VCL.

    Regards
    Bimmer_R

    Hi,
    Yes you can do it. But you have to set the variable and use that vaiable within the report. But if you reload the report, then the varible's value will be lost.
    You can set variable with dialog.
  • edited 8:08PM
    HERBERTS wrote: »
    Hi,
    Yes you can do it. But you have to set the variable and use that vaiable within the report. But if you reload the report, then the varible's value will be lost.
    You can set variable with dialog.

    Hi Herberts.

    I just tried what you suggested - I think :-)

    Consider this scenario:

    A report with a dialog named "INPUT_DIALOG".
    A report variable : aReport : TfrxReport;

    I load the report with : aReport.LoadFromFile('Input test.fr3');
    Having loaded the report I can find the dialog with this : aDialog := aReport.FindObject('INPUT_DIALOG') as TfrxDialogPage;
    With the dialog I can set any values that I allready know from my program - and if I have all parameters for the report I don't wanna bother the user with a dialog.
    I case I wanna skip the dialog I've found the solution by doing this simple trick :

    aReport.Visible := False;

    The only thing I'm missing out on now, is "how to change the input value of a TfrxDBLookupComboBox"?
    Should I try and set the corrosponding record pointer for the dataset?
    I have tried TfrxEditControl, TfrxMaskEdit and TfrxDateEdit controls - and I can change the input values of them all.

    Thank you for guiding me on the right track :-)

    Regards
    Bimmer_R

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.