newbie
Posts: 2
|
| Posted: 05/22/2011, 6:24 AM |
|
Hi i found a employee grid like this :
Quote :http://www2.bbpp-lembang.info/bbdah_online/si/sdm_balai/dashboard.php
Dashboard.php, This grid classified according to every table field values and counted..So I thought if it's right, it was made by using Report Builder of each table field value and counts how many value are they in the next column and the table value hyperlinked to the main grid of the employee.
Is that right ?
|
 |
 |
andy
Posts: 183
|
| Posted: 05/22/2011, 2:21 PM |
|
Yes. That what it looks like.
I'm not an Indonesian speaker but right column is usually "Total" with some aggregated total fields at the bottom.
They have converted the main element in each row to a link to link back to the source table.
Each report is a report on employees filtered by marital status / religion / grade...
Hope that helps
N.B. I am just surmising the above. It's not my project !!
_________________
Andy
RAD tools for rich UI controls:
http://www.koolphptools.com |
 |
 |
newbie
Posts: 2
|
| Posted: 05/22/2011, 7:43 PM |
|
Thanks andy for the answer..
However i can;t find the way to make grid to classified of the table field value and count the number of the field value on the next colomn and put the total below like the one example shown..
For example i have table "training" for Training users database and inside one of the field have "training_type" which the value are example Web Design, Web Programming, etc..
What i want is classified of the "training_type" and list display how many value field exist without duplicate and calculate in the right colomn and put total underneath
|
 |
 |
andy
Posts: 183
|
| Posted: 05/23/2011, 1:25 AM |
|
The Report builder allows you to firstly add fields to your report then aggregations (e.g. count, sum, max, min, avg), which will provide summary info on any of the fields at the foot of the report or report group.
If that doesn't go far enough then you can include some aggregation in your SQL query that the report is based upon as the data source and define your aggregation as an alias. You then include this alias in the group or report footer as another aggregation.
Very basic example:
SELECT
Field1,
Field2,
training_type,
COUNT(training_type) total_training_type,
Field3
FROM training
The alias "total_training_type" is then available in your report. Obviously you will have to adjust the SQL query to suit your requirements.
If you want to do some clever things in presenting your data in particular ways, it is often best to do all the hard work in your SQL query (or use a VIEW to combine fields from different tables) rather than using BeforeShow events.
Hope that helps...
_________________
Andy
RAD tools for rich UI controls:
http://www.koolphptools.com |
 |
 |
datadoit
|
| Posted: 05/23/2011, 6:51 AM |
|
Also faster to do as much of the logic from the DB side.
|
|
|
 |
|