How to load reports from a Record Group

Dicas e truques sobre Oracle Reports Builder - modo gráfico ou modo caractere, ascii, arquivo .PRT, etc
Post Reply
User avatar
TBou
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 136
Joined: Thu, 05 Aug 2004 9:33 am
Location: Campo Grande - MS
Thiago Bourscheidt
thiago.info@apoiorural.com.br
Analista de Sistemas

I'm trying to call the Reports by passing a record group instead of consultation ...
because in this report I have relation to several temporary tables.
And how does Reports work with another section so I would like to receive some tips on how to work with this case ..?
If you can get the record group on the call ..?
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

I believe you can not pass a Record-Group as a parameter. But to solve the session problem, I usually use a table that has a session field.

In this table, I record the parameters that I want and along, the Forms session.

When I call the Report, I just step on the forms of the forms. (Obviously, the report is already prepared to receive the session and seek in this table what is his)

Said?
User avatar
TBou
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 136
Joined: Thu, 05 Aug 2004 9:33 am
Location: Campo Grande - MS
Thiago Bourscheidt
thiago.info@apoiorural.com.br
Analista de Sistemas

This mode of recording the session number I tmb already work in some cases ...
But my intention was to pass the query already processed for Reports ...

Thanks ..
User avatar
leobbg
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Fri, 29 Oct 2004 10:25 am
Location: PORTO ALEGRE - RS
Leo BBG Consultor Oracle

Dude, I do not know if you can understand what I'm going to put here .. until I'm not accustomed to formatting my messages here .. but there goes .. a procedure that I call in a forms, like .. in that case I am Creating a Record Group .. But you can use existing ones ...

Select all

procedure chama_report( preport_name in varchar2 ) is 
  -- 
  pl_id paramList; 
  -- 
  vgroup_name varchar2(30)   := 'TE'; 
  vquery      varchar2(2000) := 'select lt.codigo '                   || 
                                ',      lt.descricao '                || 
                                'from   instrumentos_medicao     lt'  || 
                                ',      laudos_ppra_instrumentos tt ' || -- Tipo.. essa tabela não tem no report 
                                'where  lt.codigo = tt.inme_codigo(+)';  -- no report deve conter acredito eu 
  vrecord_id                    recordgroup;                             -- uma tabela que pelo menos tenha o mesmo 
  vnum                          number;                                  -- nome das colunas que iram retornar 
  -- 
begin 
   -- 
   vrecord_id := find_group( vgroup_name ); 
	 -- 
   if not id_null( vrecord_id ) then 
     -- 
 
     delete_group( vrecord_id ); 
     -- 
   end if;  
 	 --  
   vrecord_id := create_group_from_query( vgroup_name, vquery );  
   -- 
   delete_group_row( vrecord_id, all_rows );  
   -- 
   vnum := populate_group_with_query( vrecord_id, vquery );  
	 -- 
   pl_id := get_parameter_list( 'tmpdata'); 
   if not id_null( pl_id ) then 
  	 destroy_parameter_list( pl_id ); 
   end if; 
   -- 
   pl_id := create_parameter_list('tmpdata');  
   -- 
   add_parameter( pl_id, 'QTE'        , data_parameter, vgroup_name   ); 
   add_parameter( pl_id, 'paramform'  , text_parameter, 'no'          ); 
   add_parameter( pl_id, 'maximize'   , text_parameter, 'yes'         ); 
   -- 
   run_product( reports, preport_name, synchronous, runtime, filesystem, pl_id, null ); 
   -- 
end; 
User avatar
leobbg
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Fri, 29 Oct 2004 10:25 am
Location: PORTO ALEGRE - RS
Leo BBG Consultor Oracle

I passed as a parameter to report the "parameter" qte, did not include this parameter in the report .. what to do with it then ??? Create a SQL with the name "qte" !! And of course, with the same columns you have in Record Group ... "But as if that's exactly what I do not want to do", it's just create a SELECT like this:

Select all

Select 1 nome_da_coluna 
,         2 nome_de_outra_coluna 
from   dual

Ready .. ta oh what you wanted !! hug
ricards
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 52
Joined: Sat, 29 Sep 2007 12:59 am
Location: Araraquara-SP
Contact:
Ricardo Neves
Analista e Instrutor Oracle Developer
Java Developer (JPA/JSF/Hibernate/WebServices/EJB)

Personnel

follows a reports tutorial based on Record Group that I did
http://en.glufke.net/oracle/viewtopic.php?t=6653
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests