Column value coloring Based on the condition in ssrs 2008

Hi,
I need to change color formating based on below conditions
Red if <=28 days or > 65 days       
Green if >28 and <=60 days       
Yellow if > 60 days and <=65 days
<=0 No color
I tried with below IIF condition it's not working.
=iif(Fields!HDSI13.Value<=0,
"No color",iif((Fields!HDSI13.Value<=28
or Fields!HDSI13.Value>64),"Red",iif((Fields!HDSI13.Value>29
and Fields!HDSI13.Value<=60),"Green",iif((Fields!HDSI13.Value>60
and Fields!HDSI13.Value<=65),"yellow",Nothing))))
Can any one help me on this.
Thanks,
Manasa.
Thank You, Manasa.V

hi all,
When i wrote like this in table report ...woking fine.
=iif(((Fields!HDSI13.Value<=28
and Fields!HDSI13.Value>0)
or Fields!HDSI13.Value>64),"Red",iif((Fields!HDSI13.Value>=29
and Fields!HDSI13.Value<=60),"Green",iif((Fields!HDSI13.Value>=61
and Fields!HDSI13.Value<=65),"yellow",iif(Fields!HDSI13.Value<=0,"Nocolor",""))))
Thank You, Manasa.V

Similar Messages

  • Inserting new columns based on the condition!

    Hi guys,
    I have a very simple query like the following… 
    SELECT table2.column_code2,
    table2.column_description2,
                 table2.column_code1,
                 table1.column_description1
    FROM database_001.table2 table1 LFET OUTER JOIN database_001.table2 table1 on (table2.column_code1 = table1.column_code1)
    From this query, its returning me a result set of something like below:
    column_code1       column_description1        column_code2                 column_description2
    RO1                              BOOK                              RL1            
                               PDF/ECOPY
    RO2                              PAPER                             RL2            
                            CONFERENCE
    RO5                            JOURNAL 
    RL11  OTHER
    Now, on the above query I want to insert three extra columns with the name (status, location and contact) where the results in the extra three columns would be based on the conditions I want to define in the query based on the above results…
    Something for example (sorry, I am not trying to write a condition: my question is how to write it), 
    if column_code1 = RO1 and column_description2  =  PDF/ECOPY on status column it should return a value ‘ONLINE’ & on location column it should return ‘WEB’ and on contact column it should write ‘BOB’.
    Also,
    if column_code1 = RO5 and column_description1 = JOURNAL on status column it should return a value ‘ON PRESS FOR PRINT’ & on location column it should return ‘S.R STREET, LONDON’ and on contact column it should write
    ‘SMITH’ like below result…so the final output should be the top four columns and the extra three columns…I hope someone can help me into this…thanks a lot…
    status                                            location                
                            contact
    ONLINE                                               WEB                          
                           BOB
    ON PRESS FOR PRINT                     S.R STREET, LONDON                           SMITH

    Hi artistdigital,
    you can use case statment for same in sql server. MSDN link - > http://technet.microsoft.com/en-us/library/ms181765.aspx
    Try code like this:
    SELECT table2.column_code2,
    table2.column_description2,
    table2.column_code1,
    table1.column_description1,
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'ONLINE'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'ON PRESS FOR PRINT'
    end as [status],
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'WEB'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'S.R STREET, LONDON'
    end as [Location],
    case when column_code1 = 'RO1' and column_description2 = 'PDF/ECOPY' then 'BOB'
    when column_code1 = 'RO5' and column_description1 = 'PDF/ECOPY' then 'SMITH'
    end as [contact]
    FROM table2
    join table1
    on table2.column_code1 = table1.column_code1
    Regards Harsh

  • Change Column Header / Column Background color based on a value in a specific row in the same column

    SSRS 2012
    Dataset (40 columns) including the first 3 rows for Report layout configuration (eg: the <second> row specifies the column background color).
    Starting from the 4th row, the dataset contains data to be displayed.
    I would like to change the background color of the ColumnHeader/Column based on the value in the same column in the <second> row.
    How can I accomplish the this requirement? (this must be applied for all the columns)
    Thanks

    Hi Fasttrck2,
    Per my understanding that you want to specify the background color of all the columns/column header based on the value in one special column of the special row, right?
    I have tested on my local environment and you can add expression to condition show the background color in the columns properties or the column header properties.
    Details information below for your reference:
    Specify the background color in the Column header: you can select the entire column header row and in the properties add expression in the Background color :
    If you want to specify the background color for the entire column, you can select the entire column and add the expression, repeat to add background color for other columns.
    If you want to specify the background color based on the value in the specific columns and row, you can create an hidden parameter to get the list of values from the  specific column, specify the Available values and default values by select "Get
    values from a query", finally using the expression as below to get the specific value you want:
    Expression(Backgroud Color):
    =IIF(Parameters!Para.Value(1)="1221","red","yellow")
    If your problem still exists, please try to provide some smaple data of the report and also the snapshot of the report structure to help us more effective to provide an solution.
    Any problem, please feel free to ask.
    Regards
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • ADF Table cell color based on the value in that field

    Dear All,
    I want to create a table for our new application which contains a table used to represent the data in a chart format or matrix format,
    and each cell of the table should be filled with a colour out of three colors, based on the value belongs to which range eg:(1-8 ->green, 9-20 - yellow etc),
    I dont know how to implement this. Please help...
    Ranjith

    Check this out.
    How to highlight ADF table row based on column value?
    -Arun

  • Need to show the images in calculated column based on the condition in sharepoint 2013.

    Hi ,
    I'm working in sharepoint 2013, In this i want to show an image in calculated column based on the condition, but image is not showing .
    In sharepoint 2010 its working with help of javascript in content editor on the same page. Same thing i tried in SP 2013. but doesn't work.
    Could any one please give proper solution for this?
    Thanks in advance.
    by,
    Siva.

    Hi please provide the JS you have used in the content editor as well as the calculation for the column so we can better understand what's maybe differs?
    Blog: chrisstahl.wordpress.com Twitter:
    @Cstahl

  • Can we take standard report for all sales orders based on the condition typ

    Hi all,
    Based on the condition type, we need to take a report for sales orders on the particular date.
    Thanks and Regards.....VM

    Hello again.
    Searching for a solution, I found a Logical Database for sales orders, that have all the information that you need.
    Using like reference the post of Bhagavatula, in the same transaction SQVI you can use, instead of the suggested join, you can select a logical database called VAV in Data source.
    This logical database links the tables, VBAK, VBAP, VBUK and KONV that is the central point of the question.
    You can list the information of logical database using the transaction SLDB.
    In 'Logical Database' inform VAV.
    Press F8 to list all the fields.
    More information about logical database in:
    Link: [SAP Logical Database|http://help.sap.com/saphelp_46C/helpdata/EN/9f/db9b5e35c111d1829f0000e829fbfe/content.htm]

  • How to add round image inside the table column? with different background color, column value should appear in the middle of the round portion.

    Hi
    This question is related to table component implementation.
    I want to display the column values inside the small round image with different colors and value should appear in the middle.

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Populating a report column(Popup lov) based on the other column.

    I have a report where a column that is a Popup Lov(Query based LOV) needs to be populate based on another column in the same report.
    For example, if the column1 has query based lov select statment "select a,b,c from tab where d= *<<col2>>* ".
    I would like to have a sql query based on the values of second report column. Any ideas are appreciated.
    Regards,
    madhu

    You can do that only if you use apex_item. See this example as a reference:
    http://apex.oracle.com/pls/otn/f?p=31517:176
    In this example the second select list query depends on the first select list column value.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Printing Flag Based on the Condition Request

    Hello
    I have a requirement where i need to check two conditions on Date and Print the Date in Red and Flag(Symbol) adjacent to the Date, I used Conditional Format and gave my Conditions and then i am ableto print the date in Red , Below is my Conditional Format XML and i am unable to print a symbol adjacent to the Date with the same Condition
    Here is my Conditional Format XML
    <?if:LE_DT<PRINT_DATE?><?attribute@incontext:color;'red'?><?end if?><?if:ACT_DT='--'?><?attribute@incontext:color;'red'?><?end if?>
    i need to print a FLAG symbol also based on this condition
    Thanks for your help

    So after the attribute setting you need to put in the flag character. To do this, you will need to put the opening and closing if statements in separate form fields and then put the flag character between them.
    <?if:LE_DT<PRINT_DATE?><?attribute@incontext:color;'red'?>FLAG CHAR<?end if?><?if:ACT_DT='--'?><?attribute@incontext:color;'red'?>FLAG CHAR<?end if?>
    Bear in mind that the flag character may come from a special font e.g. wingdings. In which case you will need to ensure that font is on the server - check the docs. Or you can conditionally show an embedded image in the same way.
    Regards
    Tim

  • Af:table: defining row background color based on a condition

    I want to display log objects (priority, name, detail) in a tab.
    The background color must be green for priority "DEBUG" and red for priority "WARN".
    It seems that in the table component, we can only control the column aspect and the output text inside...
    I'have read some posts (Franck N.) and it seems not possible to have an action of the row (all columns) background color...
    What can be the workarround ? other <af:?> component ???
    Is it now possible with the new JDEV11 components ?
    <af:table partialTriggers="pollRefresh" emptyText="No items were found"
    value="#{backing_logviewer.logViewerList}" var="log"
    rows="50">
    <f:facet name="detailStamp"/>
    <af:column sortable="true" headerText="Prio" formatType="text"
    sortProperty="prio">
    <af:outputText value="#{log.prio}"/>
    </af:column>
    <af:column sortable="true" headerText="Cat" formatType="text"
    sortProperty="cat">
    <af:outputText value="#{log.cat}"/>
    </af:column>
    <af:column sortable="false" headerText="Msg" formatType="text">
    <af:outputText value="#{log.msg}"/>
    </af:column>
    <af:column sortable="false" headerText="Thread" formatType="text">
    <af:outputText value="#{log.thread}"/>
    </af:column>
    <af:column sortable="false" headerText="Info" formatType="text">
    <af:outputText value="#{log.info}"/>
    </af:column>
    <af:column sortable="false" headerText="Log Date" formatType="text">
    <af:outputText value="#{log.logDate}" converter="dateConverter"/>
    </af:column>
    <af:column sortable="false" headerText="Throwable"
    formatType="text">
    <af:outputText value="#{log.throwable}"/>
    </af:column>
    </af:table>

    Thanks for your answer.
    Your solution is not working but if i put the styleclass instruction in the outputText element, it is working...
    Is there any other solution ???... because in this solution, we are obliged to put this EL in each outputText element of the tab.
    <af:column sortable="true" headerText="Cat" formatType="text"
    sortProperty="cat">
    <af:outputText value="#{log.cat}" styleClass="#{(log.prio == 'DEBUG') ? 'bgDebug' : (log.prio == 'WARN' ? 'bgWarn' : '')}"/> </af:column>

  • Column hiding /unhiding based on a condition

    I have a report in which I want to add "State" Column. But it show up only when "Region" = 'Northeast'. And do not show State for other "Region"
    So basically, I want to hide "State" column dynamically based on condition where "Region"='Northeast'.
    Would Siebel On Demand let us do Column hiding /unhiding based on a data condition?
    Please let me know if this is possible.
    Thanks
    Rakesh

    I don't think SOD lets hide/unhide a column based on a condition. All you can do is restrict the number of rows using a filter.

  • Displaying record based on the condition in Crystal report

    Hi All,
    I want to display certain records in crystal based on some condition.
    For example,
    If I am having 5 student records like,
    Name  Mark1 Mark2 Mark3 Total
    aaa      40       50       60      150
    abc      30       60       40       130
    tcr        25      25        25       75
    Now in table i have only 4 fields (STUNAME, MARK1, MARK2, MARK3).
    I have to calculate the total at runtime and if total is greater than 150, then actual record should display in report.
    For example, I can use formula to calculate total but I can calculate total only after each record prints. But i want to calculate total internally only it should display in report if condition satisfies. I dont want to keep one more field for total in crystal report.
    Please help me on this.

    If the filter is not "pushed" down to the database, then Crystal will pull all of the data into memory and then filter it there.  This is not a big deal if you only have a couple of records, but it can significantly slow down a report that is pulling in more than a few records.
    An alternative, if your report is just linking tables in the Database Expert, would be to create a SQL Expression that adds the three fields together.  Using this in the Select Expert WILL push the condition down to the database.
    If you're using a command instead of linking table, they you would add this to the Where clause of the comment.  If you're using a stored proc instead of tables or a command, you would want to do this filter in the code for the stored proc.
    -Dell
    Message was edited by: Dell Stinnett-Christy

  • Disable a field in a Table layout based on the condition

    Hello,
    In the seeded page, there is a table layout region with viewobject name as View1. It has 3 fields displayed as Field A, Field B, Field C with multiple rows displayed when the page opens. Fields B and C are MessageTextInputs and Field A is MessageChoice. So in the displayed rows in the table, if the value selected in the Field A is "Bonus" then the fields B and C needs to be disabled so that the user should not be able to enter any information. So if there are 5 rows in that table, only 1 or 2 rows might have the value "Bonus" in the field A and only for those rows, fields B and C needs to be disabled.
    I would appreciate if anyone can provide me with a logic. I know how to disable a field based on the value of other field but in this case here, its a table region with multiple rows and only few of them needs to be disabled. I couldn't think of any logic here. Any help is greatly appreciated.
    Thank You
    KK

    Similar problem
    Re: How to make Advanced table readonly

  • How to select values frm table giving the condition value at runtime in SQL

    Hi All,
    How to select values from a table by giving the condition value at runtime in SQL
    My SQL statement is select * from employee where empno=<empno>, this empno I want to provide at run time. Also I don't have any bind variables defined. Can anyone please tell how can I achieve this. Also do I have to write a SQL or pl/sql statement.

    Hi Roshni Shankar,
    You can use substitution variable in case of SQL.
    SQL> select * from employees where emplployee_id = &emp_id;
    Enter value for emp_id: 100
    old   1: select * from employees where emplployee_id = &emp_id
    new   1: select * from employees where emplployee_id = 100If you want to put condition on varchar values then eighter provide values in single quotes or use single quote for substitution variable.
    SQL> select * from employees where last_name = &emp_name;
    Enter value for emp_name: 'King'
    old   1: select * from employees where last_name = &emp_name
    new   1: select * from employees where last_name = 'King'
    no rows selected
    SQL> select * from employees where last_name = '&e_name';
    Enter value for e_name: King
    old   1: select * from employees where last_name = '&e_name'
    new   1: select * from employees where last_name = 'King'In case of pl/sql you can pass values to procedure and you can use those values at run time.
    create or replace procedure test (p_emp_id number)
    as
       v_last_name      varchar2(100);
    begin
       select last_name
       into    v_last_name
       from  employees
       where employee_id = p_emp_id;
       dbms_output.put_line(p_emp_id ||'    ->    '||v_last_name);
    end;
    show errors
    SQL>exec test(100);
    SQL>exec test(101);Edited by: Gaurav Bhide on Oct 29, 2012 4:07 AM

  • Altering pages based on the condition

    Hi all,
    In a smartform there is a requirement like in the main window, if a variable satisfies some condition then it is required to print the table in the next page other wise it need to be displayed in the first page itself.
    can any one of you help me regarding this. ie; how to specify it to be printed in first page or secondpage
    Thanks in advance,
    regards,
    tulasi.

    Hi Deepthi,
    A small technically incorrect term was used in the previous post.
    That is explicit break-point; actually it is explicit page-break.
    What happens "When you create explicit page-break as: Right click on Template-->Create->Flow Logic -->Command" is as soon as the condition is satisfied the next content will be printed on the next page (as specified).
    So if your variable satisfies some condition then you can put a explicit page-break to print the table in the next page.
    Hope now you got the clarity.
    Regards,
    Rama chary.P

Maybe you are looking for

  • [SOLVED]After yesterday's upgrade screen problem

    So, yesterday i have upgraded to the newest kernel and udev. Now, the problem is that (i have XFCE) when laptop goes into "switch off screen" mode (in xfce4-power-manager) i cannot recall the screen back to normal (it remains black). I have to suspen

  • How (best) to include links in a template?

    I'm creating a ~55 page site, where most of the structure of the site (3 nav bars, etc.) will be similar throughout. I know the client will change the order and names of the links, as well where they point. Yet they want to have it mostly created fir

  • XML IDoc conversion: No known segments identified

    Hi all,                  am working on a File to IDoc scenario. In runtime, error occurs at Call Adapter phase. <SAP:Category>XIAdapter</SAP:Category>   <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>   <SAP:P1>XML IDoc conversion: N

  • Is there auto detect duplicates to prevent copying in iTunes 11?

    This seemed to be a legacy issue. So I'm wondering if the latest iTunes resolved this problem. It is fine to be able to detect and delete but the point is it shouldn't happen in the first place. So I'm hoping the new iTunes is able to detect the late

  • Phone not turning off

    1st problem..so my phone says its dead when it really has a fully charged battery. and then like a minute later it says its fine without charging it or do anything. what do i do? 2nd problem.. i try to turn my phone off when its about to die or when