How to use report inheritance properly and flexibly?
Hello,
I'm trying to figure out at the moment, how to work with FastReport, what it
can offer, if it can cover everything I need.
My current "problem" is the report inheritance.
Well, actually the first question is, if report inheritance is the correct
way to implement what I need.
It's the following:
The End-User shall be able to design his own personal "letter paper"-layout
for his documents (logo, bank-data etc.). Then this layout shall be
available in several reports with data (invoices, offers, orders etc.),
which our program is offering. Those reports can't be edited by the End-User
at the moment.
They just need to be combined with this "letter paper"-layout when printing,
so the user has
a) a separate place to edit the layout without the ability to edit the
data-reports
b ) and he has to do it only once, instead of changing all reports (if each
of them would contain the layout-elements in it)
So the first question is: is report inheritance the correct way to implement
that?
After reading the forum, the documentation and this newsgroup it seems to
be, but I'm not that sure.
I tried to test it out.
First results seem to be ok, though first problems are there already.
1) with "InheritFromTemplate" I can combine both reports, but how do I
remove the base report again? Our customers do have a wish to manually add
or remove that "letter paper"-layout depending on what they are doing. I
could just load the report again, but is this the correct way?
2) after reading of the entry here with the title "Print Background on each
page independant of page-margins?" there seem to be issues with margins. The
last reply there is over 1 year old, so I don't know if the problem does
still exist. Does it?
3) the problem I noticed myself while testing: There seems to be no ability
to determine, what pages of the "user-report" shall contain the content of
the base-report and what souldn't.
Example: the base-report has only one page. The data-reports can and will be
longer of course. Once I do inherite them from the base report, only the
first page of the user-report contains the content of the base report. All
other pages don't, which is bad, since our customers would like to have the
ability to determine this behaviour and to see the layout either on all
pages, or on the first page only etc.
Is this possible? If yes: how?
I hope someone can help me.
Kind regards.
I'm trying to figure out at the moment, how to work with FastReport, what it
can offer, if it can cover everything I need.
My current "problem" is the report inheritance.
Well, actually the first question is, if report inheritance is the correct
way to implement what I need.
It's the following:
The End-User shall be able to design his own personal "letter paper"-layout
for his documents (logo, bank-data etc.). Then this layout shall be
available in several reports with data (invoices, offers, orders etc.),
which our program is offering. Those reports can't be edited by the End-User
at the moment.
They just need to be combined with this "letter paper"-layout when printing,
so the user has
a) a separate place to edit the layout without the ability to edit the
data-reports
b ) and he has to do it only once, instead of changing all reports (if each
of them would contain the layout-elements in it)
So the first question is: is report inheritance the correct way to implement
that?
After reading the forum, the documentation and this newsgroup it seems to
be, but I'm not that sure.
I tried to test it out.
First results seem to be ok, though first problems are there already.
1) with "InheritFromTemplate" I can combine both reports, but how do I
remove the base report again? Our customers do have a wish to manually add
or remove that "letter paper"-layout depending on what they are doing. I
could just load the report again, but is this the correct way?
2) after reading of the entry here with the title "Print Background on each
page independant of page-margins?" there seem to be issues with margins. The
last reply there is over 1 year old, so I don't know if the problem does
still exist. Does it?
3) the problem I noticed myself while testing: There seems to be no ability
to determine, what pages of the "user-report" shall contain the content of
the base-report and what souldn't.
Example: the base-report has only one page. The data-reports can and will be
longer of course. Once I do inherite them from the base report, only the
first page of the user-report contains the content of the base report. All
other pages don't, which is bad, since our customers would like to have the
ability to determine this behaviour and to see the layout either on all
pages, or on the first page only etc.
Is this possible? If yes: how?
I hope someone can help me.
Kind regards.
Comments
in most cases you would probably inherit some basics from template, ie page header band with logo
other items you will possibly use the printable property of some objects to control wether or not they
output to the finished page. ie using preprinted forms or plain paper.
you cannot print outside margins of a design page.
inheritance may not be what you want it may be more like creating some report templates and letting the user load a template modify to suit and save the mod design, at runtime you give them a choice of what to load base(standard) or their (modified)