Re: Matrix on Forms 5.0 - Stucked - Help!

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1998/01/14
Message-ID: <884793201.133431303_at_dejanews.com>#1/1


In article <69gsjn$k0q_at_brown.telepac.pt>,   "Jorge Meirim" <no_spam_at_thank.you> wrote:
>
> In Microsoft Access I'am able to represent a simple matrix in a "FORM".
> How can one implement such a structure in DEV 2K.
>
> I Have a table with 3 Columns Sales Person ,Date, and Value.
>
> The Normal representation in Forms Block would some kind of a list.
> How can I obtain somekind of matrix having the Salesperson as Y column and
> the Date as X column.
>
> Sales
> Person| DATE 13/1/98 14/1/98 ......
> A $1000
> B
> C $1000
> ...
>
> DECODE.... no!
> Reports do it easily. How can i do it with forms.
> Where to read?
> I want to work with weeks
>
> Regards
>
> J. Meirim

Create a cursor as
  select person,date,val from tablex order by person,date;

In a loop in a Forms procedure, fetch rows from the cursor. For the same person, display the value in the proper column on the form. When you encounter a new person, do a next_record, and repeat the operation. When all rows have been fetched, do a first_record to go back to the top row.

Use a control block to do this, not a base-table block.

Steve Cosner



http://members.aol.com/stevec5088
Downloadable utility form: Display and update any table.
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Wed Jan 14 1998 - 00:00:00 CET

Original text of this message