.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

conditional formatting reports

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
how do you contitionally format a value to look like a hyperlink if a condition exists

View Complete Post

More Related Resource Links

Conditional Sum in Crystal Reports

I need to sum (count ) no records based on codition how can do that

Conditional Formatting

Hi I've recently published a web database from Access into a Sharepoint site using Access Services and my conditional formatting has not come through.  Looking at the help system, it states that conditional formatting is a desktop only feature in Access. Can someone just confirm definitely for me that this is their understanding that it's not available, even in Access 2010, as I've been asked to check?  Is there any other way to get conditional formatting to appear in a report within the web database? Thanks Nickie

Conditional formatting on a joined subview using SharePoint Designer 2007 does not work

I have 2 SharePoint lists, one is a parent task list and the other a child task lists.  In SharePoint Designer 2007 I have created a combined datasource from these 2 lists.  From there I created a new ASPX page inserting the parent list as a dataview and the child as a subview.  So far so good, all is functioning as you would expect.    Now I need to apply conditional formatting to cells and rows in both the parent and child lists.  I can create a very simple condition on a row or cell of the parent list such as "If ID Equals '2988' format the background color as green" but no conditional formatting appears for the row where ID = 2988.  Incidentally, if I change the condition to "not equals 2988" the background changes to green. The line in the code view of Designer appears as follows:  <xsl:if test="../../../Rows/Row/@ID = '2988'">background-color: #00FF00;</xsl:if> I've seen this question asked here and in blogs but never answered.  If anyone has a solution, I would love to know what it is. Thanks; Dave  UPDATE:  it doesn't seem to matter if you add the additional fields as a joined subview or not.  If I add 2 data views, both using the linked data source which is configured to JOIN the contents of the data sources the conditional formatt

Applying conditional formatting to the 'AssignedTo' column does not work in a data view using Shar

This one is throwing me for a loop.  I've joined two lists using "Linked Sources" in SharePoint Designer.  On a new ASPX page I added a data view and added 3 columns (Title, Priority and AssignedTo) as a multi-Item view.   I can select a row and apply conditional formatting to the Title field (changing the background color if @title = 'Parent 1') and the changes are displayed in the design pane.   The only oddity there is that I have to go back and edit the condition in advanced mode, changing the XPath expression from ../../../Rows/Row/@Title = 'Parent 1' to @Title = 'Parent 1'  and then it seems to work just fine. Here's the problem.  I want the condition applied to the AssignedTo column (hide row if 'AssignedTo != 'John Doe')  If I create a condition to hide contents if the AssignedTo = 'John Doe' it creates the XPath expression ../../../Rows/Row/@AssignedTo = 'John Doe'.  When I save it, the row is still visible.  If I edit the XPath expression, changing it to @AssignedTo = 'John Doe' and save it the row is still visible.  The same is true if I simply try to change the background color, conditionally formatted  against the AssignedTo column. Does anyone have any ideas here?              

SSRS 2008: Multiple Sub-Reports with conditional visibility in one List control


MainReport: a List containing two Sub-Reports. The data of the List only has two rows. Set the visibility of the sub-report based on the data.

SubReport1: a textbox showing "Sub Report 1"

SubReport2: a textbox showing "Sub Report 2"

I expect to see SubReport1 in Page 1 and SubReport2 in Page 2.

But I only see SubReport1 in Page 1 and Page 2 is a blank page.

These reports work in SSRS 2005, but not in SSRS 2008.



Report Definition:



<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner

Sharepoint Designer - Conditional Formatting Problem


I've been creating some basic conditional formatting scenarios using Designer ... but I'm very new to this and need help with two topics that I can't get to work.

Problem 1:

When my condition criteria is met I want to display a graphic in the background, but the left of the actual text for that column. 

Example: I have a list of orders and when the priority column says rush, I want to display a small graphic to the left of the text for that column and shift the text to the right by the width of the 40 pixel graphic.  I've looked through all the different settings in the "modify style" dialog box and have used trial and error, but the darn graphic keeps displaying behind the text only. UGH!  I've been working on this for 2 hours now and can't figure it out. 

Can someone tell me what parameters to set so the text is shifted to the right 40 pixels so the background that is left justified is visible?


Problem 2:  

In this case, I can't figure out how to write the formula to tell   If  [DUE DATE] is less then 5 days from today I want the background cell to change color. I know how to change the color, but can't figure out the formula for the life of me.  Can someone give me the formula? 

Here's what I tried using in the xpath advanced

SP Designer 2010 Conditional Formatting with Hidden Values/Columns


I have a list with 30~40 columns. I want to do conditional formatting on it using SharePoint 2010 Designer (instead of creating a visual webpart with vs2010).

Of the 30-40 columns, i am only viewing 5 columns that i need (ie: first name, last name, etc...)

I can create the XSLT ListView Webpart on the page within SharePoint 2010. I can edit it with SharePoint 2010 Designer, i can also apply conditional formating to the row (ie: select row within XSLT webpart > Options > Conditional Formatting).

However, i cannot apply the conditional formatting too columns that are not listed in the <ViewFields> of the <XmlDefinition>. What gives? I want to do conditional formatting on the entire row of the item using the hidden ten or so columns and i don't want the user to see all the columns, but i want to do conditional formatting on them (its for æsthetics reasons, i don't want a grid list of 15+ columns on someones poor 1024 by 768 resolution/monitor... plus they don't need to see it until they click into the list item....)


<FieldRef Name="SomeColumnName" Hidden="True" /> does not work
<FieldRef Name="SomeColumnName" ReadOnly="True" /> does not work either

Conditional formatting on dates not updating until 7am


I have a strange issue when applying conditional formating to my list.  The condition I have set is that an item will change color if a date column = current day.   The strange thing that happens is that the color doesn't change until 7am PST.  It is as if Sharepoint sees it as yesterday until 7am. 

I have verfied that the time settings on the computer are correct.

Any help would be much appreciated.



Conditional Formatting - Verify a number of check boxes have been checked before showing a button?


I would like to Hide a Submit button until all the check boxes are equal to true? How would I go about verifying all boxes equal true?

WPF Datagrid conditional formatting



I am using wpf datagrid listing more than 50000 of records. I want to highlight only few rows in the grid based on the data binded to the grid. Definitely, I can't loop through this many records. Is there any other way where we can change the background of the rows through binding?

Thanks in Advance!!!!

Best regards,
Subalakshmi Vijayarajan.

Subalakshmi Vijayarajan.

Conditional formatting where 7 days old



This code formats the column where the Modified date is less than todays date

          ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Modified))) < ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today)))

What I want it to do is format the column where the last modified date is greater than 7 days ago... i.e has not been modified for 7 days.

How to do Conditional Formatting based on List Rating (0-5)?

I have a list that houses Knowledge Base articles. I have the view style setup as a Preview Pane so people can just hover over the titles and quicky glance at the body of the article. Each article has the Rating (0-5) and I would like to setup Conditional Formatting where articles rated higher than 4 will have size 14 font Title and articles rated lower than 2 may have size 10 font Title. I've set my condition as @AverageRating > 4.00 but nothing changes in the Preview Pane. Am I doing something wrong?

Apply conditional formatting to TD instead of to the actual data?


I am trying to assign conditional formatting to a table cell, just like what happens in Excel's conditional formatting.

In SPD 2010, I can select the cells in a column by clicking within a single cell in a column (the white td tooltip pops up and all cells are highlighted) or I can select the actual data items by more carefully clicking on the data instead of the cell's white space (xsl:value-of tooltip pops up and only the data itself is highlighted--not the entire cells).

In the Conditional Formatting task pane, with either the tds or the data items selected, I can use the Create drop down and make a new Apply formatting... condition. The strange thing is the condition never gets added to Existing conditions in the Conditional Formatting task pane if I have the td selected. However, the condition does appear if I have the xsl:value-of selected.

Why can I apply conditional formatting to the values but not to tds?

Conditional formatting not working as expected in SSRS report


I am trying to display conditional fill on a report in SSRS on SQL Server 2008. Looking at Fields!MS_Communicator.Value, desired fill to be SeaGreen if version build is >= 83, Tomato if < or [Not Installed]. Query provides either [Not Installed] or the version number (i.e. 3.5.6907.83).

=(IIF((Split(Fields!MS_Communicator.Value, ".")).GetValue(3) >= 83, "SeaGreen", "Tomato")) works as expected, leaving cells with [Not Installed] transparent.

=IIF(Fields!MS_Communicator.Value = "[Not Installed]", "Tomato", "Transparent") works as expected, leaving cells with version transparent.

My problem:

=IIF(Fields!MS_Communicator.Value = "[Not Installed]", "Tomato", (IIF((Split(Fields!MS_Communicator.Value, ".")).GetValue(3) >= 83, "SeaGreen", "Tomato"))) works if there is a version number, but leaves cells with [Not Installed] transparent.



SharePoint Calculated Columns with Conditional Formatting

I am working on a custom list in SharePoint 2007. I have a calculated column that is formatted as a percentage. When opened in SP Designer and converted to a XSLT data view to apply conditional formatting, the column is rendered as text and not numeric which is a known issue with SharePoint. How can I apply formatting to this column and render it as a numeric value? My conditional formatting relies on If x is <= y then apply yellow and so forth so it has to be read as a numeric value. I have attached the conditional formatting code as well as the format of the data property. Any help would be appreciated.
<TD Class="{$IDAS4QMC}">
																<xsl:attribute name="style">
		<xsl:if test="@_x0025__x0020_Variance_x0020_C &gt; '-.11' and @_x0025__x0020_Variance_x0020_C &lt;= '0'">background-color: #00FF00;</xsl:if>
		<xsl:if test="@_x0025__x0020_Variance_x0020_C &gt;= '.1'">background-color: #FF0000;</xsl:if>
		<xsl:if test="@_x0025__x0020_Variance_x0020_C &lt; '-.11' or @_x0025__x0020_Variance_x0020_C &gt; '0'">background-color: #FFFF00;</xsl:if>
		<xsl:if test="@_x0025__x0020_Variance_x0020_C &gt;= '-.11' an

Conditional Formatting in Custom Newform Based on Value in Different List


Hi All,

Running MOSS.

I have two lists: one with Upcoming Events as items, and one for Registrants. They are tied by an Event ID (as a common field) that we create for each event. An event may or may not have a fee associated with it; the fee is a column in the Upcoming Events list.

When someone signs up for an Event, I have customized a version of Newform to collect information for the Registrants list. I have fields for Cardholder payment information in the Newform1, which I would like to hide if the fee in the Upcoming Events list equals zero. I have looked at Conditional Formatting, but don't see a way to look outside of the Registrants list for the info.

I have read about event receivers, but I don't know or have Visual Studio. I was thinking about a workflow, but the registrants may be unauthenticated users (anonymous), which creates an error page to those users when workflows are triggered. I have seen discussions of javascript solutions as well, but they tend to be somewhat off-base and they go into areas that lose me.

The Event ID gets populated to the Registrants list via some custom coding done by someone else (who is no longer available to be consulted). If condtional formatting based on a value in a different list is not possible, I would be interested in any ideas to popu

Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend