Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
LOOKUP_BI
Constraint Violating Yak Guru
295 Posts |
Posted - 2008-08-05 : 16:13:36
|
have 2 testbox values that need to be validated before printing.My expression is :IIF(Fields!A.Value.ToString = Fields!B.Value.ToString,Fields!A.Value, Fields!A.Value & " " & Fields!B.Value)I want the expression to validate if Value of Txt Box A & B is the same,if yes only print Txt Box A else Print Txt Box A Txt Box B.Im not able to compare the both values,while preview of report I receive error message "Input String was not in correct format"I have tried all of the following as well.IIF(Fields!A.Value.ToString = Fields!B.Value.ToString,Fields!A.Value, Fields!A.Value & " " & Fields!B.Value)IIF(Fields!A.Value.ToString LIKE "Fields!B.Value.ToString",Fields!A.Value, Fields!A.Value & " " & Fields!B.Value)IIF(Fields!A.Value.ToString LIKE Fields!B.Value.ToString,Fields!A.Value, Fields!A.Value & " " & Fields!B.Value)IIF(Fields!A.Value LIKE Fields!B.Value,Fields!A.Value, Fields!A.Value & " " & Fields!B.Value)IIF(Fields!A.Value LIKE UCase(Fields!B.Value),Fields!A.Value, Fields!A.Value & " " & Fields!B.Value)The example of Text Box A Value is = JOINThe example of Text Box B Value is = Join.Ive been trying this for a long time and can't seem to get it to work.Do help me out !!!!!!Thank You |
|
LOOKUP_BI
Constraint Violating Yak Guru
295 Posts |
Posted - 2008-08-06 : 08:44:56
|
I tried using a TRIM and changed both Text Box Values to Lower Case [LCase] and then compared them using the "LIKE".It works now :) |
 |
|
|
|
|
|
|