Component for including templates
Hi,
I have to develop a mechanism, where a end-user can place a component
on his report. This component will load/include a template. This
template is stored as a .ltm-file in database.
My solution looks like this:
1.) Create new component based on TppLabel
Caption can be used to display templates name but
1.1) How can I avoid that end-user will ca edit this caption?
1.2.) How can I prevent printing the component, but allow previewing in
designer?
2.) On printing/previewing the report the template(.ltm) should be
loaded and element have to be visible, but on designing the report they
are not visible.
Any ideas how to make my solution work.
Tia Carsten
--
Hint: We altered the sources!Hint: We altered the sources!
I have to develop a mechanism, where a end-user can place a component
on his report. This component will load/include a template. This
template is stored as a .ltm-file in database.
My solution looks like this:
1.) Create new component based on TppLabel
Caption can be used to display templates name but
1.1) How can I avoid that end-user will ca edit this caption?
1.2.) How can I prevent printing the component, but allow previewing in
designer?
2.) On printing/previewing the report the template(.ltm) should be
loaded and element have to be visible, but on designing the report they
are not visible.
Any ideas how to make my solution work.
Tia Carsten
--
Hint: We altered the sources!Hint: We altered the sources!
This discussion has been closed.
Comments
Is the goal to enable the end-user to add a background image/watermark to
the report? Or what is the goal?
Is there a list of .ltm's the user can choose from?
To load a .ltm, the report needs a Design Layer. Does the end-user create
the Design Layer? Or is it already created (i.e. an existing report they are
editing vs a new report)
A couple of ideas:
1. Instead of a custom component, add a Designer menu item the end-user can
select to add/remove the layer. Similar to selecting Report | Title to add a
title band, etc. When the end-user selects the menu item, create the design
layer, load the .ltm, and set LayerOptions Visible to false to hide it from
the Design workspace.
2. Similar to number 1, but have the menu item display a dialog, like RB
does for Report | Groups. From the dialog the user can select from a list
of options and then the dialog will add/remove the design layer.
Best regards,
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
the end-user shall be able to design a template (header or footer,...)
once and re-use it in several reports. This template can contain any
element being supported by RB.
He will be able to choose one (or more) templates out of a list.
Your ideas 1 and 2 sound very good, I will discuss them with my
productowner.
But your idea is much to static, the inclusion of the layers have to be
done on runtime/printing the report.
UseCase:
Adam adds template A to report R
Bob changes template A==>A'
Adam runs Report R which includes changes from templae A'
Idea:
In TppReport.BeforePrint templates will be loaded as designlayers, so
end-user can see them within designer and preview and on printing.
Question: How/where do i store within the report, which templates have
to be loaded. Is it TppReport.Parameters?
Tia Carsten
Nard Moseley (Digital Metaphors) stellte die Frage :
--
Hint: We altered the sources!Hint: We altered the sources!
Beforepritn seems not to be the solution, as added designlayers are not
shwon within designer and its preview.
After playing around, I think he best solution to update my templates
is after loading them. As our reports are stored within a database, i
will just have to look for TppReport.template.loadfromDatabase in my
code and add my methods for updating my templates.
Or is there any other event?
Tia Carsten
Nach längere Bedenkzeit hat Nard Moseley (Digital Metaphors)
Try using the Report.Template.OnLoadEnd event to call
DesignerLayer.Template.LoadFromDatabase. Use a Report Parameter to save the
name of the template.
Best regards,
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
BTW, Property template and its events are not published to IDE in 18.0.
Tia Carsten
Nard Moseley (Digital Metaphors) hatte dann diese Idee :
--
Hint: We altered the sources!Hint: We altered the sources!