HowTo develop a new report: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
(Explain by exanple how to develop a new report)
 
No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== HowTo develop a new report ==
== Example ==
This page uses the "Partner by City" as an example.


Timo I don't know if half these files are generated or manually created.
== Report Definition ==
So I thought I describe what I found and let you document it, please?
* this is for the sql queries and instructions how to calculate and render the report
This is also my first post to a wiki, so I need to leran/work/improve on presentation as well. Will do that after lunch.
* create new html report file in XmlReports/Partner/partnerbycity.html. See https://github.com/openpetra/openpetra/blob/master/XmlReports/Partner/partnerbycity.html


== GUI Definition ==
* this is for defining how a screen should look like that presents all parameters of the report to the user
* see https://github.com/openpetra/openpetra/blob/master/js-client/src/forms/Partner/Reports/PartnerReports/PartnerByCity.html
* see https://github.com/openpetra/openpetra/blob/master/js-client/src/forms/Partner/Reports/PartnerReports/PartnerByCity.json


* Example:
== Data Calculation ==
** Partner by City
For calculation of the data, see this class:
** create new xml report file in U:/XmlReports/Partner/partnerbycity.xml
** is there a template or generator for the new xml file?
** create new xml U:/XmlReports/Settings/Partner/Partner by City/standard.xml


** create new entries in existing yaml file in U:/csharp/ICT/Petra/Client/lib/MPartner/gui/PartnerMain.yaml
* https://github.com/openpetra/openpetra/blob/master/csharp/ICT/Petra/Server/lib/MReporting/MPartner/PartnerByCity.cs
** in section:
          mniReports:
              Label: &Reports...
              mniReportPartnerByCity: {Label=&Partner By City Report (experiment), ActionOpenScreen=Ict.Petra.Client.MReporting.Gui.MPartner.TFrmPartnerByCity)


** ??TODO?? U:/csharp/ICT/Petra/Client/lib/MPartner/gui/PartnerMain.cs
== Navigation ==
** ??TODO?? U:/csharp/ICT/Petra/Client/lib/MPartner/gui/PartnerMain.Designer.cs
* see https://github.com/openpetra/openpetra/blob/master/js-client/etc/UINavigation.yml#L38


** create new yaml file for report in U:/csharp/ICT/Petra/Client/lib/MReporting/gui/MPartner/PartnerByCity.yaml
<pre>
** is there a template or generator for the new yaml file?
        Partner: {fa-icon=address-book, PermissionsRequired=PTNRUSER}
** ??TODO?? U:/csharp/ICT/Petra/Client/lib/MReporting/gui/MPartner/PartnerByCity.cs
                Partners:
** ??TODO?? U:/csharp/ICT/Petra/Client/lib/MReporting/gui/MPartner/PartnerByCity.Designer.cs
                    AddNewFamily: {Form=MaintainPartners, Action=NewFamily, fa-icon=user-plus}
 
                    AddNewOrganisation: {Form=MaintainPartners, Action=NewOrganisation, fa-icon=folder-plus}
** some brief explanation here on what the different nant cmds do?
                    MaintainPartners: {fa-icon=user}
** which files does it read in relation to this new report?
                    ImportPartners: {fa-icon=file-import}
** and which files does it auto-genereate in relation to this new report?
                    Reports: {Path=Partner/Reports/PartnerReports}
** which paramters does nant need (if any) ?
                        PartnerByCity:
** nant generateGlue
                        PartnerBySpecialType:
** nant generateGTK
                        PartnerBySubscription:
** nant generateWinforms
                        AnnualReportWithoutAnnualReceiptRecipients:
** nant generateWinform
</pre>

Latest revision as of 21:27, 2 December 2024

Example

This page uses the "Partner by City" as an example.

Report Definition

GUI Definition

Data Calculation

For calculation of the data, see this class:

Navigation

        Partner: {fa-icon=address-book, PermissionsRequired=PTNRUSER}
                Partners:
                    AddNewFamily: {Form=MaintainPartners, Action=NewFamily, fa-icon=user-plus}
                    AddNewOrganisation: {Form=MaintainPartners, Action=NewOrganisation, fa-icon=folder-plus}
                    MaintainPartners: {fa-icon=user}
                    ImportPartners: {fa-icon=file-import}
                    Reports: {Path=Partner/Reports/PartnerReports}
                        PartnerByCity:
                        PartnerBySpecialType:
                        PartnerBySubscription:
                        AnnualReportWithoutAnnualReceiptRecipients: