idh63
Posts: 76
|
| Posted: 01/24/2008, 2:22 PM |
|
Hi Folks,
I scanned through the forum looking for a solution here.
I have a report that is working fine. I have been asked to stylize row text based on a circumstance.
for instance; show a font as italic and color of charcole if the date field in the row > $date
I have checked out the help file and read through the tasks example, but that is for a grid.
I cant seem to find a "Before Show Row" for reports.
Anyone know a trick so I can show a row of text in grey, another in green, yet another in blue based on $date value and $status value for a given row?
Thanks
David H.
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 01/24/2008, 7:47 PM |
|
idh63
You could create a field in your query that generates the html content along with the text and display the field on the report as a html field. Here is an example below (look for the if condition in the select part of the query below):
SELECT pmid, project_members.pjid AS project_members_pjid, user_id, memtypeid, activeuser, visiblemember, email,
if(activeuser,"(<font color=Green><b>ACTIVE</b></font>)","(<font color=RED><b>INACTIVE</b></font>)") AS active
FROM project_members INNER JOIN projects ON
project_members.pjid = projects.pjid
WHERE project_members.user_id = {UserID}
AND projects.pj_md = {Expr0}
AND project_members.activeuser = {Expr1}
|
 |
 |
idh63
Posts: 76
|
| Posted: 01/28/2008, 7:41 AM |
|
thanks for your idea.
I have to run calculations on the returned values.
I have a solution for all columns but date columns whick throw an error.
create a variable based on the status in the first column, then refer to that variable and use switch in the other columns before show.
It meant that i had to copy paste same switch statement to five before show columns.
thanks
|
 |
 |
|