Hello,
I am using Visual studio 2005 against an infomix odbc datasource for my report.
I am trying to get previous weeks data to display.
I have a parameter to prompt for sales week and have that added to my table filters.
I then have the following formulas to grab the week entered as well as the previous 3 weeks.
week1
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value,0)
week2
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value -1,0)
week3
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value -2,0)
Week4
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value -3,0)
I then have formulas to bring back the sales dollars if they fell in the appropriate sales week.
Week1SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week1.Value,Fields!sl_price.Value,0)
Week2SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week2.Value,Fields!sl_price.Value,0)
Week3SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week3.Value,Fields!sl_price.Value,0)
Week4SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week4.Value,Fields!sl_price.Value,0)
When I add the week1, week, week3, week4 formulas they come back on the report with the proper results. (ie week 23,22,21,20)
When I add the Week1SalesDollars,Week2SalesDollars,Week3SalesDollars,
Week4SalesDollars formulas to the report, I get the value for Week1SalesDollars, but all other week*SalesDollars come back as zero.
Any ideas on why week1salesdollars works but none of the other formulas work?
Any help would be greatly appreciated.
Thanks,
Stacey
I am using Visual studio 2005 against an infomix odbc datasource for my report.
I am trying to get previous weeks data to display.
I have a parameter to prompt for sales week and have that added to my table filters.
I then have the following formulas to grab the week entered as well as the previous 3 weeks.
week1
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value,0)
week2
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value -1,0)
week3
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value -2,0)
Week4
=IIF(Fields!wx_week.Value=Parameters!SalesWeek.Value,Fields!wx_week.Value -3,0)
I then have formulas to bring back the sales dollars if they fell in the appropriate sales week.
Week1SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week1.Value,Fields!sl_price.Value,0)
Week2SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week2.Value,Fields!sl_price.Value,0)
Week3SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week3.Value,Fields!sl_price.Value,0)
Week4SalesDollars
=IIF(Fields!wx_year.Value=Parameters!SalesYear.Value and Fields!wx_week.Value=Fields!Week4.Value,Fields!sl_price.Value,0)
When I add the week1, week, week3, week4 formulas they come back on the report with the proper results. (ie week 23,22,21,20)
When I add the Week1SalesDollars,Week2SalesDollars,Week3SalesDollars,
Week4SalesDollars formulas to the report, I get the value for Week1SalesDollars, but all other week*SalesDollars come back as zero.
Any ideas on why week1salesdollars works but none of the other formulas work?
Any help would be greatly appreciated.
Thanks,
Stacey