Report - params

I have make a report with a dialog at the beginig. I have a some components (TfrxDateEditControl, CheckBoxes etc) from which I take values. This values are send as params in a BDEQuerry.
On the ok button I have this:
qrReport.Active:=true;
qrReport.First;
if qrReport.EOF then
begin
ShowMessage('No record here');
qrReport.Active:=false;
page2.ModalResult := mrNone;
end;
With some values I have a empty Querry and then it return the modal dialog.
If I change some values in the components (the date) and click the OK button the querry are running with the old values in params.

Comments

  • edited 12:32PM
    I don't know what I have to do to take the new value of params.
  • gordkgordk St.Catherines On. Canada.
    edited 12:32PM
    there is a number of things to pay attention to when working with dialog forms
    where you do it (which control and which event) and which property you set, and the taborder of the controls.
    sample using internal query report of main demo 52.fr3
    enter design mode set button1 enabled to false
    with dialog form selected rightclick and select tab order and move button2
    to the top. save changes
    add code to edit1onexit event

    procedure Edit1OnExit(Sender: TfrxComponent);
    // it would be wise to add a test for valid numeric value here
    begin
    bdequery1.active := true;
    if bdequery1.recordcount = 0 then
    begin
    ShowMessage('no records Available edit the value');
    bdequery1.active:= false;
    Button1.enabled := false;
    end
    else
    begin
    bdequery1.active := false;
    Button1.enabled := true;
    end;
    end;
    save changes
    ;)
  • edited 12:32PM
    but is not recordcount property in 3.0!
    i have an error: undeclared identifier 'recordcount'
  • edited 12:32PM
    and in 52.fr3 is not a reference to events or recorcount
  • edited 12:32PM
    i have fast report 3.03 and have not recordCount. It's True?
  • gordkgordk St.Catherines On. Canada.
    edited 12:32PM
    works fine for me d7pro fr3.10 pro win98 win xppro. recordcount is a readonly property and does not show in fr object inspector.
    ;)
  • edited 12:32PM
    but in 3.03 is not this property? becouse in the script editor always i have the error:
    "undeclared identifier: recordcount"
    the code that i write
    qrReport.Active:=true;
    if qrReport.RecordCount = 0 then
    begin
    ...
    and for this reason I use eof even I don't trust it. ;)
  • gordkgordk St.Catherines On. Canada.
    edited 12:32PM
    Why are you working with an out dated version? the current version is 3.10.
    if you are a registered user updates are free.
  • edited 12:32PM
    Thank's a lot.
    It work. ;)

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.