Passing user parameters from FORM to Report Oracle 10g

I'm trying to pass 3 parameters from my form(data block) to my report in the 10g environment, this is not working because my report keeps coming out blank.  I've included a snippet of my code below.  Is there a bug preventing the passing of forms data block data to a form because I did this 6i with no problem but I just upgraded to 10g now this is broke?
PROCEDURE Run_Report IS
 
	repid 		REPORT_OBJECT; 
	v_rep 		varchar2(100) := ''; 
	rep_status 	varchar2(20) := ''; 
	repParamTemp  	varchar2(255) := '';
	alert_response	varchar2(10) :='';
	mimetype	varchar2(255) := '';
	timer_id 	Timer;	
 
-- Used for Reports with Param Form	
	uname		varchar2(100) := get_application_property(username);
	pwd		varchar2(100) := get_application_property(password);
	conn		varchar2(100) := get_application_property(connect_string);
	tmpNumber	number;
	repOther_tmp	varchar2(255) := '';
	hidden_action	varchar2(512) := '';
	i 		number (5);
	c 		char;
	c_old 		char;
	c_new 		char;
	
 
Begin
	
	CLEAR_MESSAGE;
    	YNCHRONIZE;
	
  	repid := find_report_object('rpt1');
  	
 
-- Set Report Object properties 
-------------------------------	
	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, BATCH);
 	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, CACHE);
 	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, 'repsrvr');
 	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'PDF'); 
 	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
 	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME, 'rpt1.RDF');
 	SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER,'p1='||:block1.field1||' 
	'||'p2='||:block1.field2||' '||'p3='||:block1.field3); 		
 
	
		
-- Run report and get status
-------------------------------	
		:control.status := 'Requesting report...';	
		SYNCHRONIZE;
		SYNCHRONIZE;
				
 		v_rep 		:= RUN_REPORT_OBJECT(repid); 
 
		rep_status 	:= report_object_status(v_rep); 
		:control.status := rep_status;
		SYNCHRONIZE;
		WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||'repsrvr'|| mimetype,'_blank');
 
 
END;

Open in new window

camposaaAsked:
Who is Participating?
 
sonicefuConnect With a Mentor Commented:
embed the following code it'll clear most of the problems
message(:block1.field1||'--'||:block1.field2||' ---'||:block1.field3); 
message('Report ID '||repid)
 
-- Run report and get status
------------------------------- 
.........................................
.......................................
........................................

Open in new window

0
 
camposaaAuthor Commented:
line 2 gets me an error message saying:  wrong number or types of arguments in call to'||'

The first line shows me the the 3 values from the form that need to be passed to the report
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
sonicefuCommented:
message('Report ID  '||to_char(repid));
0
 
sonicefuCommented:
Search the fileName.pdf, i think it is being saved at the hard drive
0
 
sonicefuCommented:
have checked, what is the output of the following?
message('Report ID  '||to_char(repid));
or
message('Report Id : '||repid);

Open in new window

0
 
camposaaAuthor Commented:
Yes the report is coming up but it is blank because nothing is being passed from the form to the report for some reason.  I'm getting the same error message for both of these lines.
message('Report ID  '||to_char(repid));
or
message('Report Id : '||repid);
0
 
camposaaAuthor Commented:
Does REPORT_SOURCE_BLOCK have to be identified to data/params from the FORM to the REPORT?
0
 
schwertnerConnect With a Mentor Commented:
See the values of ||:block1.field1  .. 2  and  3.

be aware that you use procedure and possibly they are out of scope.
Try to pass them as parameters of the procedure:

PROCEDURE Run_Report (p_1 VARCHAR2, p_2 VARCHAR2, p_3 VARCHAR2) IS


......

SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER,'p1='||:block1.field1||' '||'p2='||:block1.field2||' '||'p3='||:block1.field3);

REPORT_OTHER,'p1=' ||  p_1 ||'  '||'p2= p_2 ||'  '||'p3='|| p_3);


Also see this:
http://www.oracle.com/technology/products/forms/pdf/10g/frmrepparamform.pdf


0
 
camposaaAuthor Commented:
I figured it out using ADD_PARAMETER...created a param list.  Thanks.
0
All Courses

From novice to tech pro — start learning today.