I am getting two compilation errors when it tries to parse this line.
Public Sub DataBand1_Rendering(ByVal sender As Object, ByVal e As System.EventArgs)
IIF((Stimulsoft.Report.Dictionary.StiFunctionsDate.Year(QueryResults.Policy_Expiration_Date)) == (Stimulsoft.Report.Dictionary.StiFunctionsDate.Year(Today)), (SumTotalPremiumCurrentYear += QueryResults.Policy_Total_Premium), (SumTotalPremiumPreviousYear += QueryResults.Policy_Total_Premium))
End Sub
I attached the mrt file. Please take a look and let me know what I need to do to fix it.
Compilation errors - Expression expected
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Compilation errors - Expression expected
- Attachments
-
- JGParker2.mrt
- (21.07 KiB) Downloaded 388 times
-
- Posts: 10
- Joined: Wed May 17, 2017 9:24 pm
Re: Compilation errors - Expression expected
Hello, ddsmith99301.
We see unusual action. This issue is sent to our developers.
We will let you know when it will be fixed.
Thank you.
We see unusual action. This issue is sent to our developers.
We will let you know when it will be fixed.
Thank you.
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Compilation errors - Expression expected
I did determine why it was giving me errors, but the IIF statement still doesn't work. I replaced the comparison operator '==' with '='. I am using VB not c#. I am using version 2013.3.1800
This is the statement that parses okay, but does not produce the expected result. Neither of the two variables is updated.
IIF((Year((QueryResults.Policy_Expiration_Date))=Year(Today)), SumTotalPremiumCurrentYear = SumTotalPremiumCurrentYear + (QueryResults.Policy_Total_Premium), SumTotalPremiumPreviousYear = SumTotalPremiumPreviousYear + (QueryResults.Policy_Total_Premium))
This statement works perfectly in the same event. So, I know it isn't that part of the IIF statement that is not working.
SumTotalPremiumCurrentYear = SumTotalPremiumCurrentYear + (QueryResults.Policy_Total_Premium)
This is the statement that parses okay, but does not produce the expected result. Neither of the two variables is updated.
IIF((Year((QueryResults.Policy_Expiration_Date))=Year(Today)), SumTotalPremiumCurrentYear = SumTotalPremiumCurrentYear + (QueryResults.Policy_Total_Premium), SumTotalPremiumPreviousYear = SumTotalPremiumPreviousYear + (QueryResults.Policy_Total_Premium))
This statement works perfectly in the same event. So, I know it isn't that part of the IIF statement that is not working.
SumTotalPremiumCurrentYear = SumTotalPremiumCurrentYear + (QueryResults.Policy_Total_Premium)
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: Compilation errors - Expression expected
This statement doesn't work either.
IIF(1=1,SumTotalPremiumCurrentYear = 20,SumTotalPremiumCurrentYear = 30)
IIF(1=1,SumTotalPremiumCurrentYear = 20,SumTotalPremiumCurrentYear = 30)
Re: Compilation errors - Expression expected
Hello.
Sorry, it's impossible to use the IIF function this way.
It should return false.
Please, try to use next expression:
Thank you.
Sorry, it's impossible to use the IIF function this way.
It should return false.
Please, try to use next expression:
Code: Select all
SumTotalPremiumCurrentYear = IIF(1=1, 20, 30)