Home » Developer & Programmer » Reports & Discoverer » Display Table Column on Report Header
Display Table Column on Report Header [message #612365] Wed, 16 April 2014 11:35 Go to next message
Adeel Qadir
Messages: 41
Registered: November 2013
Location: Pakistan
Member
Hello Experts,

Using Report Builder 6i

In my project i have a table that name is 'Company Information Form'
I want to display Company Name in all reports header from Company information Table.

please help me how can i display Company name in report header from company table.



[Updated on: Wed, 16 April 2014 11:39]

Report message to a moderator

Re: Display Table Column on Report Header [message #612370 is a reply to message #612365] Wed, 16 April 2014 14:37 Go to previous messageGo to next message
Littlefoot
Messages: 19887
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you want to display it in ALL reports, maybe the simplest option would be to create a report template and then base all your reports on it.

In order to display company name, you could do that by either performing SELECT ... INTO in a report (for example, in its After Parameter Form trigger) or by creating a stored (database) function which would return that value. Basically, function's code would be equal to the report trigger's one.

First, create a user parameter, let's call it PAR_COMPANY_NAME. Code which selects the value would look like
select company_name
  into :par_company_name
  from company_information_table
  <WHERE clause goes here, if necessary>

If you choose to use a function, report would contain only
:par_company_name := f_company_name;
where F_COMPANY_NAME is a stored function, such as
create or replace function f_company_name
  return company_information_table.company_name%type
is
  retval company_information_table.company_name%type;
begin
  select company_name
    into retval
    from company_information_table
    <WHERE goes here>;

  return (retval);
end;


Finally, in report's (or template's) header, create a field whose source is previously created (and populated) user parameter: PAR_COMPANY_NAME. That would be all.
Re: Display Table Column on Report Header [message #612432 is a reply to message #612370] Fri, 18 April 2014 07:18 Go to previous message
Adeel Qadir
Messages: 41
Registered: November 2013
Location: Pakistan
Member
Thanks for your response.

Problem Solved Smile
Previous Topic: BarCode Report Oracle 10g
Next Topic: Background set in oracle report
Goto Forum:
  


Current Time: Fri Dec 19 05:09:13 CST 2014

Total time taken to generate the page: 0.22019 seconds