February 17, 2009 at 3:43 am
I'm trying to check if a parameter passed into the report is in a field in a report dataset using the instr function (although Books online 2008 doesn't have this text function it is in the expression builder). The parameter is a string parameter, and the field returned is a varchar (returned from an sp).
Whenever i just put the instr function in the table it returns the integer value i expect, but when i nest it in an IIF and return the field i want to i get a blank.
Does anyone know what is going on. This is driving me crazy.
In the Books Online 2008 i have it says there is a FIND function. Maybe this is a known bug and was fixed by replacing the instr function? Although this won't help as we aren't upgrading to 2008 for a few months at least.
Any help would be much appreciated,
Matt
February 17, 2009 at 3:49 am
Actually it is #Error i am getting not a blank.
I'm thinking i may need to do some data type conversion in the expression.
February 17, 2009 at 4:54 am
I've actually found my problem and it wasn't the instr function at all. That worked fine.
It was a second condition in the IIF statement that was comparing an integer to a string and when both were blank or null it was returning an error - solution using CStr to convert int field.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy