CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Report Rows and font style color customization - How?

Print topic Send  topic

Author Message
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.
View profile  Send private message
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}   
View profile  Send private message
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

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.