December 15, 2016 at 3:29 am
Hi,
I have a formula in crystal report which I need to convert them to an equivalent SSRS expression.
Since I am a newbie in SSRS, can anyone suggest me how this can be written in an expression.
Formula:
local stringvar val := "";
local stringvar place := "";
local stringvar build := "";
if not isnull({StoredProcedure.BuildName}) then
if trim({StoredProcedure.BuildName}) <> "" then
(
build := {StoredProcedure.BuildName};
val := trim({StoredProcedure.BuildName});
);
if not isnull({StoredProcedure.Location}) then
if trim({StoredProcedure.Location}) <> "" and trim({StoredProcedure.Location}) <> build then
(
if val <> "" then val := val + " / " + {StoredProcedure.Location} else val := {StoredProcedure.Location};
place := {StoredProcedure.Location}
);
if {StoredProcedure.Record} = "I" then
if not isnull({StoredProcedure.Park}) then
if trim({StoredProcedure.Park}) <> "" and trim({StoredProcedure.Park}) <> place and trim({StoredProcedure.Park}) <> build then
if val <> "" then val := val + " / " + {StoredProcedure.Park};
val;
December 15, 2016 at 9:40 am
It looks like you're concatenating the BuildName, Location, ... putting a slash (/) between the names if they are different. Take a look at the IIF(), ISNOTHING() and SWITCH() functions for starters and the concatenation operator (&).
HTH,
Rob
Viewing 2 posts - 1 through 1 (of 1 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