Incident Report Template

I just have a little query as regards the new ability in Smart 7 to immediately export an incident/ observation to pdf. This is a great feature, however, I am battling to work out how the current BIRT template is set as regards the ordering of the attributes listed in the observation. The current report BIRT is mixing them up so they are in fact not really making sense. Looking at the images below - the one with the text aligned to the right is the order that the attributes should be in and the one with the text aligned to the left is how it is printing out on the report

Hi @DebbyT - my first thought is to compare to how the attributes are listed in your data model itself. There are several places in SMART where the order defaults to that of the data model, not a configurable model. Can you confirm whether that is the case? If yes - note - there are development tickets in to enhance the ordering flexibility in a future version of SMART.

Hi Drew. The attributes are listed identically in the data model and the config model (ie the way I want them and as makes sense), which is part of my query as there is no available reference, for the incident report BIRT to obtain the order it is currently using, from.

1 Like

Hi @DebbyT - I’m not sure then. Will investigate and get back to you.

Much appreciated :slight_smile: Thank you

Hi @DebbyT

We asked our developer and this is what they said:

" The order is random based on the order it comes out of the database. You can get BIRT to sort attribute names alphabetically.

I’ve included a screenshot of what sorting does and another one with an overview of how to sort alphabetically.

At this time you won’t be able to sort by the datamodel sort order but you could probably use the BIRT “Sorting” option to define a custom order if you write an expression instead of just selecting the column name."

Not sure if this helps.



@DebbyT ,

you can add the expression builder with some script (use fx to activated expression builder)

try this script

var ol = row[“Attribute Name”];
if( ol == “Camera Monitors Role Call” ){
}else if( ol == “Date” ){
}else if( ol == “Estimated Time of incident” ){
}else if( ol == “Details” ){
}else if( ol == “Location” ){
}else if( ol == “Time” ){
}else if( ol == “Hoedspruit CCTV Cameras” ){
}else if( ol == “Action Taken - CCTV Cameras” ){
}else if( ol == “Any Camera Issues to Report” ){
}else if( ol == “Details 2” ){

Here the result example

1 Like

Thank you for this Monica - I use the sorting feature quite often, unfortunately in this instance, sorting them alphabetically still does not help, it is still in essence a “random” sequence without the attributes making sense by following each other in order and one attribute leading to the next. :frowning:

1 Like

Thank you Lili. Really appreciate this. I will give it a try and see if this can come right at all.

Much appreciated

1 Like

is the script work on yout report template?

Hi Lili

Unfortunately it is not the solution I am looking for. If I understand your solution correctly, I need to set this up in a report template, which, if I am creating a report I can then preset it up in the order that I would like it to reflect, however I am looking for solutions to the default BIRT template linked to the new feature found in the - SMART 7 Incidents section. SMART 7 gives you an option to immediately print out a pdf of an incident report without having to run a query, or develop a report template etc - it will simply print out all the info listed in observation/ independant incident. You can find the new pdf option under Field Data → Incident → PDF .
When selecting this option however it currently prints out all the recorded attributes in a random order and not in the order it is set up in the data model nor in the config model and by doing so (in a random order), some of the attributes and the consequential listings do not make sense. There is an option to edit to BIRT to some extent, however, it is not possible to edit the order and also as this is a general BIRT for all and any observations listed, it obviously will not include specifics such as attributes (for obvious reasons as the same BIRT applies to ALL observation types and categories and obviously I will have a certain list of attributes for observation type 1 and a totally different list of attributes for observation type 2, and the same BIRT needs to apply to both observation types. Thus the most convenient way for this feature to be applied is to either inherit the order from the data model or, if at all possible, the best option will be to inherit it from the Config model?
This new feature is a great add, and something I will definitely made use of when I need to share a submitted observation and time is of the essence (ie I dont have time to run it through a pre-setup report template, or create an independant report template - and the accompanying queries - in order to share the observation - I can merely take the recorded information and print it out into a pdf and share as is needed with immediate affect, however, for this new feature to truly be of benefit, the ordering of the attributes needs to be tweaked :slight_smile:

Many thanks

You can edit the default incident report template, there is an option to do that.
My example picture come from the modified default incident report

Thanks, Lili.

Yes, Debby, you can edit the template by going to ‘filed data > independent incident > incident template > edit incident template’.

However, ordering the attributes is not simple as the specific attributes aren’t listed in the template as it is auto-generated based on your specific model. It seems Lili has found a nice way to get around this using the script shared.

Lili, I had a hard time matching up the script to the output (my Bahasa is not so good) but it doesn’t seem the categories in the script match the report (script refers to camera related content whereas the report appears to be a meeting report).

Are you simply using this script and inputting the names of the attribute IDs in the order you want them to appear?

Thanks again.


Hi Alex

I don’t have debby SMART Data model, I just create the script from her screen shoot.

The result example come from different data model.

We just need to use attibute IDs to the script.

1 Like

Thanks, Lili. Sorry, I missed Debby’s initial data model.

Fantastic! I’ll see about including your guidance in a repository for future use.

Thanks again for your contribution.

Debby, could you please let us know if this works for you?



Apologies all - things have just got a bit manic at work and I have a number of serious analysis items I need to get done - I will probably only be able to play around with all of this again in about 2 weeks time. I will get back to you as soon as I am able to give this all some time again and am able to play around and try a few different things

So sorry …