Select Data out of Dataset

  • Thread starter Thread starter scorpion53061
  • Start date Start date
S

scorpion53061

Hi

I think I am on the right track here but unsure......

I need to:

1. find all like items in the ITEMNO column in the dataset called "RESULTS"

2. in the column called "DATE" (called DATE with a smalldatetime value -
example it might say 1/2/2002) of the dataset "RESULTS" add up all the
transactions that occured in the month of January for this item (see #1) and
add them together and assign them to the variable called "Jan" which has a
decimal value.

What I have:

Dim itemcheck as Integer
For itemcheck = 0 to dstran1.Tables(0).Rows.Count - 1
drnew.Item("JAN") = dstrancopy.Tables(0).Select("ITEM = " &
dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM") & " and " & Format("DATE =
" & dstrancopy.Tables(0).Rows(itemcheck).Item("DATE"), "MMM") & " = JAN"
.....problem of adding the column TOTAL together for these selected items)

etc for months 2- 12
--------

What I am missing: (assuming this is right):

I have to somehow add all the columns of the "TOTAL" for these like items
which is the real value we are after in January.
Any help is appreciated.......
 
Hi Bill,

Are you familiar with useage reports us MIS guys are requested to do?
Basically it is taking all the sales of a particualr item from their
invoices and adding them up their totals to get a monthly useage of the
item.

Normally our accounting software provides this but it does not provide that
functionality for temporary items thus the reason I am getting into
this......

I will have an update on the code I am using in a minute if you will be so
kind as to comment on it.....
 
Back
Top