Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
counting data in grig colum
magic_bern
Hi All,<br />
I am not sure if this is possible but i have a risk assessment report that i am putting together where the user inputs yes/no for various question.<br />
<br />
In my report i have categorised the whole risk assessment in section (i.e. notices, documentation, PPE and so on...) so that all the relevant question are under a specific title.<br />
<br />
My problem now is that i need to count how many yes/no i have in each section but all of the info are store in only one row of the database.<br />
so i was wondering if it was possible to do a count for a grid colum like it is possible for a table.<br />
<br />
I am basically trying to count the number of attribute in a grid column with the same value<br />
<br />
a quick example to illustrate what i mean<br />
***************<br />
<span class='bbc_underline'>Statutory & Other notices:</span><br />
Emergency procedure?.................................Y<br />
Company name displayed..............................Y<br />
Insurance Certi...........................................N<br />
PPE available:.............................................Y<br />
.<br />
.<br />
<em class='bbc'>Number of Y................................................3<br />
Number of N................................................1</em>..<br />
<br />
<span class='bbc_underline'>Site Documentation:</span><br />
Is blue book on site?....................................N<br />
Is log sheet up to date?................................Y<br />
are plant diagram.........................................Y<br />
<em class='bbc'>Number of Y................................................2<br />
Number of N................................................1</em>..<br />
.<br />
.<br />
.<br />
.and so on for different sections<br />
<br />
i
Find more posts tagged with
Comments
mwilliams
Hi magic_bern,
Can you set this situation up in a sample report that I can run, either using the sample database or a flat file you can provide? Thanks.
magic_bern
Thank for the help,
I have attached a flat file of what the table structure look like and a birt file for what i am trying to achive.
Berny
magic_bern
Just realised the open method of the report file was not the correct one. here is the updated one.
Thanks
mwilliams
Berny,
What version of BIRT are you using?
mwilliams
Also, what parameters do I need to keep and which ones can I get rid of using a flat file with your design? Let me know.
magic_bern
Actually neither the dates nor the siteid id need to be kept as parameter and can be discarded. but all the column will be needed
mwilliams
Berny,
You may have to change the XML Source file to reflect your version of BIRT and Eclipse to run this as I didn't have 2.1.1, I only had 2.1.3. I computed the Y's, N's, and N/A's for the Statutory section of the report and its section of the totals area. This should help you complete the rest. There is script declaring variables in the initialize script of the report and script in the onCreate of each element that is being counted. You then use these variables to figure the totals and percents. Hope this helps. You'll need to change the file location in the dataSource to wherever you save this flat file. Let me know if you have questions.
magic_bern
Hi Williams,
I have been playing around with the example you posted first understanding the datasource with a flat file and then going through some crazy trial and error for it to work with a maximo datasource and i am thrilled to say that it is now working and doing exactly what i want. Totally sexy...
You are a legend
Thanks again.
mwilliams
Ha. No problem! Glad to help!