Dialog and page Hide and IBXQuery

edited 9:10PM in FastReport 4.0
Hi,

I am beginer with FastReport and I have a two quastion.

I created dialog, where I have one question (checkbox) "Do you print page No.2" and listbox with column for "order by"

1) In report i have two page - second page I need print if the user check the checkbox in dialog.

I think, than I set a event on the second page "onManualBuild":
Page_xxx.Visible := Check_box.Checked;

but this not ok. I need, the second page not visible on preview and print!


2) With "Order by" Than I think, at event "onBeforePrint" I set IBXQuery in program code, than I add ORDER BY clausule. But I don't open the query.
In SQL propertis i have "SELECT * FROM table_xy".

Code is:

with IBXQuery do begin
if Active then Close;
SQL.ADD('ORDER BY cokoliv')
Open;
'ExecSQL; -> this is write error, "You can use open metod."
end;

No error, but the IBXQuery closed and report is clear.

Thank you for your answer.
DavidB

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:10PM
    set the second designpage visibility from the onclick event of the dialogs ok button.
    page2.visible := NOT checkbox1.checked;
    you also want to set your query in this event also.

Leave a Comment