| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/07/2009 04:05:56
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
Hi,
I've created a new type of usercomment as you recommended http://mango.serotoninsoftware.com/forum/posts/list/120.page
I am including usercomments in reports much the same way you've included events; as a seperate CSV file or an additional table at the bottom.
I'm selecting any usercomments made during the reporting period, such as those made on points and events, as well as my 'chat' type. I see in the reportChart.ftl template there is code there to display usercomments on events. The usercomments are loaded through EventDao.attachRelationalInfo but this isn't called when the events are loaded from the reportInstanceEvents table.
the purpose of the reportInstance tables is so that the data behind the report doesn't disappear if the point or event data is purged right?
Since the template is ready to print out usercomments on events in reports, I was wondering if you are planning on including the usercomments in reports in a future version?
Cheers
C
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/07/2009 12:11:58
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
The reportinstance table does that, yes, but it also allows reports to be generated asynchronously. I.e. when you request a report, you don't have to let your browser wait the potentially long time to have it generated - it's done in the background. Whenever you want to view the report, you get it instantly (or as instantly as possible).
To have your user comments handled similarly, you should create a reportcomments or some such table, and have it populated by the report generation process.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/09/2009 16:21:44
|
craig
Initiate
Joined: 06/08/2007 16:50:46
Messages: 144
Offline
|
I have added the table:
And then in ReportDao.java, code to select comments from the userComments table and add to reportInstanceUserComments
and then to select the comments from the reportInstanceUserComments table for inclusion when the report is being displayed:
and a class to represent comments in the report
Seems to be working well enough, comments made in the chat, on events, on points, or on pointvalues are included in reports.
The complete patch is http://216.235.5.146/apache2-default/reportscope-2009-09-20.zip
|
|
|
 |
|
|
|
|