We Proposed the same but our user is not satisfied with that
He wants to view some thing like
Company Name Role
Amdox Inc John Contractor,Subcontractor
Sunrise Inc Smith SubContractor
You have a table called ROLES_TABLE composed by 4 records:
NAME, ROLE
===========
John,Consultant
Kenneth,Sales Manager
John,Project Manager
William,Executive Manager
You create a STORED FUNCTION in Oracle, compiling the following SQL code:
CREATE OR REPLACE FUNCTION extract_attributes_for_a_name (
name_of_the_actor IN VARCHAR2
)
RETURN VARCHAR2
IS
BEGIN
DECLARE
concatenation_string VARCHAR2 (500);
CURSOR list_of_attributes_for_name
IS
SELECT DISTINCT ROLE
FROM roles_table
WHERE NAME = name_of_the_actor;
c1_record list_of_attributes_for_name%ROWTYPE;
BEGIN
concatenation_string := '';
FOR c1_record IN list_of_attributes_for_name
LOOP
concatenation_string :=
concatenation_string || c1_record.role || ', ';
END LOOP;
concatenation_string :=
SUBSTR (concatenation_string, 1, LENGTH (concatenation_string) - 2);
RETURN concatenation_string;
END;
END extract_attributes_for_a_name;
/
You create a VIEW as follows:
CREATE VIEW roles_view
AS
SELECT DISTINCT NAME, extract_attributes_for_a_name (NAME) ATTRIBUTES
FROM roles_table;
… and you use in BusinessObjects Designer the columns NAME and ATTRIBUTES from the VIEW called ROLES_VIEW!
HI Donald,
Wonderful!!!
Thanks a lot for u r solution its works fine
but unfortunately we have got readonly permissions on the database
We r not supposed to create any objects
Can u plz suggest a soln that can be done either universe or report level
Hi Reeema
I tried with ||’’ this also
i was not successful
can u plz elaborate with some explanation(Example)
Then only block to your activity is that you CANNOT create the stored function and the view, if I understood well.
As you can see, a CURSOR in my opinion is NECESSARY to create a VIRTUAL TABLE (“VIEW”) from which you can read directly the results.
Please ask to the Admin of the Oracle Server if you can create a simple VIEW and a simple STORED FUNCTION, that make no modifies on the DB, but only offer a proper way to read and group some data.
In the while, I’ll think for a solution at Designer / Reporter level, but I think it is not possible without DDL integration.
Let’s suppose you have a table called “ROLES_TABLE”, with 2 columns: NAME varchar2(20), and ROLE varchar2(20).
You can insert a class in the Designer, called “Roles Table”, with two objects: Name (Character) and Role (Character).
Now in B.O. Reporter you can create a simple table with Name and Role in BODY (nothing in column, and nothing in row): just a standard table.
Set Name column as master, creating a section . Right click on the table, then select “Rotate table”. In the column with the formula “=NameOf()”, you can insert the formula “=” (avoid " of course).
Then, right click on the cell you set previously as master of the section, and click Delete (DON’T delete the section , but delete only the cell containing che formula “=”!!).
To reduce the spaces between every “bar”, just move the table (you can also use the Format Table to specify the Appearance of the table…) to the upper limit of the section : you’ll obtain an optical effect similar to what you wish to yield, with exception of comma (every role appears in a different cell).
The length of the bars depends on how many roles every person has.