Doubt :: Forms x Reports x Record_Group (URGENT)

Dicas e truques sobre Oracle Reports Builder - modo gráfico ou modo caractere, ascii, arquivo .PRT, etc
Post Reply
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Guys, good morning.
Is everything okay?

I have a problem here and I would like to know if anyone has passed by:


1) Situation:

Create a Forms, which dynamically creates a Record Group and, passes this Record Group as a parameter for Reports.


2) Problem:

Reports begins to process, but, lock in formating Page 1 , this was not for such locking, because the same returns 10 lines.


3) Scenario:

3.1 - Reports version:

Select all

 
  Report Builder 6.0.8.27.0  
  ORACLE Server Release 8.0.6.3.1 
  Oracle Procedure Builder 6.0.8.21.0 
  Oracle ORACLE PL/SQL V8.0.6.3.0 - Production 
  Oracle CORE Version 4.0.6.0.0 - Production 
  Oracle Tools Integration Services 6.0.8.18.0 
  
]

3.2 - Forms version:

Select all

 
  Forms [32 Bit] Version 6.0.8.27.0 (Production) 
  Personal Oracle8i Release 8.1.7.0.0 - Production 
     With the Partitioning option 
     JServer Release 8.1.7.0.0 - Production 
  Oracle Toolkit Version 6.0.8.25.0 (Production) 
  PL/SQL Version 8.0.6.3.0 (Production) 
  Oracle Procedure Builder V6.0.8.21.0 Build #1459 - Production 
  
3.3) Code in Forms:

Select all

 
PROCEDURE PRC_RUN_REPORT (P_VALOR IN NUMBER) 
IS 
 
 PL_ID PARAMLIST; 
 RG_FORMULAS       RECORDGROUP; 
  
 VG_EMPNO          GROUPCOLUMN; 
 VG_ENAME          GROUPCOLUMN; 
 VG_DNAME          GROUPCOLUMN; 
  
 V_INDICE          NUMBER := 0; 
 
 CURSOR CUR_DEPT 
   IS  
			SELECT E.EMPNO, 
			       E.ENAME, 
			       D.DNAME 
			  FROM EMP E, 
			       DEPT D 
			 WHERE D.DEPTNO = E.DEPTNO 
			   AND D.DEPTNO = P_VALOR; 
 
BEGIN 
 
 RG_FORMULAS := FIND_GROUP('RG_DEPTO'); 
  
 IF NOT ID_NULL(RG_FORMULAS)  
 THEN 
 	  DELETE_GROUP(RG_FORMULAS); 
 END IF; 
 
 RG_FORMULAS     := CREATE_GROUP('RG_DEPTO', GLOBAL_SCOPE); 
 VG_EMPNO        := ADD_GROUP_COLUMN(RG_FORMULAS, 'EMPNO',  CHAR_COLUMN,   04);  
 VG_ENAME        := ADD_GROUP_COLUMN(RG_FORMULAS, 'ENAME',  CHAR_COLUMN,   10); 
 VG_DNAME        := ADD_GROUP_COLUMN(RG_FORMULAS, 'DNAME',  CHAR_COLUMN,   14); 
 
 FOR X IN CUR_DEPT 
 LOOP 
 	      
 	     V_INDICE := V_INDICE + 1; 
       ADD_GROUP_ROW(RG_FORMULAS, V_INDICE); 
       SET_GROUP_CHAR_CELL (VG_EMPNO, V_INDICE, TO_CHAR(X.EMPNO)); 
       SET_GROUP_CHAR_CELL (VG_ENAME, V_INDICE, X.ENAME); 
       SET_GROUP_CHAR_CELL (VG_DNAME, V_INDICE, X.DNAME); 
        
 END LOOP; 
  
 PL_ID := GET_PARAMETER_LIST('tempdata'); 
  
 -- Se já existir, destrói Lista 
 IF NOT Id_Null(PL_ID)  
 THEN   
   DESTROY_PARAMETER_LIST(PL_ID); 
 END IF; 
  
 PL_ID := CREATE_PARAMETER_LIST('tempdata'); 
   
 -- Substituo a query do report pelo record group 
 ADD_PARAMETER(PL_ID,'Q_1',DATA_PARAMETER,'RG_DEPTO'); 
  
 -- Chamo Report 
 RUN_PRODUCT(REPORTS,'Dept',SYNCHRONOUS,RUNTIME,FILESYSTEM,PL_ID,NULL); 
 
END; 
  
3.4) Select from Data Model in Reports (named Q_1):

Select all

 
			SELECT '' EMPNO, 
			       '' ENAME, 
			       '' DNAME 
			  FROM DUAL; 
  

Thanks.
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Dude, see if this topic helps you: http://en.glufke.net/oracle/viewtopic.php?t=231
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Great, dr_gori, beleza?
Then Brother, I even took a look, I analyzed the parameters, before performing my post, because they are the same and, my reports travels even ...
If anyone knows of some tip ...

The show log of Reports is like this:

Select all

 
 
Starting report Rel_Dept [Tue Jun 19 09:04:35 2007] ... 

Thanks
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

If it's some bug, you might be able to do this in other ways, as quoted at that link:
* Create a temporary table and include whatever you want in it. (passing the session number in the table and parameter).
* No Report, make a Select filtering the session number from Forms (per parameter).

is a means "rudimentary", but it works perfectly.
In the end, you delete the lines of the informed session.

: -O
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

So I will try Dr. Gori ..

But, next, this line is commented:

Select all

 
 -- Substituo a query do report pelo record group  
 ADD_PARAMETER(PL_ID,'Q_1',DATA_PARAMETER,'RG_DEPTO');  
It works ... It's true that the relat will not return values, because on the date model the select is from dual does not lock.

Here is the doubt ...
Hahu
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 147
Joined: Thu, 16 Mar 2006 11:26 am
Location: São Paulo
O mundo gira muito!!

Speech Trevisolli,
Good morning, my friend,
then ... I was looking at what you did below ... the problem and the following you can not put the q1 ... there eee where will the Parameters of the type p_nomedocampo..yvened?
: Roll:
Exp:

Select all

 
ADD_PARAMETER(PL_ID,'Q_1',DATA_PARAMETER,'RG_DEPTO');  
 
 
ADD_PARAMETER(PL_ID,'p_cod_depto',DATA_PARAMETER,'RG_DEPTO');  
 
any things put there !!
ABS of your friend hahu :) -m
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Hahu, beleza Brother?

Then, until I found the error and, it follows below, for anyone who needs it.

Next, on my Data Model, besides the name of the columns (from dual) having to be the same as the record group, the "spaces" of her tb.

Ex: No record group, had a char_column with size 14.

In the Data Model select, I put 14 spaces such as Below, for example, and gave right!

Select all

 
  select '              ' DNAME 
    from  dual 
There is a tip for anyone who needs it.
Thanks to everyone for attention.
Renan Orati
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 90
Joined: Thu, 23 Aug 2007 3:40 pm
Location: São José do Rio Preto - SP

Good morning to all,

Is it possible to use the record of Record_Group to Reports in 10G version?!
I'm trying and is returning the following error:
REP-53053: Invalid arguments for function call
vlw!
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests