interactive report?
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]
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
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
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.