.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

Change color to a field when another field is the same

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :Sql Server

I have a report that uses a field called PO Number.  What happends is via data entry error a PO number could end up on a report twice, 1 correct and 1 incorrect, and what i want to do is if a PO number is on a report twice to highlight it red. 

po number
123456 and 123456(should be123457) is on a report twice to color the text red. 

any help on this is great appreciated.  Thanks

View Complete Post

More Related Resource Links

Change Color to a field if it is the same as another field on report...


I have a report that has a PO field on it.  SOmetimes because of data entry error the PO can show up on the report twice, 1 correct 1 incorrect.  So what im trying to do is if it shows up twice to change the color to both to RED. 


So if PO 123456 is on a report and so is 123456(should be 123457) change text color for both RED.  This would flag the use running the report that These Load associated with these 2 PO numbers need attention. 


any help would be great thanks. 

Coloring sql reporting services report depending on the change of value of a certain field

Hey guys, I have an SSRS report that looks something like this: Column1 Column2 Row1 2 A Row2 2 B Row3 2 C Row4 6 A Row5 11 E How can I color the rows with the same value in Column1 with the same color? for example Row1 to Row3 would have one color, Row4 would have a different color, then I'd go back to Row1's color for Row5? note: I don't know in advance the numbers returned in Column1. I query for them and then I hide them from the user so Column1 shouldn't show on the report, but I want to use it for the coloring only.

changing font color on a data column field based on the contents

I am trying to change font color if the datafield has the string EMERGENCY. This is my original template field: <asp:TemplateField HeaderText="Type" SortExpression="DigType"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </ItemTemplate> </asp:TemplateField>   and this is what I thought would work: <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval("DigType")="EMERGENCY","Black", "Red") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval(&quo

How to change the value of a foreign key field/navigation property?

How can I change the value of a foreign key field?  E.g. in the Product list view instead of the value of the field Supplier.CompanyName I want to display the Supplier.Region. I searched my whole code to get a clue, googled for "change navigation property" and looked in the docs but unfortunately I did not find any hint. If you know where to find the answer, please let me know too the source of your knowledge!          

How to change the look up field "Category" in Posts a required field

This is for a SharePoint 2010 Blog site. Is it possible in SharePoint 2010 to change the look up field "Category" for Posts as a required field?  I can create a new look up field and specify that as a required field but don't have an option to make the column "Category" as required. 

Excecution of wait for field change in current item action

Hi everybody, I've an SharePoint designer WorkFlow with two simple actions: wait for field change in current item (wait for the aproval status was approved) update item list(set a value to a field in the current item) how immediate is the execution of an workflow like this by the WF Runtime engine?, how it works? would be possible that WF runtime engine take time to execute this tasks, how much is waranteed acording the WF architecture? The Previous question becouse this solution is composed by an smart document and a workflow: -A workflow that have to copy the aproval status  to a field when this was aproved. -The document have to detect the change on the field value(seted by the workflow) when the document is closed by the user(this action could be executed just after the user approve). In conclusion the document depends from the workflow execution to detect the change, if the workflow were not executed "immediately" document actions would not be executed when the document were closed. by the above I need to know how reliable is this workaround and make a choice, this workaround or an event handler controling the itemupdating event(synchronous event) to do the tasks made by the workflow. Suggestions are welcome! PD and Background: The smart document(with managed code) is the template associated to the content type in a document library. The Current

how to change the view of SharePoint List based on field?


hi all,

I have different sites in my sharepoint application. in every site i have one list, this list have one field called location. When i open this list in purticular site at the time users  will see only the items where the location filed is equal to the site name.

So please suggest me how we can achieve this?



How programmatically change Additional Column Settings - Show field?


Hello. I use the SPFieldUser in my list. I can change Additional Column Settings - Show field: "Name with Presense" on the "Name (with Picture and details)" using the WSS Web interface. How do it programmatically, using Object Model WSS?

SSRS Change field properties dependent on the render type


I've built a report that has background images with text over the top, which when rendered as Word or Excel the images don't show and because the client has requested the text is white against the image, the text isn't visible.

What I'd like to do is run code within the report that identifies the render type and if xls will change the text color through an expression.

Any ideas would be greatful.


Is there any Way to change the header text of an template field dynamically


<asp:TemplateField HeaderText="Award name" >

i want to Assign the header text from code behind

is their any method or way to do this ??????




DetailsView - Change field size for easier editing


Hi All

Very new to VS2010

I've got data in a DetailsView control which shows the data and expands the rows to suit the content.

However, when I click to edit the information, the editing area changes to just a few characters wide.

How do I change the size of the editing area to match the view data state?

Thanks for helping!



InfoPath -Validate a Field Based on ANY change in a Secondary Field


I would like to require a change to one field if a secondary dropdown field is changed at all.  At Minimum I would like to change the formatting or color of the field in question.


Change value of a form field using Workflow


Hi, is there any way that I could change the value of a Form item(like textbox) designed in InfoPath 2010 using workflow conditions,

I dont want to acheive this by using rules by setting fields value,

My requirement is that on the click of a button in a form i want to run workflow which checks some conditions in the SharePoint List and I want to dispaly a message in a form,

How to change the display name for LinkTitle or Title field in a Custom List programatically


We have a requirement, where we need to create a list from "Custom List" Template, through a console application.
But we need to change the Display Name of the column named "Title" created by default to something else say "CategoryName". We do not want to remove the column but only change its display name, so that the column with name "CategoryName"still has a hyperlink and ECB menu attached to it..

The same can be done by going to list settings and changing the name of the Title column, but I am not able to figure out how to do it progrmatically.


"Title"].Title = "Some Other Name";
CustomListName.Fields["LinkTitle"].Title = "Some Other Name"

How to change the way the infopath form saves data in SharePoint library (Ex: Person/Groups field is

Person/Group field is taken as an integer field in SharePoint form library when a form is submitted. I need to retain it as Person/Group column in the SharePoint form library too. Please help on the same. Thanks.

Change data type of library field from Single Line Text to currency


I have an InfoPath 2010 form that has a field listing the amount of currency on a meter. It is a Decimal form in Infopath but publishes to SharePoint as a Single Line of Text.  It will not let me modify the column in SharePoint and it will not let me select the allow edit from the Publishing Wizard.  I need the column as a currency so my Excel Queries work.



calculation, field and map traverse adjustment, and coordinate transformation

Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.
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