Writing an IIF Statement in SSRS using IN or LIKE

Hello,
I am trying to write an IIf statement with multiple conditions and I am getting an error. Here is the current syntax:
=IIf(Fields!role_sk.Value=4174 AND Fields!settle_type_sk.Value
LIKE (4159,4160), Fields!company_name.Value,"")
Here is the error:
Any ideas? I think it has to do with the LIKE.
Thank

The syntax on the Like is incorrect. The Like operator expects a string to compare to that uses an * as a wildcard for any character(s).
=IIf(Fields!Name.Value Like "F*", Fields!Name.Value, "Not F")
This will display the name field if it starts with an "F" or "Not F" if not.
The "In" operator is not available in expression builder but is available in filters (Tablix, Group, etc.). To use that, the Value must be an array. You can create
an array of static text using the Split function in expression builder.
=Split("Me,You,Them",",")
This creates an array with 3 elements:Me, You, and Them. If any are matched in the field or expression you are comparing to in the filter, the record will be displayed,
otherwise not.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.

Similar Messages

  • I have a question whether I am using the correct IIf statement in SSRS?

    I have created a report with columns for case name, date opened, staff assigned, title, contact date, created by, and comments. I also have selected the comment_type field for the sake of indicating which data to pull but it will not be listed on the report.
    I have the following IIf statement which indicates that if the comment_type is NOT equal to 4322 then I want it to return NOTHING (or a blank line, one line ONLY, not repeated ugh) and if it IS equal to 4322 then that's the information I want to be placed
    on the report for created by, contact date, and comment fields.
    =IIf(Fields!comment_type_sk.Value <> 4322, Nothing, 4322)
    Now, the problem is, I want the report to generate as below and I'm not sure where to place this in order for it to render correctly. If the comment type 4322 is present then print the information in the last three columns, if it is anything but that,
    then just a blank line where those fields are. The report itself is to be pulled on dated opened. SO...I'm not sure if this code should go under a parameter? or if it should just be stated in the expression for each of those fields? PS I am teaching myself
    SQL. Sorry for the lack of knowledge.
    Smith, Joe                                           1/1/2007   
    Jones, Tom      Lead Atty    1/28/2013     MJohnson        Set up meeting
    Franz, Joseph                                      3/15/2008  
    Grouch, Oscar  Lead Atty   
    Jones, Paula                                         2/16/2013 
    French, Mary    Partner       2/20/2013     DFalk              Atty Introduction
    Thanks,
    Dawn

    Hi,
    You can place the IIF statement in the 3 columns. You do not need a parameter.But the iif statement in the last 3 columns should be similar as below
    Col1 - iif(Fields!comment_type_sk.Value <> 4322,
    Nothing,col1)
    Col2 - iif(Fields!comment_type_sk.Value <> 4322,
    Nothing,col2)
    Col3 - iif(Fields!comment_type_sk.Value <> 4322,
    Nothing,col3)
    HTH,
    Ram
    Please vote as helpful or mark as answer, if it helps

  • Multiple IIF Statements in SSRS Expression

    Team:
    The following IIF expression works:
    =IIf(Fields!Court.Value = "MA", "Total Filed:   Daily = "&Fields!MAFiledDaily.Value, Nothing)&
    IIf(Fields!Court.Value = "MA", " | Monthly = "&Fields!MAFiledTotal.Value, Nothing)
    However; I have 10 additional Court.Values for the IIF statement to check and return results.
    I have tried the following with no luck ("OR" added):
    =IIf(Fields!Court.Value = "MA", "Total Filed:   Daily = "&Fields!MAFiledDaily.Value, Nothing)&
    IIf(Fields!Court.Value = "MA", " | Monthly = "&Fields!MAFiledTotal.Value, Nothing)
    or
    IIf(Fields!Court.Value = "MB", "Total Filed:   Daily = "&Fields!MBFiledDaily.Value, Nothing)&
    IIf(Fields!Court.Value = "MB", " | Monthly = "&Fields!MBFiledTotal.Value, Nothing)
    Any help would be welcomed.
    Regards,
    jer
    jer

    You have to nest the IIf statements which looks a bit messy but the only other way would be to alter your dataset to return the extra text you need with a case statement.
    =IIf(Fields!Court.Value =
    "MA",
    "Total Filed:   Daily = "&Fields!MAFiledDaily.Value, IIf(Fields!Court.Value =
    "MB",
    "Total Filed:   Daily = "&Fields!MBFiledDaily.Value,
    Nothing))&
    IIf(Fields!Court.Value =
    "MA",
    " | Monthly = "&Fields!MAFiledTotal.Value, IIf(Fields!Court.Value =
    "MB",
    " | Monthly = "&Fields!MBFiledTotal.Value,
    Nothing))

  • Trouble with IIF statement in SSRS report builder

    hi....
    I have an expression field that isn't working.  They are Dynamics GP tables, and I am trying to show converted currencies:
    =IIF (Fields!Currency.Value=RTrim("Z-US$"), Fields!ORCPTCOST.Value
    , Fields!ORCPTCOST.Value / CDEC(Fields!ExchangeRate.Value))
    The true part is bolded.  when the report shows, it always comes up as
    #Error. If the currency is  "Z-MXN$", it calculates it fine. 
    So why is my true part not working?
    thanks!
    ~george

    Hi George,
    Based on my research, this issue can be caused by
    IIF is not an expression, it is a function with three parameters:
    IIF(Condition, ValueIfTrue, ValueIfFalse)
    Note that all parameters are evaluated before being passed to the function. We can still get an error, because the erroneous expression is still evaluated even when the condition should mean that it
    isn't. For example, when the currency is "Z-US$", the ExchangeRate field returns
    a stream of letters which cannot be changed to decimal type. Or the ExchangeRate field returns 0, then the denominator is 0, the division makes no sense. So it displays #Error.
    To fix this issue, we can assign a value that doesn’t affect the expression result to ExchangeRate field when it is
    a stream of letters or equal to 0. The expression below is for your references:
    =IIF (Fields!Currency.Value=RTrim("Z-US$"), Fields!ORCPTCOST.Value , Fields!ORCPTCOST.Value / CDEC(iif(IsNumeric(Fields!ExchangeRate.Value)=false or Fields!ExchangeRate.Value=0, 1, Fields!ExchangeRate.Value)))
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How to convert switch statement into iif than else statement in SSRS

    Hi All;
    How do i convert switch statement into iif statement in ssrs
    =
    Switch(
    Fields!createdonValue.Value = Now(), "Today",
    Fields!createdonValue.Value = DateAdd("d",-1,Today()),"Yesterday",
    Fields!createdonValue.Value >= FORMATDATETIME(DateAdd(DateInterval.Day, -6,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate) and
    Fields!createdonValue.Value <= FORMATDATETIME(DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate),"Last Week",
    Fields!createdonValue.Value >= FORMATDATETIME(DateAdd(DateInterval.Day, -13,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate) and
    Fields!createdonValue.Value <= FORMATDATETIME(DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate),"Last Fortnight",
    Fields!createdonValue.Value >= DateValue(DateAdd("M",-1,DateAdd("D",-(Day(Now)-1),Now))) and
    Fields!createdonValue.Value <= DateValue(DateAdd("D",-1,DateAdd("D",-(Day(Now)-1),Now))),"Last Month",
    Fields!createdonValue.Value >= DateSerial(Year(Now()), 1, 1) and
    Fields!createdonValue.Value <= DateSerial(Year(Now()), 12, 31),"Year to Date"
    Any help much appreciated
    Thanks
    Pradnya07

    Not sure why you want to se IIF as Switch is more compact
    Anyways it will look like this
    =IIf(
    Fields!createdonValue.Value = Now(), "Today",IIf(
    Fields!createdonValue.Value = DateAdd("d",-1,Today()),"Yesterday",Iif(
    Fields!createdonValue.Value >= FORMATDATETIME(DateAdd(DateInterval.Day, -6,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate) and
    Fields!createdonValue.Value <= FORMATDATETIME(DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate),"Last Week",IIf(
    Fields!createdonValue.Value >= FORMATDATETIME(DateAdd(DateInterval.Day, -13,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate) and
    Fields!createdonValue.Value <= FORMATDATETIME(DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today)),DATEFORMAT.ShortDate),"Last Fortnight",IIf(
    Fields!createdonValue.Value >= DateValue(DateAdd("M",-1,DateAdd("D",-(Day(Now)-1),Now))) and
    Fields!createdonValue.Value <= DateValue(DateAdd("D",-1,DateAdd("D",-(Day(Now)-1),Now))),"Last Month",IIf(
    Fields!createdonValue.Value >= DateSerial(Year(Now()), 1, 1) and
    Fields!createdonValue.Value <= DateSerial(Year(Now()), 12, 31),"Year to Date")))))
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SSRS IIF Statement #Error

    All,
    I have the below IIF statement in SSRS report based on a sharepoint list. However I get #Error only on certain lines
    For example when Item_Name = P001-P384D630Z01
    I am sort of stunned at this point. All the other lines work except the one with above item name. If I remove the MF5 Mod Center part of the iif then everything works.
    =
    Iif((mid(Fields!Item_Name.Value,8,1)= 3 OR mid(Fields!Item_Name.Value),8,1)=4) AND LEFT(TRIM(Fields!Project_No.Value),1) =8, "MF5 Mod Center",
    Iif(Left(Fields!Project_No.Value,1)="3","HOU MOD",
    Iif(Left(Fields!Item_Name.Value,3) = "RDC","RDC",
    Iif(Left(Fields!Item_Name.Value,4) = "P001","Overseas",
    Iif(IsNothing(Fields!Engineering_Status.Value), "Pre-engineering",
    Iif(Fields!Engineering_Status.Value="P.C. Finished", "Production",
    Fields!Engineering_Status.Value

    It's working after removing the "-" in the item_name if anyone is wondering.
    =
    Iif(Left(Fields!Project_No.Value,1)="3","HOU MOD",
    Iif(Left(Fields!Item_Name.Value,3) = "RDC","RDC",
    Iif(Left(Fields!Item_Name.Value,4) = "P001","Overseas",
    Iif(IsNothing(Fields!Engineering_Status.Value), "Pre-engineering",
    Iif(Fields!Engineering_Status.Value="P.C. Finished", "Production",
    Iif((mid(replace(Fields!Item_Name.Value,"-",""),8,1)= 3 OR mid(replace(Fields!Item_Name.Value,"-",""),8,1)=4) AND LEFT(TRIM(Fields!Project_No.Value),1) =8, "MF5 Mod Center"
    ,Fields!Engineering_Status.Value

  • Writing IIF Statements for Sales Reps Goals

    I have a query that takes all of the Sales Reps Goals and divides them into daily goals based on Potential sales days. This works perfectly when a rep starts before the beginning of the year. The issue I have is when a rep starts mid-year. If a rep starts
    in June the goal should be divided by the remaining sales days left in the year and not the full year. I want to write an IIF statement that says if the rep's hire date is greater than 1/1/2015 then calculate based on remaining sales days. The query that works
    for old reps is below:
    SELECT uSERS.lifeguard_id
    , GOALS.ProductID
    , GOALS.GoalAmount / (SELECT SUM(WC.[Total Potential Sales Days (excluding Sat)]) 
    FROM MISC.WorkingCalendar WC 
    WHERE WC.Year = YEAR(GETDATE())
    GROUP BY [YEAR]
    ) * WC.[Total Potential Sales Days (excluding Sat)] AS GOALS
    , WC.Month
    , WC.Year
    , DATEADD(DD,-1, DATEADD(MM,1,cast( (cast(WC.Month as varchar) + ' 1 , ' + cast(WC.Year as varchar)) as date))) AS GoalDatea
    ,CASE WHEN WC.Month= 'Jan' THEN '201501'
         WHEN WC.Month = 'Feb' THEN '201502'
    WHEN WC.Month = 'Mar' THEN '201503'
    WHEN WC.Month = 'Apr' THEN '201504'
    WHEN WC.Month = 'May' THEN '201505'
    WHEN WC.Month = 'Jun' THEN '201506'
    WHEN WC.Month = 'Jul' THEN '201507'
    WHEN WC.Month = 'Aug' THEN '201508'
    WHEN WC.Month = 'Sep' THEN '201509'
    WHEN WC.Month = 'Oct' THEN '201510'
    WHEN WC.Month = 'Nov' THEN '201511'
    WHEN WC.Month = 'Dec' THEN '201512'
    END AS YearMonth
    FROM (
    SELECT [CRM Rep Name] as CRMREPNAME
    , CASE GoalAmount.GoalType
    WHEN 'Yearly Life' Then 'L'
    WHEN 'Yearly DI' then 'DI'
    WHEN 'Yearly CI' then 'CI'
    WHEN 'Yearly AI' then 'AC'
    end as ProductID
    , GoalAmount.GoalAmount
    , YEAR(GETDATE()) AS GoalYear
    FROM BAMaster.SalesRep SalesRep
    unpivot (
    GoalAmount FOR GoalType in([Yearly Life],[Yearly DI], [Yearly CI], [Yearly AI])) AS GoalAmount
    ) GOALS
    JOIN VISION.Users Users
    ON GOALS.CRMREPNAME = Users.user_code
    JOIN MISC.WorkingCalendar WC
    ON WC.Year = goals.GoalYear
    where lifeguard_id is not null
    order by lifeguard_id

    Sales Days
    Year
    Month
    Weekdays
    Saturdays
    Holidays
    Total Potential Sales Days (including Sat)
    Total Potential Sales Days (excluding Sat)
    2014 Running Total
    2015
    Jan
    20
    5
    2
    25
    20
    20
    2015
    Feb
    19
    4
    1
    23
    19
    39
    2015
    Mar
    22
    4
    0
    26
    22
    61
    2015
    Apr
    22
    4
    0
    26
    22
    83
    2015
    May
    20
    5
    1
    25
    20
    103
    2015
    Jun
    22
    4
    0
    26
    22
    125
    2015
    Jul
    22
    3
    1
    25
    22
    147
    2015
    Aug
    21
    5
    0
    26
    21
    168
    2015
    Sep
    21
    4
    1
    25
    21
    189
    2015
    Oct
    21
    5
    1
    26
    21
    210
    2015
    Nov
    18
    4
    3
    22
    18
    228
    2015
    Dec
    20
    3
    3
    23
    20
    248
    Grand Total
    248
    50
    13
    298
    248
    These are the sales days. A rep's hire date could be any date in 2015.

  • Multiplying 2 values based on an If statement in SSRS reports

    I am working on a pretty complicated report, and I am unable to get the values to multiply correctly on one line.  The expression is simple, if the value in textbox293 is greater then the value in textbox294 then multiply textbox293 by textbox289 else
    multiply textbox294 by textbox289.  
    In SSRS terms IIF(textbox293.value > textbox294.value, textbox293.value * textbox289.value, textbox294.value * textbox289.value)
    I am using the actual formulas that I used to get the values, they have a nested IIF statement to return 0.00 if the value is less < 0.  I am also rounding to 6 decimal places on 1 value to ensure I get the correct value out to 4 decimal places.
    I have checked all of the value on the report up to this point are correct, and are displaying correctly.  I have broken apart my IIF statement to make it easier to read: 
    =IIF(IIF((Sum(Fields!RSR_MIN_2.Value, "Revenue") + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance"))
    * (Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value,
    "End_Fund_Balance")) * (round(Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_2.Value,
    "Revenue") + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (Sum(Fields!RGF_MIN_2.Value, "Revenue")
    / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance"))
    * (round(Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA"))) 
    >
     =IIF((Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6)))) / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value,
    "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))<
    0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6))))
    / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA")))
    IIF((Sum(Fields!RSR_MIN_2.Value, "Revenue") + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (Sum(Fields!RGF_MIN_2.Value,
    "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance"))
    * (round(Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_2.Value, "Revenue")
    + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value,
    "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (round(Sum(Fields!RGF_MIN_2.Value,
    "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA"))) * (first(Fields!WADA2013_1.Value,"Second_Year_Preceeding_WADA"))
    IIF((Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6)))) / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value,
    "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))<
    0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6))))
    / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA"))) * (first(Fields!WADA2013_1.Value,"Second_Year_Preceeding_WADA")))
    A screen shot of the report:
    The value in the bottom box should be: 37,080,118.75
    I have tried:
    =IIF(ReportItems!Textbox293.Value > ReportItems!Textbox294.Value, ReportItems!Textbox293.Value * ReportItems!Textbox289.Value, ReportItems!Textbox294.Value * ReportItems!Textbox289.Value) and I get a scope error.
    I have also tried 
    =IIF(CDbl(Fields!Textbox293.Value) > CDbl(Fields!Textbox294.Value), CDbl(FieldsTextbox293.Value) * CDbl(Fields!Textbox289.Value), CDbl(Fields!Textbox294.Value) * CDbl(Fields!Textbox289.Value))
    I get the same scope error, part of the problem here is that in order to get things to display correctly each row in this section of the report is a different table
    Row1 = tablix19
    Row2 = tablix20
    Row3 = tablix21
    Any help here would be great

    Hello,
    In your case, we can try to use Report Variables to resolve the issue. In SSRS, when we have a complex calculation we can create a variable in the report. Variable can be used more than once in a report. Please refer to the following steps:
    Open Report Properties dialog box.
    Click Variables in the left pane. Then, add specific variable.
    (Note: Suppose we have create two variables: textbox293, textbox294)
    After that, we can use following expression to calculate the effect:
    =IIF(Variables! textbox293.Value > Variables! textbox294.Value,
    Variables! textbox293.Value * ReportItems!Textbox289.Value,
    Variables! textbox294.Value * ReportItems!Textbox289.Value)
    Reference:
    Report and Group Variables Collections References
    If the issue is persist, please feel free to let me know.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • SSRS Using Sum and = in a conditional operator

    Hi,
    Still getting to grips with SSRS so any help would be appreciated.
    My aim is to calculate a conditional field using the SSRS expression feature, the datasource is a shared dataset which i can't alter so i can't just go an alter the SQL query or anything.
    In SQL my query would be like this: SELECT COUNT(TotalHours) FROM TableName WHERE TotalHours <= 24
    Is there anyway to combined the Iff and Sum operator's to get a result like the above?
    At present all i managed to come up with is the below but obviously it's not returning the correct amount.
    =IIf(Fields!TotalHours.Value <= "24", Sum(Fields!TotalHours.Value), 0 )
    Please help!
    Edit: Please note that i'm not trying to sum a field based on a condition that relates to another column, i just need a sum of 'TotalHours' that are less than or equal to 24, please also note there is another field called category, each category needs a
    sum of the above.
    Regards,
    Marcus
    Plain_Clueless

    Hi Marcus,
    According to your description, you want to count [TotalHours] when the value of this field is less than 24, right?
    In your scenario, you could use the expression like below:
    =Sum(IIF(Fields!TotalHours.Value<=24,1,0))
    Please note don’t put this expression in the detail rows, you could refer to our test results:
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • How to pass Cascading Parameter in SSRS using Java

    How to pass Cascading Parameter in SSRS using Java---
    We are having a problem with dependent parameters.There are three drop down--
    1.first dropdown is of Country.When we select a country--Accordingly next dropdown(State)will populate
    2.Second dropdown is of State. When we select a state--Accordingly next dropdown(City)will populate.
    I have three data sources are
    CountryList-
    SELECT CountryRegionCode, Name
    FROM Person.CountryRegion
    ORDER BY Name
    StateList
    SELECT StateProvinceID, StateProvinceCode, CountryRegionCode
    FROM Person.StateProvince
    WHERE CountryRegionCode = @CountryRegionCode
    ORDER BY StateProvinceCode
    CityList
    SELECT StateProvinceID, City
    FROM Person.Address
    GROUP BY StateProvinceID, City
    HAVING (StateProvinceID = @StateProvinceID)
    ORDER BY City
    Ihave to show report that has been deployed on server on the besis of these parameters
    I am using ReportViewer in JSP Page through url--
    http://192.168.90.149/ReportServer/Pages/ReportViewer.aspx?%2fReport+Project1%2fCascading_Parameters&rs:Command=Render&rs:parameter=true&Country="+Country+"&State="+State;
    But it is not accepting parameter if they are cascaded.It is working fine if Both parameters are independent.
    Edited by: kaushlee on May 11, 2010 9:22 PM

    Take a look at set_custom_property:
    public static final ID SETTEXT = ID.registerProperty("SETTEXT");
    public boolean setProperty(ID pid, Object value)
        if (pid == SETTEXT)
    String text = value.toString();
    and in forms
    set_custom_property('beans.bean_item', 1, 'SETTEXT', 'some text');
    cheers

  • Can we write an IIF statement in Designer??

    Hi dears,
    Can we write an IIF statement in Designer when we connect to the SAP BI 7.0 InfoCube?
    I try to add a new dimension object to my universe design by using IIF statement.
    At the below you can find my simple IIF statement.
    <EXPRESSION>IIF([0FISCPER3].[LEVEL01].[[40FISCPER3]].[Value]='January',1,0)</EXPRESSION>
    Is there anything wrong with syntax or smt??
    my Business Objects env is BOXI 3.2
    thanks a lot,
    Omer

    Hi,
    this one includes samples:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0a45246-ce76-2b10-e688-f5c8206203eb
    Ingo

  • Problem in writing a Read Statement

    Hi,
    In my Table control I have a POSITION button which is used to find the record in the table.
    I have written the following code.
      CALL FUNCTION 'POPUP_GET_VALUES'
        EXPORTING
    *   NO_VALUE_CHECK        = ' '
          popup_title           = 'Find the record'
    *   START_COLUMN          = '5'
    *   START_ROW             = '5'
    * IMPORTING
    *   RETURNCODE            =
        TABLES
          fields                = lt_tab
    EXCEPTIONS
       error_in_fields       = 1
       OTHERS                = 2
    I have five primary keys in my table, so that in the pop up I am getting all the five fields.
    The user will enter any of the five fields , I want to write a read statement based on the fields entered by the user.
    Could anybody help in writing the Read  statement.
    Or could any one help me in writing out the FIND functionality for a table control
    Regards
    Edited by: SAP LEARNER on Jun 15, 2010 1:40 PM

    Hi,
    I do not know what fields will be filled up.
    as there are 5 PK fields so 5! chances will be there for the where condition in the READ statement.
    How can I do it.
    I tried in the following way.
    I created a structure with the primary key fields and I filled the structure with the user filled values.
    Then I used it in the read statement as below, but it did not work.
        LOOP AT lt_tab .
          IF lt_tab-fieldname = 'SOCIEDAD'.
            lw_pk-sociedad = lt_tab-value.
          ENDIF.
          IF lt_tab-fieldname = 'NATURAL_YEAR'.
            lw_pk-natural_year = lt_tab-value.
          ENDIF.
          IF lt_tab-fieldname = 'CICLO_DE_VENTAS'.
            lw_pk-ciclo_de_ventas = lt_tab-value.
          ENDIF.
          IF lt_tab-fieldname = 'MODEL_VERSION'.
            lw_pk-model_version = lt_tab-value.
          ENDIF.
        ENDLOOP.
        DATA:lw_yrwbw010 TYPE ty_yrwbw010.
        READ TABLE t_yrwbw010 INTO lw_yrwbw010 WITH KEY lw_pk.
         IF sy-subrc = 0.
          table-top_line = sy-tabix.
         ENDIF.
      ENDIF.
    @Rob Burbank
    Could you please help me !! I could not find that in F1 help.
    @ Keshav.T         
    Could you please elaborate it please

  • Having trouble converting a MS Access IIF statement into SQL Sever 2012

    I am in the process of converting an Access Database to SQL Server 2012.
    The statement that works in MS Access currently right now is
     IIf([$$AMTP46 WITH LAST DRG]![LastOfMSDRG] Is Not Null,[$$AMTP46 WITH LAST DRG]![LastOfMSDRG],[$$AMTP46]![Billing DRG])
    I am not SQL Savvy, can you please help me find a solution to using this IIF statement in SQL. I have tried the CASE statements and no luck there either.
    Thanks

    I presume that you check if LastDRG column is not null then use LastDRG or else use LastOfMSDRG column
    You may also show your case query which didn't work for you.
    Meanwhile try below:
    -- Option 1
    SELECT CASE WHEN [LastOfMSDRG] IS NOT NULL
    THEN [LastOfMSDRG]
    ELSE [Billing DRG]
    END AS 'Output'
    FROM YourTable
    -- Option 2
    SELECT COALESCE([LastOfMSDRG], [Billing DRG])
    FROM YourTable
    -Vaibhav Chaudhari

  • How to send multiple customer statements by email using RFKORD11 program.

    Hi All,
    How to send multiple customer statements by email using RFKORD11 program. Is it possible?
    As of now we copied the stanadard program and sending the customer statements by email, one by one.
    if i execute the z program it will show the customer statement and send mail option.
    if i click send mail it will send that customer statement to the corresponding customer.
    then again i need to click back, it will show next customer statement and click on send mail.
    Pl guide me, if any one worked on this program.
    thanks in advance.
    Regards,
    Mahesh

    Try execute the program in the background to see if that helps.

  • How to send multiple customer statements by email using RFKORD11

    Hi All,
    How to send multiple customer statements by email using RFKORD11 program.
    As of now we copied the stanadard program and sending the customer statements by email, one by one.
    if  i execute the z program it will show the customer statement and send mail option.
    if i click send mail it will send that customer statement to the corresponding customer.
    then again i need to click back, it will show next customer statement and click on send mail.
    Pl guide me, if any one worked on this program.
    Regards,
    Mahesh

    Hi .
    You first need to copy that program to Z and make the changes in it. Can you convert sapscript to smartform?
    then you can write a logic to send mail in the loop.
    to send the pdf file
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
    Regards,
    Madhuri
    Edited by: madhuri sonawane on Jun 10, 2009 4:20 PM

Maybe you are looking for

  • Inclusion of data based on date

    Hello: I need to extract data for patients who have more than 2 visits to the doctor. My query is at the end of the post. The criteria is to include only patients which a trait_date >= 09/01/2006 and have been seen 2 or more times from that date. For

  • PO field not appearing while posting Vendor Invoice

    Hello, While posting an entry using FB01/ F-43, for posting key 31(Vendor Invoice), despite making Purchasing Document (Purchase Order) field optional in the field status group of both the posting key 31 as well as the Reconciliation (GL) Account, th

  • Custom icon in application builder

    I am trying to create an executable with custom icon using Application Builder in LabVIEW. I converted a .png image to .ico for the icon, but when I select that .ico file as a custom icon, I get the following message: "The selected file doesn't conta

  • Nested query value used as comparison in second nested query

    Hi, What would be the best way of writing the following: I have a simple SELECT statement which includes two nested queries used to get the start and end dates from two different tables (if the first date from the first table and the second from a di

  • Set final size in Compressor?

    Is there a way in compressor to tell it to take this 5 minute movie, and say make the final compressed size 1 gig? Or just tell it the final size you want and it'll estimate the bit rate and do it for you? I'm speaking using strictly h.264 as a Quick