Re: Oracle Reports 2.5

From: <schuler_at_tracoris.com>
Date: Thu, 01 Apr 1999 15:32:20 GMT
Message-ID: <7e03i4$900$1_at_nnrp1.dejanews.com>


In article <7de74f$3tg$1_at_nnrp1.dejanews.com>,   whit3hawk_at_my-dejanews.com wrote:
> Need help passing sort parameters to query.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
You can use Forms 4.5 (or 5.0) to create a more sophisticated parameter data entry form. Once the user enters the sort information that you need you can build the Order By clause as a text string that you send to Reports. PROCEDURE do_report IS
  pl_id ParamList;

BEGIN /* Do parameter validation here */

   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, 'P_1', TEXT_PARAMETER, :block.item_name1);
   add_parameter (pl_id, 'P_ORDER_BY', TEXT_PARAMETER, :block.item2);
   add_parameter(pl_id,'ARRAYSIZE', TEXT_PARAMETER, '100');
   run_product(REPORTS, 'MyReport', ASYNCHRONOUS, runtime,
               filesystem, pl_id, NULL);
   EXIT_FORM;
end;
Where MyReport is the name of your .RDF or .REP file.

Inside Reports you have a parameter called P_ORDER_BY and you can put that into your query with an & in front of it. Select * From my_table Where my_field = some_value &P_ORDER_BY Make sure P_ORDER_BY has enough characters to hold the entire clause.

Ernie

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Apr 01 1999 - 17:32:20 CEST

Original text of this message