Several dialogue forms

Top  Previous  Next

Let's see how a report with two dialogues works. Create a report with two dialogues and one design page:

 

_img279

 

_img280

 

clip0022

 

Set the “ModalResult” property for the OK and Cancel buttons to mrOk and mrCancel respectively. Now run the report. First of all the user will be asked to answer questions from the first dialogue (name, any children), then after clicking ОК, from the second one (childrens’ names). After clicking ОК in the second dialogue the report will be built. FastReport handles multiple dialogues in this way : the dialogues are displayed in their creation order; each dialogue is displayed only after the previous one has been closed with “ModalResult = mrOk” (in this example by clicking each OK button). If any dialogue is closed using the Cancel button or the system menu “Х” button then building of the report is prevented.