diff --git a/birt/documents/Creating reports.adoc b/birt/src/docs/asciidoc/_include/bt-creating reports.adoc similarity index 76% rename from birt/documents/Creating reports.adoc rename to birt/src/docs/asciidoc/_include/bt-creating reports.adoc index 7b7981c45..b0160bb10 100644 --- a/birt/documents/Creating reports.adoc +++ b/birt/src/docs/asciidoc/_include/bt-creating reports.adoc @@ -1,24 +1,25 @@ -= Report creation - Admin/Super-User +=== Report creation -== Introduction +==== Introduction +NOTE: This feature will begin to be officially available with the R17.12 branch first release -NOTE: this feature will be officially available with the R17.12 branch first release A flexible report is an OFBiz content of FLEXIBLE_REPORT type that allows a final user to make use of the reporting module to obtain flexible reports, ie reports which are created from an entity or view definition and even from a service. A flexible report is created from a Report Master (content REPORT_MASTER), and an optional XML override of the parent form. -== Pre-requisite +==== Pre-requisite * OFBiz framework * The Birt plugin -* The BIRT Report Designer +* The BIRT Report Designer: <> -== Report creation +==== Report creation + +. Get to Birt component in OFBiz image:Birt-Menus.png[Birt menus] -. Get to Birt component in OFBiz image:https://cwiki.apache.org/confluence/download/attachments/68720496/Birt%20Menus.png?api=v2[Birt menus] . Click on the "Flexible Report" menu (varies depending on themes) . Click on the "Generate report" button, you get to this screen: -. Fill the form: -image:https://cwiki.apache.org/confluence/download/attachments/68720496/Example%20Report.png?api=v2[Example Report] +. Fill the form: image:Example-Report.png[Example Report] + ** The list "Choose report topic" will let you choose among predefined report masters your topic of interest. ** The report name is a simple short name from which the file name will be generated. ** The description is a short description which will allow you to recognise the report and its topic. @@ -26,32 +27,34 @@ image:https://cwiki.apache.org/confluence/download/attachments/68720496/Example% Finally, if you don't find what you want, you will need to create a new Report Master... -Once the form is validated, OFBiz will show you the "Edit Report" screen. image:https://cwiki.apache.org/confluence/download/attachments/68720496/Edit%20Report%20screen.png?api=v2[Edit Report screen] +Once the form is validated, OFBiz will show you the "Edit Report" screen. -== Report information +image::Edit-Report-screen.png[Edit Report screen] + +==== Report information This first panel allows you to change the report description and status. Actually it does not make sense changing the status to published before having downloaded the .rptdesign file (Birt Report Designer file) from the server (in database), edited and uploaded it back to the server. This is explained in the section below. Changing the status allows users to use your reports. But if you publish without any change the report will render as empty. -== The .rptdesign report file: download, edit, upload and publish it +==== The .rptdesign report file: download, edit, upload and publish it -To really use the report you need to download the .rptdesign file from the server in a location from where you can edit it with the BIRT Report Designer. So you need to install first the BIRT Report Designer. Then you can edit the .rptdesign file in the BIRT Report Designer. For that refer to the https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk/birt/documents/Using%20the%20Birt%20Report%20Designer.md.html["Using the Birt Report Designer.md.html" file]. You can also find the Markdonw version in the same directory: ofbiz-framework/plugins/birt/documents +To really use the report you need to download the .rptdesign file from the server in a location from where you can edit it with the BIRT Report Designer. So you need to install first the BIRT Report Designer. Then you can edit the .rptdesign file in the BIRT Report Designer. For that refer to <>. -=== Editing the downloaded file +===== Editing the downloaded file Once you installed the BIRT Report Designer and have downloaded the .rptdesign file, you can edit it with the Birt Report Designer. When you have edited it suiting your needs you must upload it to the server for your changes to be taken into account by OFBiz. *This is when things begin to be really interesting*. You can then test your report using the "Preview" panel. There you can temporarily filter the result, and use the export format you prefer, once done click "Send". You can then decide to change the report content in the Birt Report Designer again or keep your changes. Once done in the Birt Report Designer, simply select the changed file to upload, and upload it again. You can re-test your changes and continue until you really get what you want! You can then publish the report to allow users to select and use it. There are 2 ways to publish a report from the "Manage reports" screen or directly in the "Report information" panel. We will see the "Manage reports" screen below. -== Filters Overriding +==== Filters Overriding You may want to overide the default filters. You can then use the Xml "Override filters" panel to override and personnalize the form, once done click "Save". If you ignore that step, it will *NOT* prevent the report creation, *it is already done*, it will just be with the generic filtering form inherited from the master from. NOTE: if no preview is available, it is usually due to a mistake in the master form code. You can edit it in the database. -== Manage reports +==== Manage reports The "Manage reports" button get you to a screen which allows to edit (get back to current page), publish or delete a report. -== Use a report +==== Use a report Users can select and use any published report from that screen. When they select a report they then get the same "Preview" Panel and can do the same things than in the "Edit Report" screen. Refer users to diff --git a/birt/documents/How to use flexible reports.adoc b/birt/src/docs/asciidoc/_include/bt-how to use flexible reports.adoc similarity index 91% rename from birt/documents/How to use flexible reports.adoc rename to birt/src/docs/asciidoc/_include/bt-how to use flexible reports.adoc index 012113b27..7b1d8ae99 100644 --- a/birt/documents/How to use flexible reports.adoc +++ b/birt/src/docs/asciidoc/_include/bt-how to use flexible reports.adoc @@ -1,18 +1,18 @@ -= Using a flexible report - User +=== Using a flexible report -== Introduction +==== Introduction NOTE: this feature will be officially available with the R17.12 branch first release A flexible report is an OFBiz content of FLEXIBLE_REPORT type which allows the final user to obtain reports using the Birt reporting module. It will be produced at a specific time of your choosing, with your chosen output format, filtering the data with a few parameters defined during report design creation. -== Pre-requisite +==== Pre-requisite * OFBiz * The Birt plugin * Pre-published reports created from report masters -== Using the report +==== Using the report . go to the Birt component or to another page harboring reports. . In the Birt component, click "Use a report". diff --git a/birt/documents/Report master creation.adoc b/birt/src/docs/asciidoc/_include/bt-report master creation.adoc similarity index 96% rename from birt/documents/Report master creation.adoc rename to birt/src/docs/asciidoc/_include/bt-report master creation.adoc index eeb0b51ab..082801cd6 100644 --- a/birt/documents/Report master creation.adoc +++ b/birt/src/docs/asciidoc/_include/bt-report master creation.adoc @@ -1,17 +1,17 @@ -= Report master creation +=== Report master creation -== Introduction +==== Introduction NOTE: this feature will be officially available with the R17.12 branch first release A report master is an OFBiz content which allows a user to generate data reports. It defines data connexion, and a general filtering form for data. It can be based on an entity, a dedicated service, or in a wider sense on any shape a data connexion can take and return back a map. -== Pre-requisite +==== Pre-requisite * OFBiz * Birt plugin -== Report Master based on an entity/view +==== Report Master based on an entity/view . Create or choice a database entity or view . Create the general filtering form within the file plugins/birt/widget/birt/BirtMasterForms.xml. The only informations to be changed are entity-name and form name. @@ -53,7 +53,7 @@ The form in the database is the form that will allow users to change form parame Your Report Master is created ! You can now create reports using it. -== Report Master based on a service +==== Report Master based on a service Create in plugins/birt/src/org/ofbiz/birt/birt/BirtMasterReportServices.java 2 dedicated services (see examples there) @@ -118,7 +118,11 @@ The form in the database is the form that will allow users to change form parame ---- -== Entities diagram +==== Entities diagram The following diagram shows the Entities linked with Content to store report_master/report. -image:https://cwiki.apache.org/confluence/download/attachments/68720496/Report_Master.png?api=v2[Report_Master] + +image::Report-Master.png[Report Master] + + + diff --git a/birt/documents/Using the Birt Report Designer.adoc b/birt/src/docs/asciidoc/_include/bt-using the birt report designer.adoc similarity index 76% rename from birt/documents/Using the Birt Report Designer.adoc rename to birt/src/docs/asciidoc/_include/bt-using the birt report designer.adoc index d8c6d447e..b955593b8 100644 --- a/birt/documents/Using the Birt Report Designer.adoc +++ b/birt/src/docs/asciidoc/_include/bt-using the birt report designer.adoc @@ -1,6 +1,6 @@ -= Using the Birt Report Designer - Admin/Super-User +=== Using the Birt Report Designer -== Introduction +==== Introduction NOTE: this feature will be officially available with the R17.12 branch first release @@ -8,32 +8,33 @@ The creation of a flexible report goes through a design step of the initial flex This document describes the simplest designs to connect to the data. It is not exhaustive, and simply attempts to cover basic needs. You will find much more documentation online. In our approach, the connection to the data is generated automatically by OFBiz, only the design part of the report will be discussed. -== Installing the BIRT Report Designer +==== Installing the BIRT Report Designer Installing the BIRT Report Designer is easy. If you use Eclipse, you can include it as a plugin. You can also install the whole BIRT Report Designer. I use Eclipse but I prefer the second way, to not mix things. So simply download and install the whole all-in-one thing. Or install the plugin if you prefer and use its "Report Design" view which allows to edit .rptdesign files. NOTE: if you installed the BIRT Report Designer under say, a Birt directory, then by default the reports will be accessed from the Birt\workspace\Report Builder directly and this is where you should put the .rptdesign files when downloading them. Your mileage may wary... -== Different areas of the screen and their role +==== Different areas of the screen and their role -=== Navigator - Report Builder +===== Navigator - Report Builder This is where you should find the .rptdesign files you downloaded. -image::https://cwiki.apache.org/confluence/download/attachments/68720496/Report%20Builder.png?api=v2[Report Builder] +image::Report-Builder.png[Report Builder] -=== Data Explorer +===== Data Explorer The Data Explorer defaults to the right of your screen. It gives you access to two things. The data fields available for the report, and the filter fields that can be used for this report. -image::https://cwiki.apache.org/confluence/download/attachments/68720496/Data%20Explorer.png?api=v2[Data Explorer] +image::Data-Explorer.png[Data Explorer] -=== Palette +===== Palette The palette provides the various tools you can insert in the report. Simple text, image, table of data, layout table, graph, aggregation, etc. All objects are added to the report by drag & drop. -image:https://cwiki.apache.org/confluence/download/attachments/68720496/Palette.png?api=v2[Palette] -=== Tabs +image::Palette.png[Palette] + +===== Tabs At the right bottom of the window is a series of five tabs. @@ -44,47 +45,52 @@ We will use two: The preview is not accessible because it can not be executed outside of OFBiz. Any changes to the scripts will be erased during the upload in OFBiz. -=== Simple design without break +===== Simple design without break The simplest possible design is to insert in a table (table in the palette), a part or all of the data set data fields. To do this, right-click on Data Set in the Data Explorer \-> Insert in Layout, and then select the fields you want to see appear. -=== Simple design with break +===== Simple design with break A break is a collection of data made by Birt from the data. It permits to classify according to a field, and to give details for each category, then to aggregate certain fields, etc. . Insert a table (Table) in the report \-> OK . Right-click on the table \-> Edit Data Binding, select all fields . In the data set field, change "None" in "Data Set", validate -. Right-click the table \-> Insert Group. Configure your group, eg: image:https://cwiki.apache.org/confluence/download/attachments/68720496/Group.png?api=v2[group] +. Right-click the table \-> Insert Group. Configure your group, eg: image:Group.png[group] . Your table then has five lines: ** A global title line ** A title line of the group ** A group detail line ** A footer of the group ** A global footer line -. Then insert some elements in the design: in the global header, everything that does not depend on the group, for example the title of the report. In the header of the group, everything that is common to the whole group and that you want to see in its title. In the details, the fields that may appear for each group line. As in the image below, the fields might be inserted by Copy/Paste from the Data Set, and titles via a text element of the palette. You can add lines and columns by right clicking on the end of the line (gray rectangle when the table is selected), etc. image:https://cwiki.apache.org/confluence/download/attachments/68720496/Design%20with%20break.png?api=v2[Design with break] +. Then insert some elements in the design: in the global header, everything that does not depend on the group, for example the title of the report. In the header of the group, everything that is common to the whole group and that you want to see in its title. In the details, the fields that may appear for each group line. As in the image below, the fields might be inserted by Copy/Paste from the Data Set, and titles via a text element of the palette. You can add lines and columns by right clicking on the end of the line (gray rectangle when the table is selected), etc. -==== Construction of aggregation +image::Design-with-break.png[Design with break] -The aggregations may be on the whole table, or only on a group. They are characterized by an expression to aggregate (made up of different data fields), a possible filter on the data lines, and an aggregation function, eg: -image:https://cwiki.apache.org/confluence/download/attachments/68720496/Aggregation%20builder.png?api=v2[Aggregation builder] +====== Construction of aggregation -==== Expression builder +The aggregations may be on the whole table, or only on a group. They are characterized by an expression to aggregate (made up of different data fields), a possible filter on the data lines, and an aggregation function, eg: + +image::Aggregation-builder.png[Aggregation builder] + +====== Expression builder The _fx_ (for expression and filter) buttons are used to open a complex expression construction window. It is possible to use predefined functions, Javascript, data fields, already built aggregations, and so on. This window can also be used by including a data element, which allows to construct non-aggregated data expressions. -image:https://cwiki.apache.org/confluence/download/attachments/68720496/Expression%20builder.png?api=v2[Expression builder] -Footer lines often allow you to place aggregations, such as sums on the group or table rows, eg -image:https://cwiki.apache.org/confluence/download/attachments/68720496/Design%20with%20break%20complete.png?api=v2[Design with break complete] +image::Expression-builder.png[Expression builder] + +Footer lines often allow you to place aggregations, such as sums on the group or table rows, eg + +image::Design-with-break-complete.png[Design with break complete] WARNING: any unused line must be deleted, otherwise it generates white spaces on the report. -== Layout Management +==== Layout Management -=== General settings +===== General settings Right button leads to Properties Editor tab at bottom. Then click on the Master Page tab, just above. In the Property Editor you will see a series of general properties that will allow you to modify the general form of the report. -=== Styles +===== Styles By right-clicking on any item in the table, you have access to the menu of styles. From there they can be edited, applied, created. A style can be applied to the whole picture, to a row or column, to a cell, or to an element in that cell (text, data, ...). diff --git a/birt/src/docs/asciidoc/birt.adoc b/birt/src/docs/asciidoc/birt.adoc new file mode 100644 index 000000000..76ad0301e --- /dev/null +++ b/birt/src/docs/asciidoc/birt.adoc @@ -0,0 +1,39 @@ +//// +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +//// += Birt Apache OFBiz® plugin +:imagesdir: ./images +:toc: +:toclevels: 3 + +The birt plugin is one of the OFBiz plugins. + +== OFBiz Flexible Reports +One of the functionalities of the birt plugin are the "OFBiz Flexible Reports" + +NOTE: This feature will begin to be officially available with the R17.12 branch first release + +There is an anounce with some history in the OFBiz blog: https://blogs.apache.org/ofbiz/entry/the-birt-flexible-reports-a[Reporting in Apache OFBiz® and the OFBiz Flexible Reports] + +=== Technical Documentation +include::_include/bt-creating reports.adoc[leveloffset=+1] +include::_include/bt-using the birt report designer.adoc[leveloffset=+1] +include::_include/bt-report master creation.adoc[leveloffset=+1] +=== User documentation +include::_include/bt-how to use flexible reports.adoc[leveloffset=+1] + diff --git a/birt/src/docs/asciidoc/images/Aggregation-builder.png b/birt/src/docs/asciidoc/images/Aggregation-builder.png new file mode 100644 index 000000000..d55f30364 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Aggregation-builder.png differ diff --git a/birt/src/docs/asciidoc/images/Birt-Menus.png b/birt/src/docs/asciidoc/images/Birt-Menus.png new file mode 100644 index 000000000..5d228fe26 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Birt-Menus.png differ diff --git a/birt/src/docs/asciidoc/images/Data-Explorer.png b/birt/src/docs/asciidoc/images/Data-Explorer.png new file mode 100644 index 000000000..870e6708e Binary files /dev/null and b/birt/src/docs/asciidoc/images/Data-Explorer.png differ diff --git a/birt/src/docs/asciidoc/images/Design-with-break-complete.png b/birt/src/docs/asciidoc/images/Design-with-break-complete.png new file mode 100644 index 000000000..0957e5667 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Design-with-break-complete.png differ diff --git a/birt/src/docs/asciidoc/images/Design-with-break.png b/birt/src/docs/asciidoc/images/Design-with-break.png new file mode 100644 index 000000000..a7770aafb Binary files /dev/null and b/birt/src/docs/asciidoc/images/Design-with-break.png differ diff --git a/birt/src/docs/asciidoc/images/Edit-Report-screen.png b/birt/src/docs/asciidoc/images/Edit-Report-screen.png new file mode 100644 index 000000000..5961c47bc Binary files /dev/null and b/birt/src/docs/asciidoc/images/Edit-Report-screen.png differ diff --git a/birt/src/docs/asciidoc/images/Example-Report.png b/birt/src/docs/asciidoc/images/Example-Report.png new file mode 100644 index 000000000..4c89248e7 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Example-Report.png differ diff --git a/birt/src/docs/asciidoc/images/Expression-builder.png b/birt/src/docs/asciidoc/images/Expression-builder.png new file mode 100644 index 000000000..e1212286c Binary files /dev/null and b/birt/src/docs/asciidoc/images/Expression-builder.png differ diff --git a/birt/src/docs/asciidoc/images/Group.png b/birt/src/docs/asciidoc/images/Group.png new file mode 100644 index 000000000..ba10d6cdd Binary files /dev/null and b/birt/src/docs/asciidoc/images/Group.png differ diff --git a/birt/src/docs/asciidoc/images/Palette.png b/birt/src/docs/asciidoc/images/Palette.png new file mode 100644 index 000000000..a4011bc22 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Palette.png differ diff --git a/birt/src/docs/asciidoc/images/Report-Builder.png b/birt/src/docs/asciidoc/images/Report-Builder.png new file mode 100644 index 000000000..bdb82af67 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Report-Builder.png differ diff --git a/birt/src/docs/asciidoc/images/Report-Master.png b/birt/src/docs/asciidoc/images/Report-Master.png new file mode 100644 index 000000000..a60f82f69 Binary files /dev/null and b/birt/src/docs/asciidoc/images/Report-Master.png differ