Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle reports: Problem displaying same column a number of times on row

Re: Oracle reports: Problem displaying same column a number of times on row

From: Surfnet <j.r.l.m.batailleVERWIJDER_DIT_at_uva.nl>
Date: Tue, 23 Apr 2002 16:04:43 +0200
Message-ID: <aa3pjg$34f$1@news.surfnet.nl>


Hello Mary,
this is an interesting one. AFAIK there is no way to have Reports repeating a frame in a horizontal direction.
All I can think of is using a formula column to compose the desired string. I ended up with this:

change the query:
select table_name from user_tables order by table_name

then create a formula column with this formula: function CF_1Formula return Char is

cursor          c_tab_columns ( b_table_name varchar2)
                is
                select  column_name
                  from  user_tab_columns
                  where table_name = b_table_name;
r_tab_columns c_tab_columns%rowtype;

l_return varchar2(500) := null;

begin

l_return := :table_name||' ';

open c_tab_columns ( b_table_name => :table_name); fetch c_tab_columns into r_tab_columns;
while c_tab_columns%found
loop
  l_return := l_return||' '||r_tab_columns.column_name;   fetch c_tab_columns into r_tab_columns; end loop;

return l_return;

end;

-- -------------------

then create a field and set its source property to the formula column.

Not really beautifull but it does the job. Does this help?

Regards, Joost

--
Joost Bataille
University of Amsterdam ICT centre
www.ic.uva.nl

remove VERWIJDER_DIT to reply
"Mary" <mmccrohan_at_svi-group.com> wrote in message
news:cdebd5e3.0204222343.1a84daa3_at_posting.google.com...

> I am trying to write a report to display a table name along its column
> names on a single line, but I am having problems doing so.
>
> I would like the report to display something like the following:
> Table TABLE_X ColA ColB ColC ColD
>
> where ColA, ColB, ColC and ColD are the column names in table TABLE_X.
>
> Essentially, the query is select table_name, column_name from
> all_tab_columns where table_name = 'TABLE_X';
>
> Having experimented with the property palette, and setting the Print
> Direction to various settings , e.g. Accross, Accross/Down, I am still
> unable to achieve what I want - i.e. table name and all column names
> appearing on a single line, each column name is consistently being
> printed on a new line.
>
> Is it possible to do this, or is there something obvious that I have
> not done, or is it even possible to do what I am trying to do?
> Any help would be greatly appreciated!!
Received on Tue Apr 23 2002 - 09:04:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US