Hi Derek,
The word "crosstab" caught my eye. Yes, you definitely need to do a
crosstab in this situation because
the Areas are changing ("more or less areas") as you pointed out
earlier. Crosstabs are rows of records
that are they themselves become columns or fields but not exactly a
physical table field.
Assuming that you have properly designed your tables. Yours could be
similar to this site:
http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=25
Hope this gives you an idea.
Regards,
Benj
On Dec 4, 8:19 am, Derek <[email protected]> wrote:
> Benj, thanks for the response. Actually I have several tables;
>
> The first two are to store titles for the rows and columns (and to
> enumerate them).
> LineItems
> LineItemID (pk)
> LineItemName
> [some other columns that aren't relevant to this discussio]
>
> Areas
> AreaID (pk)
> AreaName
>
> Then, my data table consists of
>
> InvoiceDetails
> InvoiceDetailsID (pk)
> InvoiceID (fk to an Invoice table)
> AreaID (fk)
> LineItemID (fk)
> SpendAmount
>
> So what I want to do is to take the InvoiceDetails table and create a
> crosstab from it, applying the row and column labels from my other two
> tables. Displaying this data is straightforward, but what I'd like to
> do is create some kind of mechanism so that I can use it in a grid-
> type format, ie a Datagrid. It sounds like that could be done using a
> collection; I've never used those, can you give me an idea where to
> start? Or point me at an appropriate reference?
>
> And to all the rest of you, who used this post as an opportunity to
> debate table naming; stop trying to hijack the subject!
>
> Regards,
> DG