Acessing a user function within a custom component

I have a custom component a descendant of TfrxMemoView mycompoent

I also have a custom function (myfunc) which I want to call within the GetData procedure/event of mycomponent. When I try to compile mycomponent with the call to myfunc I get a compile error

[DCC Error] fastreport_mycomp.pas(45): E2003 Undeclared identifier: 'myfunc'

When I run my appliaction (without the call to myfunc in the Getdata function) myfunc is listed in fast reports under "my functions"

Comments

  • gpigpi
    edited 6:35AM
    But you can access user's function from report's script, not C++ code
  • Thanks GPI - I think I may have a work around that will work for me.
  • Hmm still not quite got there.

    Bascially my current problem is this.

    I have written a custom component but the component needs access to both the data field to which it is associated and another variable.

    I can pass this variable to fast reports as

    1. a custom variable
    2. a field in a different dataset to that which my component is bound

    Unfortunately although I can pass the variable to fast reports via 1 or 2, I cant see how i can access the data within my custom component.

    Anyone know how to do this?


    Thanks

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.