Connecting Tech Pros Worldwide Forums | Help | Site Map

how can we display particular record by using oracle report

Newbie
 
Join Date: Jul 2009
Posts: 4
#1: Jul 7 '09
hi all
i am new in oracle!
i made one simple form with report and i made one print button
with trigger.(when-button-pressed)
when i press the print button so its giving me whole data,i do not want whole information of the database i want to print particular record..
some one told me use query but i do not know where i place that query.

can anyone guide me how can we display the particular data in PDF format?



here is my print button code:


Expand|Select|Wrap|Line Numbers
  1. DECLARE 
  2. repid REPORT_OBJECT;
  3. v_rep VARCHAR2(100);
  4. rep_status VARCHAR2(20);
  5. BEGIN
  6. repid := FIND_REPORT_OBJECT('REPORT9');
  7. v_rep := RUN_REPORT_OBJECT(repid);
  8. rep_status := REPORT_OBJECT_STATUS(v_rep); 
  9. WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') 
  10. LOOP 
  11. rep_status := report_object_status(v_rep); 
  12. END LOOP; 
  13. IF rep_status = 'FINISHED' THEN 
  14. /*Display report in the browser*/ 
  15. WEB.SHOW_DOCUMENT('http://sara:8889/reports/rwservlet/getjobid'|| 
  16. substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank'); 
  17. ELSE 
  18. message('Error when running report'); 
  19. END IF;
  20. PAUSE;
  21. END;
i hope so i will get prompt answer


please guide me i am really fed up now.


Sarah

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Jul 7 '09

re: how can we display particular record by using oracle report


Hi, welcome to Bytes.
Quote:

Originally Posted by sarahaman View Post

i hope so i will get prompt answer

Not if you post in the wrong section. I've moved your thread to the correct place for Oracle questions where you should get a better response.

Please also remember to use code tags when posting code. Good luck!
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#3: Jul 8 '09

re: how can we display particular record by using oracle report


The output is coming from the oracle report. So in order to filter the records that you dont want, you will need to modify the SQL Query in Oracle Reports rdf file. Doing that, your report will give you only the data that you want.

I hope this gives you an idea on what you need to do exactly. Do post back in case you are not able to understand.
Newbie
 
Join Date: Jul 2009
Posts: 4
#4: Jul 9 '09

re: how can we display particular record by using oracle report


dear sir

actually i want to pass parameters form to report i used so many ways to do it but unfortunatly i m failed.I am little bit confused when i give the value to parameter is passing only the same value which one i specified in

plid paravalues number :='10';

but when i remove value 10 then report is coming blank

i do not want to specify value in variable i want it took value from text field the same value what i entered in the text box.
i hope u got me
waiting for prompt answer

sarah Aman
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#5: Jul 9 '09

re: how can we display particular record by using oracle report


Try this sample code which would help you pass parameters from form to report:

Expand|Select|Wrap|Line Numbers
  1. DECLARE
  2.          id_pl            ParamList := NULL; 
  3.     v_repid         REPORT_OBJECT;
  4.     param_list_name    VARCHAR2(30) := 'para_lista';
  5. v_rep             VARCHAR2(100);
  6.  
  7. NREPORT         VARCHAR2(30) := ‘myreport’;
  8. MYWHERE        VARCHAR2(300) := ‘’;
  9. INTESTA_RP        VARCHAR2(300) := ‘’;
  10. BEGIN
  11.        v_repid     := find_report_object(NREPORT );
  12. Id_pl         := GET_PARAMETER_LIST(param_list_name); 
  13. IF NOT ID_NULL(Id_pl) THEN 
  14. DESTROY_PARAMETER_LIST(Id_pl);
  15. END IF;
  16. id_PL         := CREATE_PARAMETER_LIST(param_list_name);
  17. --
  18. ADD_PARAMETER(ID_PL, 'PARAMFORM',     TEXT_PARAMETER, 'NO');
  19. ADD_PARAMETER(ID_PL, 'MYWHERE',      TEXT_PARAMETER, MYWHERE);
  20. ADD_PARAMETER(ID_PL, 'INTESTA_RP',    TEXT_PARAMETER, INTESTA_RP);
  21.  
  22. V_REP  := run_report_object(v_repid,id_PL);
  23.  
Make sure you create a parameters with the same name as the parameter
that you are passing in the parameter list
Newbie
 
Join Date: Jul 2009
Posts: 4
#6: Jul 10 '09

re: how can we display particular record by using oracle report


thanks alot i have recoverd its working now.


now i am trying to pass more parameters


thanks for everything


sarah
Newbie
 
Join Date: Jul 2009
Posts: 4
#7: Jul 12 '09

re: how can we display particular record by using oracle report


i wonder so many ppl is facing the same problem and no one knows how to start report server in 10g v-10-1-2 including me

everyone is getting the same error:

FRM- 41213: Unable to connect to the report servername



sarah amam
Reply