| Summary: | [General designer usability] Need to support Report Templates Extension | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mike Boyersmith <mjboyers> | ||||||||||
| Component: | BIRT | Assignee: | Dazheng Gao <gump_gao> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | Maggie Shen <lshen> | ||||||||||
| Severity: | enhancement | ||||||||||||
| Priority: | P3 | CC: | bluesoldier, clin, danberg, ldamus, mdelder, nmakin, wenfeng.fwd, zqian | ||||||||||
| Version: | unspecified | Keywords: | plan | ||||||||||
| Target Milestone: | 2.5.0 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | Non-Auto | ||||||||||||
| Attachments: |
|
||||||||||||
in BIRT 2.0, user will be able to create new templates and put them in a folder to be used as the based for report creation. We are not using plugins to achieve this capability, however, please review BPS for template. I was able to get this to work using the preference but this isn't a good solution for us. What we need is the ability to reuse this dialog by providing our own list of templates to be shown on the templates page. For instance: Product 1, might want to use this dialog and provide a domain specific list of templates in this dialog. Later on, Product 2 might want to use this dialog and provide its domain specific list of templates in this dialog. As you can see the current design doesn't support this abstraction and seperation Also the Templates Page of the wizard only supports .rpttemplate it would be nice to also be able to have it load .rptdesign files as well, as starter choices for a new report. set this as an enhancement request. Could I get an estimated time on when this will be supported or if there is a workaround to register a report template through the plugin - extension or code? The template list is processed in class WizardTemplateChoicePage. You can either change this class or replace the whole NewReportWizard extension with yours. Hi Zhigiang, The suggestion doesn't quite meet the needs of this defect. In particular, the New > Report wizard is the standard report creation hook, and defining a separate wizard just for our report would potentially confuse users. I have included a picture of the menu and wizard flow I'm referencing. Created attachment 94469 [details]
New > Report Wizard
Created attachment 94471 [details]
Report Wizard Flow
(In reply to comment #8) > Created an attachment (id=94471) [details] > Report Wizard Flow Is the enh request to pick up a complete different set of templates based on different products? We can have WizardTemplateChoicePage class read a setting of where to search for the templates. How do you plan to set such settings? via an extenion point to the WizardTemplateChoicePage's plugin? What would the API of such a extension point? Is it going to be as simple as getTemplateFolder() or getTemplateList()? It will be nice to have some categorization in the templates that are contributed with UI able to show the categorized reports. However, the basic request is to be allowed to register new template locations that are defined in the contributing plug-ins such that they are shown along with the other templates in the wizard.
The registration extension point could be simple as below:
<extension
point="com.ibm.ccl.erf.birt.reporttemplates">
<reportTemplate url="platform:/plugin/com.myplugin.birt/designs/myTemplate1.rptdesign">
</reportTemplate>
<reportTemplate url="platform:/plugin/com.myplugin.birt/designs/myTemplate2.rpttemplate">
</reportTemplate>
</extension>
Notice that we should be able to read both - a rptdesin and rpttemplate.
With Categorization it may look like below:
<extension
point="com.ibm.ccl.erf.birt.reports">
<category
displayName="MyCategory"
icon="myreportcategory.gif"
id="com.myplugin.birt.mycategory">
</category>
<reportTemplate
category="com.myplugin.birt.mycategory"
url="platform:/plugin/com.myplugin.birt/designs/myTemplate1.rptdesign">
</reportTemplate>
<reportTemplate
category="com.myplugin.birt.mycategory"
url="platform:/plugin/com.myplugin.birt/designs/myTemplate2.rpttemplate">
</reportTemplate>
</extension>
Another extension point design could be simply to register the template folders (augment existing or just supply this), if that is something that fits the current implementation.
<extension
point="com.ibm.ccl.erf.birt.reporttemplates">
<reportTemplateFolder
url="platform:/plugin/com.myplugin.birt/designs">
</reportTemplateFolder>
<reportTemplateFolder
url="platform:/plugin/com.myplugin.birt/metricdesigns">
</reportTemplateFolder>
</extension>
With Categorization it may look like below:
<extension
point="com.ibm.ccl.erf.birt.reports">
<category
displayName="MyCategory"
icon="myreportcategory.gif"
id="com.myplugin.birt.mycategory">
</category>
<reportTemplateFolder
url="platform:/plugin/com.myplugin.birt/designs">
</reportTemplateFolder>
<reportTemplateFolder
url="platform:/plugin/com.myplugin.birt/metricdesigns">
</reportTemplateFolder>
</extension>
We can add extension support for template list, but probably no new extension point, just leverage existing adapter extension point. Rima, do we need a new categorized template list UI design? Or the simplest way is to use a tree view. ExpandBar may be a better choice if we do not plan to support sub category. Would this support become available for BIRT 2.3 release? Wenbin, please review the request. Thanks (In reply to comment #12) > We can add extension support for template list, but probably no new extension > point, just leverage existing adapter extension point. > Rima, do we need a new categorized template list UI design? Or the simplest way > is to use a tree view. PLease use tree view. Fixed.extension point like this,
<extension
point="org.eclipse.birt.report.designer.ui.elementAdapters">
<adaptable
class="org.eclipse.birt.report.designer.internal.ui.wizards.ExtensionTemplateListProvider">
<adapter
class="test.TemplateTest1"
id="TestPlug.adapter1"
priority="10"
type="org.eclipse.birt.report.designer.ui.templates.ITemplateProvider">
</adapter>
</adaptable>
</extension>
verified. I have attached a simple example. Created attachment 131593 [details]
template extension - example
Created attachment 139527 [details]
updated sample
|
Report Template selection is currently hard coded in the class WizardTemplateChoicePage. Ideally Birt needs to support the ability for customers to add thier own templates into the ERD. Extensibility is a good thing here. I see two extension possibilities right off that would be nice to have: 1) An extension point that allows a company to add to a tree view that categorizes templates something like company X feature temp1 temp2 temp3 Company Y feature tempa tempb tempc company z sub category a temp1 temp2 temp3 sub category b temp 1 temp 2 temp 3 - OR - 2) Add extension support for adding kinds of templates to the wizard and allow the extension implementer to provide additional pages for that new kind of template on the template kind selection and Next button press. so wizard page 1 might be Select Kind of Report Templates you wish to work with Basic Company X Company Y if I select Company X and hit <next> I get the Company X list of templates to select from.