Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to change the font color or display in a select statement 2

Status
Not open for further replies.

LMGroup

MIS
Apr 10, 2006
85
CA
I'm using SQL Server 2005 and have written a query to be used in a 3rd party software package. I'd like to be able to either change the way the data displays, either by bolding it or changing the color, when a certain field is used. Is this possible?

This is part of the code. If the first condition of the CASE statement is true, I'd like the data to print differently from the other conditions.

Code:
SELECT	OpenJob.JobN, OpenJob.JobN as 'Job', 
		      OpenJob.CustomerN as 'Cust', 
		      OpenJob.JobDescription as 'Description', 
		      convert(varchar(5),OpenJob.DueDate,101) as 'Due', 
		      CASE WHEN (CT_OTD.FilesInA <> '1/1/1900 12:00:00 AM') THEN convert(varchar(5),CT_OTD.FilesInA,101)
			   WHEN (CT_OTD.FilesInR <> '1/1/1900 12:00:00 AM') THEN convert(varchar(5),CT_OTD.FilesInR,101)
			   WHEN (OpenJob.EarliestStartDate <> '1/1/1900 12:00:00 AM') THEN                                    convert(varchar(5),OpenJob.EarliestStartDate,101)
			   ELSE ' '
		      END as 'File',
FROM {oj Company.dbo.OpenJob OpenJob LEFT OUTER JOIN Company.dbo.CT_OTD CT_OTD ON OpenJob.JobN = CT_OTD.JobN}
WHERE (CT_OTD.Late = ' ') AND (OpenJob.ProdPlanner=100)
ORDER BY OpenJob.JobN

Thanks for any help!
 
SQL Server is really just data. That's it. End of story.

If you want to display the data a certain way, then it's really up to the "display" layer. Bottom line... is there a way to make the 3rd party app display the data differently? If so... how is this done?

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Unfortunately, it's a simple dashboard tool that relies on the query to tell it what to do. It doesn't have any formatting capabilities of its own. I was afraid that this would be the answer. Thank you for replying so quickly.
 
If you want to present this in a table with some specific formatting depending on values returned by the query you can check this viewer :
This is not a dashboard. It can show just one grid and chart as it is shown on this screenshot:
You can see a screenshot how the data is presented with formatting here :

If the tool might work for you can request a free license from this link:

Viewer and Scheduler for Crystal reports and SSRS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top