{"id":2353,"date":"2015-10-12T15:03:47","date_gmt":"2015-10-12T15:03:47","guid":{"rendered":"https:\/\/twproject.com\/support\/?page_id=2353"},"modified":"2025-10-07T14:17:37","modified_gmt":"2025-10-07T14:17:37","slug":"write-your-own-report","status":"publish","type":"page","link":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/","title":{"rendered":"Write your own report"},"content":{"rendered":"<p>In this section we will describe how to create new Twproject reports using Jasper Reports.<\/p>\n<p>Your project data are carefully collected and maintained by Twproject and this represents one of the most valuable aspect of Twproject adoption.<br \/>\nHow can you extract your data and present it to your users? Actually Twproject has several pages with dynamic filtering capabilities that extract meaningful data, but a customizable reporting systems was missing until version 5.5.<br \/>\nIn this release we have integrated <a href=\"http:\/\/community.jaspersoft.com\/\">Jasper Reports<\/a>, one of the most powerful reporting engine. Jasper reports adds the capability to create your own reports in minutes using an intuitive graphical editor.<br \/>\nReports are integrated with the flexible Twproject security structure in an easy and practical way, without forcing users to write complex query and rules.<\/p>\n<p><a href=\"http:\/\/community.jaspersoft.com\/\"><br \/>\nJasperReports<\/a> is a reporting tool by <a href=\"http:\/\/www.jaspersoft.com\/\">JasperSoft<\/a> (recently acquired by Tibco) widely used by the enterprise oriented Java community.<\/p>\n<p>Reports can be easily designed with the friendly, powerful, free and open-source <a href=\"http:\/\/community.jaspersoft.com\/project\/ireport-designer\" target=\"_blank\" rel=\"noopener\">iReport Designer<\/a> or with <a href=\"http:\/\/community.jaspersoft.com\/project\/jaspersoft-studio\">Jaspersoft Studio<\/a>.<\/p>\n<p>Jasper Studio is the main product and it&#8217;s based on Eclipse. iReport is simpler to configure, but unfortunately will be discontinued soon. If you already know Eclipse interface, use Jasper Studio, otherwise use iReport. Actually the configuration steps are very similar.<\/p>\n<p>For our purposes iReport works perfectly.<\/p>\n<h3>Drivers and classpath<\/h3>\n<p>Once iReport \u00a0is installed the first step is to add database library to the editor.<\/p>\n<p>1)\u00a0 Click on tools-&gt;options and then on \u201cclasspath\u201d tab.<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png\" alt=\"image\" width=\"774\" height=\"410\" border=\"0\" \/><\/a><\/p>\n<p>Database drivers are included on Twproject distribution, you can find them here<span style=\"line-height: 1.5;\">:<\/span><\/p>\n<ul>\n<li><strong>SQL server<\/strong>: [twproject root]\\WEB-INF\\lib\\jtds-1.2.5.jar<\/li>\n<li><strong>My SQL<\/strong>: [twproject root]\\WEB-INF\\lib\\mysql-connector-java-5.1.6-bin.jar<\/li>\n<li><strong>Oracle<\/strong>: [twproject root]\\WEB-INF\\lib\\ojdbc5.jar<\/li>\n<li><strong>PostgreSQL<\/strong>: [twproject root]\\WEB-INF\\lib\\postgresql-9.0-801.jdbc3.jar<\/li>\n<li><strong>HSQLDB<\/strong>: [twproject root]\\WEB-INF\\lib\\hsqldb.jar<\/li>\n<\/ul>\n<p>Click on \u201cAdd jar\u201d button and select the driver for the database you are using.<\/p>\n<p>Then you should also add Twproject classes, in case we need to use some formatting functions.<\/p>\n<p>Click \u201cAdd Folder\u201d and select [twproject root]\\WEB-INF\\lib\\classes folder<\/p>\n<p>Once done we are ready to connect to Twproject database<\/p>\n<p>1) click on \u201cStep 1: Create database connection\u201d<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb1.png\" alt=\"image\" width=\"171\" height=\"208\" border=\"0\" \/><\/a><\/p>\n<p>3) choose Database JDBC Connection<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb2.png\" alt=\"image\" width=\"466\" height=\"391\" border=\"0\" \/><\/a><\/p>\n<p>4) write the name of this connection, \u201cTW5 test\u201d for instance<\/p>\n<p>5) select the right database driver:<\/p>\n<p>insert your server connection data, database name, user and password:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb3.png\" alt=\"image\" width=\"467\" height=\"394\" border=\"0\" \/><\/a><\/p>\n<p>6) test the connection<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image4.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb4.png\" alt=\"image\" width=\"461\" height=\"384\" border=\"0\" \/><\/a><\/p>\n<p>If the connection is fine, we can proceed writing our first report.<\/p>\n<h3>Create your first report<\/h3>\n<p>Click on \u201cStep 2 : create a new report\u201c<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image5.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb5.png\" alt=\"image\" width=\"168\" height=\"198\" border=\"0\" \/><\/a><\/p>\n<p>The report wizard will pop-up. There are many templates:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image6.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb6.png\" alt=\"image\" width=\"756\" height=\"564\" border=\"0\" \/><\/a><\/p>\n<p>Select the one you like the most and \u201cLaunch Report Wizard\u201d.<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image12.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb12.png\" alt=\"image\" width=\"620\" height=\"457\" border=\"0\" \/><\/a><\/p>\n<p>Insert the report name and location carefully: report name and report location are crucial information for integrating Twproject and iReport. Read the dedicated section <a href=\"#repandperm\">below<\/a>.<\/p>\n<p>Click \u201cnext\u201d<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image10.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb10.png\" alt=\"image\" width=\"621\" height=\"456\" border=\"0\" \/><\/a><\/p>\n<p>select your just created data source \u201cTW5 test\u201d; it\u2019s now time to think about the query.<\/p>\n<p>In this example we would like to report time spent by each resource on their projects.<\/p>\n<p>In order to write a query, the knowledge of Twproject data structure is mandatory. Even if table names are quite immediate I suggest to have a look to this section:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/database-structure\/\">https:\/\/twproject.com\/support\/twproject-advanced-usage\/connections\/database-structure\/<\/a><\/p>\n<p>If you are a SQL wizard you can write your query directly, but if you prefer something more \u201cvisual\u201d click on \u201cDesign query\u201d button:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image11.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb11.png\" alt=\"image\" width=\"1029\" height=\"665\" border=\"0\" \/><\/a><\/p>\n<p>Drag the tables you need for your query.<\/p>\n<p>In our case work hours are on twk_worklog table. Worklog records are always linked to an assignment. Assignments create relations between resources and project weighted with a role. So we need to add \u201ctwk_assignment\u201d, \u201ctsk_task\u201d, \u201ctwk_resource\u201d and \u201colpl_role\u201d. The query editor tool will use sql foreign keys for create joins.<\/p>\n<p>Save the query and click \u201cnext\u201d.<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image13.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb13.png\" alt=\"image\" width=\"627\" height=\"456\" border=\"0\" \/><\/a><\/p>\n<p>You can select fields you want to see on your report. In our case we will add them manually. Click \u201cnext\u201d<\/p>\n<p>Here you will define some groups, but this is not mandatory, you can eventually add groups after.<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image14.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb14.png\" alt=\"image\" width=\"625\" height=\"439\" border=\"0\" \/><\/a><\/p>\n<p>Click \u201cnext\u201d and then \u201cfinish\u201d.<\/p>\n<p>Your report \u201cskeleton\u201d is almost ready:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image15.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb15.png\" alt=\"image\" width=\"1168\" height=\"815\" border=\"0\" \/><\/a><\/p>\n<p>Notice that a report has many sections like \u201cTitle\u201d, \u201cpage header,\u201d two group header, details, and then the footer part.<\/p>\n<p>If you click on \u201cpreview\u201d you will see something ugly like this:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image16.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb16.png\" alt=\"image\" width=\"619\" height=\"230\" border=\"0\" \/><\/a><\/p>\n<p>Go back on the designer and let &#8216;s do some changes:<\/p>\n<p>Change title, use project and resource name instead of ids<\/p>\n<p>Drag\u00a0 worklog insertion date, action, and time spent from \u201cfields\u201d area to our report on \u201cdetails\u201d section:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image17.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb17.png\" alt=\"image\" width=\"914\" height=\"349\" border=\"0\" \/><\/a><\/p>\n<p>With these simple change it will look like:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image18.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb18.png\" alt=\"image\" width=\"808\" height=\"298\" border=\"0\" \/><\/a><\/p>\n<p>A little bit better, but:<\/p>\n<ol>\n<li>dates are in a strange format: to fix them, right click on the field and click on \u201cfield pattern\u201d. Choose \u201cDate\u201d and then the format<\/li>\n<li>there are \u201cnull\u201d in case of no description inserted: select the field and from properties box select \u201cBlank when null\u201d<\/li>\n<li>time spent are in milliseconds:\u00a0 in this case you have to use one on Twproject utility function. Right click on the field and choose \u201cEdit expression\u201d then write:<br \/>\norg.jblooming.utilities.DateUtilities.getMillisInHoursMinutes($F{twk_worklog_duration}). This function will transform milliseconds in a Hours:Minutes<\/li>\n<\/ol>\n<p>Here we are:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image19.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb19.png\" alt=\"image\" width=\"807\" height=\"164\" border=\"0\" \/><\/a><\/p>\n<p>Now you may want to have partial sums on group header\/footers. This can be done introducing variables.<\/p>\n<p>In this case we will need a variable for summing worklog on a project group say \u201dsumGroup1\u201d:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image20.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb20.png\" alt=\"image\" width=\"456\" height=\"222\" border=\"0\" \/><\/a><\/p>\n<p>Drag the just created variable on \u201cgroup footer 1\u201d and format the result using \u201cgetMillisInHoursMinutes\u201d function as above:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image21.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb21.png\" alt=\"image\" width=\"772\" height=\"193\" border=\"0\" \/><\/a><\/p>\n<p>You can play with the designer to optimize your report. When you are ready save it!<\/p>\n<h3>i<a name=\"repandperm\"><\/a>Report and Twproject integration<\/h3>\n<p>Once you have your report you can run it inside iReport, directly to the database, but if you want to integrate it in Twproject in the right way (e.g.: respecting security) you have to know some additional detail.<\/p>\n<p>The report we have just created is already available in your Twproject (if you created it in the right place with an unique name <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-style: none;\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/wlEmoticon-smile.png\" alt=\"Smile\" \/>).<\/p>\n<p>To see installed reports go to Admin \u2013&gt; Customizations \u2013&gt; Forms, plugins and reports.<\/p>\n<p>In the \u201cAdditional iReports\u201d section your report should be listed. If not click on \u201creload plugins\u201d button (if \u201cnot\u201d again there is a problem on the report, see logs).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2355\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen977.jpg\" alt=\"screen977\" width=\"1180\" height=\"310\" \/><\/p>\n<p>You should already have a special widget (\u201cReport list\u201d on wp_genericReports.jsp file) installed on your Twproject. Add it to your dashboard if you want to access you reports directly from Twproject.<br \/>\nSee <a href=\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/dashboard-customization\/\">https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/dashboard-customization\/<\/a>\u00a0for create a new portlet\/widget<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image23.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb23.png\" alt=\"image\" width=\"242\" height=\"85\" border=\"0\" \/><\/a><\/p>\n<p>The widget is already filled with your reports just because you are administrator otherwise it will be empty until you assign the correct permission as described below.<\/p>\n<p><span style=\"line-height: 1.5;\">But who can run these reports? How reports are secured in Twproject?<\/span><\/p>\n<p>Report names are used for generating a permission you must select\u00a0to grant access to a report, this is why they must have unique meaningful names.<\/p>\n<p>Every report extends the standard Twproject role based implementation adding a special permission, one for each report. These permissions can be assigned to a role exactly like the standard ones, both at global level or at project level.<\/p>\n<p>Here the role editor extended with report permissions:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2357\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/screen978.jpg\" alt=\"screen978\" width=\"1194\" height=\"161\" \/><\/p>\n<p align=\"right\">For a deep discussion on Twproject security see: <a title=\"https:\/\/twproject.com\/support\/introduction-security\/\" href=\"https:\/\/twproject.com\/support\/introduction-security\/\" target=\"_blank\" rel=\"noopener\">https:\/\/twproject.com\/support\/introduction-security\/<\/a><\/p>\n<p>Once you added a report permission to a role, that report will be visible to the users with that role.<\/p>\n<p>That said, in order to integrate JasperReports with Twproject we have to take care of security and data visibility.<\/p>\n<p>Accessing the database directly from the report engine can be acceptable for some \u201chigh level\u201d reports, but as you know, Twproject security model is very flexible, allowing to see only an allowed set of data for each user. How can be possible to create a report that respect Twproject security model without writing complex queries?<\/p>\n<h3>Report location and security<\/h3>\n<p>We worked hard to solve this problem and we found an easy and practical solution.<\/p>\n<p>First of all we divide reports in \u201cglobal\u201d and \u201centity related\u201d.<\/p>\n<p>Global reports are the most flexible and easy to build (like the one just created); they can use any kind of data from Twproject: project, worklog, resources or ToDo, without restriction.<\/p>\n<p>Global reports will test security at global role level only: in the worst case who can access the report can read its data (e.g project and costs), even if she\/he doesn\u2019t have access to \u201cprojects\u201d the data comes from.<br \/>\nIf your reports show sensible data, grant access to them wisely.<\/p>\n<p>As you (should <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-style: none;\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/wlEmoticon-smile.png\" alt=\"Smile\" \/> ) know, Twproject security uses at top level the concept of \u201csecurity area\u201d (see here for details: <a title=\"https:\/\/twproject.com\/support\/areas\/\" href=\"https:\/\/twproject.com\/support\/areas\/\">https:\/\/twproject.com\/support\/areas\/<\/a>). Having the permission to see \u201creport x\u201d on \u201carea 1\u201d doesn\u2019t mean you can see the same report on \u201carea 2\u201d. To solve this problem, Twproject passes to the report the list of areas where you have that permission. You should use that list to filter report data showing, for instance, only project\/resources\/ToDos\/worklog from \u201carea 1\u201d and not from \u201carea 2\u201d. We will explain how to use that parameter in the following.<\/p>\n<p>Entity related reports, instead, are related to a main Twproject entity such as project, resource, ToDo and the access is tested object by object, singularly.<\/p>\n<p>Twproject cannot inspect the report and \u201cguess\u201d if it is \u201cglobal\u201d, related to projects, to ToDos and so on; you have to instruct Twproject about report contents by putting it on a folder structured as follows:<\/p>\n<p><a href=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image9.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb9.png\" alt=\"image\" width=\"591\" height=\"121\" border=\"0\" \/><\/a><\/p>\n<p>where \u201cACME\u201d is your company name.<\/p>\n<p>So the reports on the \u201creport\u201d root are considered \u201cglobal\u201d while the ones in \u201cToDo\u201d, \u201cresource\u201d, \u201cproject\u201d or \u201cworklog\u201d folders are considered related to the corresponding Twproject entity.<\/p>\n<p>Entity report are shown on entity list pages such as projectlist, resource list, worklog analysis and so on.<\/p>\n<p>Entity related reports will be accessible using the print menu on each section (project, resource, ToDos, worklog):<\/p>\n<p>Entity reports will receive from Twproject the<strong> list of entity\u2019s ids currently visible<\/strong> on the page on those you have permission to see that report.<\/p>\n<p>A clarifier example: If you are today involved on two project, one as \u201cproject manager\u201d and another one as \u201cworker\u201d, the project list page will show you both projects .<\/p>\n<p>Consider that by default, as PM, you can see project costs, but as worker you cannot. If you&#8217;ve created a report for cost analysis, you will give the access to that report to PMs only.<\/p>\n<p>Building the set of ids for the report, Twproject will check entity by entity if you are allowed to se it, and in this case, project where you are assigned as worker, will be filtered out.<\/p>\n<p>Summing up the report will apply to entities that match filter (today projects) and security constraint.<\/p>\n<p>The list of allowed entities is passed to your report, but you have to use it!<\/p>\n<p>Reports will receive the following parameters:<\/p>\n<ul>\n<li>global reports: AREA_IDS<\/li>\n<li>project reports: TASK_IDS e TASK_DESCENDANTS<\/li>\n<li>resource reports: RESOURCE_IDS e RESOURCE_DESCENDANTS<\/li>\n<li>ToDo reports: ISSUE_IDS<\/li>\n<li>worklog reports: WORKLOG_IDS<\/li>\n<\/ul>\n<p>Use these parameters in your report as follow.<\/p>\n<p>For a global report you should add to the query something like:<\/p>\n<blockquote><p><strong><span style=\"font-family: 'Courier New';\">$X{ IN ,twk_task.area,AREA_IDS}<\/span>\u00a0<\/strong><\/p><\/blockquote>\n<p>eventually in \u201cAND\u201d with other clauses.<\/p>\n<p>For entity related reports add something like:<\/p>\n<blockquote><p><strong><span style=\"font-family: 'Courier New';\">$X{ IN ,twk_worklog.id,WORKLOG_IDS}<\/span><\/strong><\/p>\n<p>or<\/p>\n<p><strong><span style=\"font-family: 'Courier New';\">$X{ IN ,twk_task.id,TASK_IDS}<\/span><\/strong><\/p><\/blockquote>\n<p>Twproject comes with several reports that you can use as starting point. (If you copy an existing report remember that you have to change both file name and \u201creport name\u201d property in iReport)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by Twproject and this represents one of the most valuable aspect of Twproject adoption. How can you extract your data and present it to your users? Actually Twproject has several pages with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2309,"menu_order":50,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2353","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Write your own report | Twproject support<\/title>\n<meta name=\"description\" content=\"In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Write your own report | Twproject support\" \/>\n<meta property=\"og:description\" content=\"In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by\" \/>\n<meta property=\"og:url\" content=\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/\" \/>\n<meta property=\"og:site_name\" content=\"Twproject support\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/twproject\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-07T14:17:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/\",\"url\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/\",\"name\":\"Write your own report | Twproject support\",\"isPartOf\":{\"@id\":\"https:\/\/twproject.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png\",\"datePublished\":\"2015-10-12T15:03:47+00:00\",\"dateModified\":\"2025-10-07T14:17:37+00:00\",\"description\":\"In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by\",\"breadcrumb\":{\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#primaryimage\",\"url\":\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png\",\"contentUrl\":\"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png\",\"width\":774,\"height\":410},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/twproject.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced usage\",\"item\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Customization\",\"item\":\"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Write your own report\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/twproject.com\/support\/#website\",\"url\":\"https:\/\/twproject.com\/support\/\",\"name\":\"Twproject support\",\"description\":\"Twproject documentation online\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/twproject.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Write your own report | Twproject support","description":"In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/","og_locale":"en_US","og_type":"article","og_title":"Write your own report | Twproject support","og_description":"In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by","og_url":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/","og_site_name":"Twproject support","article_publisher":"https:\/\/www.facebook.com\/twproject","article_modified_time":"2025-10-07T14:17:37+00:00","og_image":[{"url":"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/","url":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/","name":"Write your own report | Twproject support","isPartOf":{"@id":"https:\/\/twproject.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#primaryimage"},"image":{"@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#primaryimage"},"thumbnailUrl":"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png","datePublished":"2015-10-12T15:03:47+00:00","dateModified":"2025-10-07T14:17:37+00:00","description":"In this section we will describe how to create new Twproject reports using Jasper Reports. Your project data are carefully collected and maintained by","breadcrumb":{"@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#primaryimage","url":"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png","contentUrl":"https:\/\/twproject.com\/support\/wp-content\/uploads\/2014\/06\/image_thumb.png","width":774,"height":410},{"@type":"BreadcrumbList","@id":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/write-your-own-report\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/twproject.com\/support\/"},{"@type":"ListItem","position":2,"name":"Advanced usage","item":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/"},{"@type":"ListItem","position":3,"name":"Customization","item":"https:\/\/twproject.com\/support\/twproject-advanced-usage\/customizations\/"},{"@type":"ListItem","position":4,"name":"Write your own report"}]},{"@type":"WebSite","@id":"https:\/\/twproject.com\/support\/#website","url":"https:\/\/twproject.com\/support\/","name":"Twproject support","description":"Twproject documentation online","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/twproject.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages\/2353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/comments?post=2353"}],"version-history":[{"count":0,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages\/2353\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/pages\/2309"}],"wp:attachment":[{"href":"https:\/\/twproject.com\/support\/wp-json\/wp\/v2\/media?parent=2353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}