Dialog and page Hide and IBXQuery

edited 10:48PM 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 10:48PM
    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

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.