Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Iff statement in SSRS

Status
Not open for further replies.

staceyn

Technical User
Nov 19, 2004
107
US
Hello,
I am quite experienced in Crystal reports and I am just starting on SSRS.
I am building the report using Visual studio 2005, using an informix database as the datasource.

I am trying to figure out the right syntax to use in my if then else formula.

I am trying to determine a week value by an sales date.
In crystal I would write something like this:

if sales.sl_date >= week.wx_begdate and sales.sl_date <= week.wx_enddate then week.wx.week

In the report, we want to put in a parameter for the week value. When the user inputs the week, I need a formula to determine the sales dates that fall within that week.
Then we need to show a column for that week as well as the 3 prior weeks.
So it would be something like:
user inputs week 14.
On the report we show a column for week 14 sales dollars, week 13 sales dollars and week 12 sales dollars.

Any help would be appreciated.

Thanks,
Stacey
 
You would be better off using the parameter as an input for a query that determines the weeks to show - you can then use this to restrict your dataset to just the weeks you want to show

In terms of IIF syntax, it is

=IIF(LogicalTest,Truepart,Falsepart)

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top