Ciao Enrico
I tried your idea - very nice! I would very much like to use it.
But it does not work for me because I need to access a NON primary key attribute. As far as I know this is still not possible (although I hope we get this feature soon ![Smile :-)]()
My SQL statement looks like this:
SELECT pc.persons_role_person_id, pc.persons_role_role_id, pc.subject_code, pr.role_id, p.name, cl.number
FROM persons_capabilities pc INNER JOIN persons_roles pr
ON (pc.persons_role_person_id = pr.person_id
AND pc.persons_role_role_id = role_id)
AND pc.persons_role_role_id = 9
AND pc.subject_code = ‘B’
INNER JOIN persons p
ON pr.person_id = p.id
LEFT OUTER JOIN communication_lines cl
ON p.id = cl.person_id
ORDER BY p.name
where I would like to display as 3 horizontal columns the cl.number, which is something like Telefon Private, Telefon Business and eMail private.
Of course, I then would additionally have set a filter, i. e. enhance the SQL statement to just get these numbers (out of others).
But as said, it doesn’t work principally because I can’t add the attribute cl.number to the SELECT stmt.
Any other idea?
BTW; is this method still the only (best) way of showing values horizontally or are there now other possibilities?
Best regards, Robert
automazione:
Yes, probably something like:
var query = "select field_one, field_two from your_table where your_condition"
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, 999999999);
var col_count = 0;
var temp_html = ‘
’ // starts the html string
for ( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ )
{
dataset.rowIndex = i;
temp_html += ‘'; // displays field_one and field_two
if (++col_count == 4)// max 4 values for each row of data
{
temp_html += ‘’;
col_count = 0;// new row of data
}
}
temp_html += ‘
’ + dataset[1] + ’
‘+dataset[2]+’ |
’ // closes the html string