July 17, 2006 at 10:11 am
Hi,
I'm trying to get my first report of the ground but have hit a stumbling block.
I have an dataset which contains line items from orders. The report I am using is a table format, and I have a group by customer.
The sales are then listed using the following expression
=iif(year(fields!docdate.value)>= Year(today()), fields!value.value, 0)
which just basically returns sales from this current year (and works OK). I then want to subtotal this by customer key, but I cant seem to get the subtotal to return the corect values. I've tried the following
=iif(year(fields!docdate.value)>= Year(today()), sum(fields!value.value), 0)
but of course this returns only a subtotal when all sales order lines are in the current year.
Im use to working in Crystal Reports and I'm sure I'm just doing something dumb!
July 18, 2006 at 2:10 am
Well - am getting further - thought I was doing something dumb.
The field subtotal needs to ref a report item and not a dataset value, that much I found out. However when i try and subtotal the textbox value using the expression
sum(reportitems!textbox4.value)
I get the following error:
The Value expression for the textbox 'textbox3' uses an aggregate function on a report item. Aggregate functions can be used only on report items contained in page headers and footers
What I dont understand is why I can't subtotal a value produced in the details section of the report.
This is becoming really annoying - anyone help me sort this out?
July 18, 2006 at 4:09 am
Can close this - I rewrote my dataset query to get the results i needed.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply