I am using the available begin date and enddate parms to populate the report title that shows  "ABC DATA FROM MM/DD/YY  TO   MM/YY/DD" on the header. Here is the code I am using:
" Data from "&Parameters!BeginDate.Value &" to "& Parameters!EndDate.Value " . It works fine when "optional" From and To Dates are filled in. When using null  then my report title looks like " ABC DATA  FROM   TO  " . Is there a way for me to change the code so when NULL dates are passed it should not print " FROM  TO" ?
Abdul KhanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Arifhusen AnsariBusiness Intelligence Developer and AnalystCommented:
use below expression it will take care of all the possibilities.

="ABC DATA " & IIF( ISNOTHING(Parameters!BeginDate.Value),"From Begining","From "& FORMAT(Parameters!BeginDate.Value,"MM/dd/yyyy"))
&  IIF( ISNOTHING(Parameters!EndDate.Value)," Till Today"," To "& FORMAT(Parameters!EndDate.Value,"MM/dd/yyyy"))

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Abdul KhanAuthor Commented:
Thanks so much for sharing the expression, I will always use this one.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.