using the same header/footer in multiple reports

Hi,
I have a large number of reports and they all have the same page-header and page-footer withall kinds of text-objects and image-objects. If I want to change one item in the header or footer, I must edit all 20 reports.

Is there a function to bypass this (sort of 'include') so all reports use the same header and/or footer ?

Henk

Comments

  • edited 9:43PM
    I used to do what you are saying with QuickReports by inheriting the form but I haven't found the a way to do that with Fast Reports.

    If you look at the source code that generates the .FR3 file you'll notice that the .FR3 file is nothing but a XML file. I had to write a simple DB app that looks for a TAG field (TAG=n) and replace those XML lines from my common report template.

    I wrote a simple BDE app and used TStringList and took me about 3 or 4 hours to write. Now I can change my formats across dozens of reports in a few seconds after making the required changes to my Template.FR3.

    Wayne
  • khhkhh
    edited 9:43PM
    Very important feature especially for ServerEdition.

    I have more than 70 report all with same header and footer.
    I had to copy and past header and footer for every single one.

    The real nightmare is when you decide to change something later in header or footer.

    I hope we see some solution soon.

    Thanks.
  • edited 9:43PM
    That's why I wrote a custom app that changes the XML. It would be nice to be able to create an inherited object but that's not possible. Since I rarely use TAG in TObject I descided to take advantage of this in the XML. Everything with the same TAG is considered common so I update those XML fields.

    More difficult because I need to make sure I use the common template but for my low end development where users only select the fields and I generate the datasets myself thus the .FR3 file and the associated controls can be inherited from the common template.

    Wayne
  • edited 9:43PM
    I have been looking at the files and... yep.. it's XML. So I can make a template with only a header and footer and replace them in all files I can select in my appl.
    Does not look too complicated.

    An Include-function would help users with no XML-knowledge and make it more userefriendly.
    Anyway, thanks. I will start programming.
  • edited 9:43PM
    Look at frxXMLSerializer. This should give you some hints.

    Only thing you're doing is adding a field/tag to the XML so I don't know how much easier (user friendly) you can make it. Maybe if I get bored this weekend I'll convert what I've written into a class and then post the source.

    Glad I was able to be of assistance.

    Wayne

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.