Assigning Parameters Values to a Query

I want present to the user an FR dialog, collecting a value, which I then want to assign as a parameter to the query.

How do I do this?


I have consulted the documentation and the FAQ, and am having problems with the approaches presented there:

(1) In the online help it mentions the TfrBDEQuery component. I cannot find this component in the Designer at all. The only component on the tools menu is the "Insert Fields Dialog". Why isn't this visible?

(2) The FAQ mentions closing a query, assigning a value to a variable, and opening a query. Well, what variable name would this be? The parameter in the TDataset is "DateEntered". What variable name would this be in FR?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:03AM
    Assuming you are using 2.51 and have compiled the bde engine components and from the fastreport tab of the delphi pallette dropped a frbde object on the underlying report form you should have all the bde objects available in the design window.
    when you create your sql statement parameterize it by creating a where clause
    eg
    where
    (Custno =:myparamname)
    save your sql
    in the object inspector select params in the params editor set the parameter to the type you want and in the value box set it to the text property of the edit box on the dialog form.
    eg. myparamname type integer value edit1.text.
    regards ;)

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.