skip labels for RTM reports
Hi!
I have tried your sample project for skipping labels, and it works fine
for a TppReport component.
We have more than 400 RTM files, so we can't access to DetailBand
OnBeforePrint event of those files.
How can we code that event for RTM files when loading them?
Thanks!
I have tried your sample project for skipping labels, and it works fine
for a TppReport component.
We have more than 400 RTM files, so we can't access to DetailBand
OnBeforePrint event of those files.
How can we code that event for RTM files when loading them?
Thanks!
This discussion has been closed.
Comments
If you would like to keep your event code local to the report template, you
should check out RAP. RAP allows you to code your events in the "Calc" tab
of the designer therefore making each template completely portable and able
to run with any application that uses RB. See the following link for more
information on RAP.
http://www.digital-metaphors.com/Subpages/Products/Enterprise/Code.html
It may be possible to assign a single event to a template that has already
been loaded into a report object using the OnLoadEnd event. See the
following article.
----------------------------------------------
Tech Tip: Using Template Events
----------------------------------------------
The Report.Template object has several events that can be used for
customizing what happens when a report is loaded or saved:
- OnLoadStart
- OnLoadEnd
- OnNew
- OnSaveStart
- OnSaveEnd
The OnLoadEnd and OnNew events are often used to perform actions related to
report and data initialization.
The OnSaveEnd event is often used to save additional descriptive ("meta")
data to the database each time the report is saved.
Example:
The Report.Template events are public and therefore must be assigned at
run-time.
1. In the private section of your form declaration you can declare an
event-handler method:
TForm = class(TForm)
private
procedure myTemplateOnLoadEndEvent(Sender: TObject);
public
end;
2. In the Form.OnCreate event, you can assign the event-handler to the
event:
procedure TForm1.FormCreate(Sender: TObject);
begin
ppReport1.Template.OnLoadEnd := myTemplateOnLoadEndEvent;
end;
3. Implement the event-handler method:
procedure TForm1.myTemplateOnLoadEndEvent(Sender: TObject);
begin
{add code here to initial the report or data, etc. }
ppReport1.PrinterSetup.MarginTop := 0.5;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok, I know that I can use template events to initialize templates at
runtime, but the DetailBand.OnBeforePrint event of the template is not
accessible at runtime.
We can't use RAP, because we use RBuilder Pro.
Isn't there another method to skip labels? Maybe with PipeLine
OnTraversal, or OnPipeLineNext, etc...?
what do you mean? sure it is avaiable at run time.
it sounds like you want the features of RAP--can you upgrade?
you could configure the data prior to printing the report.
Ed Dressel
Team DM