interactive report?

hsmhsm
edited 6:01PM in FastReport 4.0
What must you do to make a report interactive?

I've put

procedure MyReportClickObject(View: TfrxView; Button: TMouseButton; Shift: TShiftState; var Modified: Boolean);

in the Type section and added a method of the same name but the method does not get called when I click in the report.

I can make the FR demo program work (even though the declaration is different to the code in the programmers manual), but although my code looks identical to the demo but I can't seem to trap the click event.

Come on Gordk, where are you now that I need you! [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Howard[/img]

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:01PM
    since you were cutting and pasting code
    you probable forgot to hook the event to the tfrxreport component.
  • hsmhsm
    edited 6:01PM
    gordk wrote: »
    since you were cutting and pasting code
    you probable forgot to hook the event to the tfrxreport component.

    Thank you for getting back so quickly Gordk. Yes that was the problem. The Programmers manual didn't explicitly say to use one of the events shown in the object inspector so you were correct,I simply copied and pasted and so created a new method that was not hooked to an event. I realise the mistake now and have managed to get it working (I was trying to get my report sorted by different fields depending upon which header you clicked on, I even managed to manipulate the group headers as appropriate to the different sorting).

    However, although not critical to my program I am interested why pg 7 of the manual shows an additional first parameter of 'Page: TfrxPage;' in ClickObject that is not used in the demo program. In fact if I add that parameter into both the header and declaration in the demo program, it won't compile as it says the number of parameters do not match the method declaration. I guess this allows one to focus events to a particular page but please could you explain how to hook this in when, as I say, the demo program will not accept that number of parameters.

    Still love fastreport!

    Howard
  • gordkgordk St.Catherines On. Canada.
    edited 6:01PM
    instead of hacking someohne elses code (cut and Paste) write your own code using your ide environment
    when you dblclick in the event side of the ide's object inspector the event syntax is created and inserted
    into the various sections of the delphi form's code with the correct syntax refrences,(for the current version) and is connected to the report component.

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.