Home » Developer & Programmer » Forms » How to display data in Dynamic columns grid (ds 10g)
icon3.gif  How to display data in Dynamic columns grid [message #317462] Thu, 01 May 2008 08:50 Go to next message
since
Messages: 18
Registered: May 2008
Junior Member
Hi all,

The database table is like:

ID   Class    Value
001  AAA      3.4
001  BBB      4.52
001  EEE      9
003  BBB      4
004  AAA      2.3
004  CCC      3.44


I want to display in the forms using data blocks like this:

ID    AAA    BBB    CCC    DDD    EEE    ...
001   3.4    4.52                 9
003          4
004   2.3           3.44

The question is, the record of column 'Class' may be any text, that means, there maybe 3 column in the Forms, maybe 5 or more, but less than 40. The label of columns could be 'AAA', 'BBB', 'ASDF','XYZ' or any other text.

Does anybody could give me a solution about this?

Thanks a lot.
Re: How to display data in Dynamic columns grid [message #317488 is a reply to message #317462] Thu, 01 May 2008 09:44 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I might be wrong, but I'm quite certain that Forms Builder is incapable of doing such a task in a simple manner.

This looks like a pivoting problem, and I believe that you should create a VIEW which would return data as you'd like it to, and then create a form based on that view. As you already know that it can not contain more than 40 columns (i.e. the column list is known), perhaps it might be done relatively easily.

On the other hand, if you'd just like to present data to end user, you might consider using Reports Builder instead and creating a matrix report.
Re: How to display data in Dynamic columns grid [message #322013 is a reply to message #317488] Thu, 22 May 2008 02:42 Go to previous message
since
Messages: 18
Registered: May 2008
Junior Member
Thank you very much for your reply.

Now I'm thinking about this solution:

Use a procedure as the datasource to create the datablock with 40 items,and then pass parameters to the procedure, then procedure get all the column (e.g. got 15 column name, and for the other 35 column, set to null in the return back cursor SQL).
Then fill the items, and hide some items.

I'm just imagine, some other day will perform a test.
Previous Topic: Changing Tab Pages Colors in Forms 10g
Next Topic: suggestions required
Goto Forum:
  


Current Time: Sun Feb 09 23:43:14 CST 2025