After Parameter Form trigger failed
REP-0771. I have the trigger returning to false on a condition, however, this is when I get the error. All I want to do is return to the parameter form, and it's giving me an error. Is there any way to suppress this error?
Hi Maggie
To validate a parameter value at runtime:
1. In the Object Navigator, expand the Data Model node, then the System Parameters or User Parameters node.
2. Double-click the PL/SQL icon for the parameter for which you want to add a PL/SQL validation trigger.
3. In the PL/SQL Editor, define the PL/SQL to be triggered at runtime
Validation triggers are used to validate the Initial Value property of the parameter. Depending on whether the function returns TRUE or FALSE, the user is returned to the Runtime Parameter Form.
Thanks
Rohit
Similar Messages
-
Report Builder 6i returns ORA-01483 in after parameter form trigger ?
Can anybody help me ?
I've been working on a report with report builder 6.0.8.11.3,
and whenever i run the report the after parameter form trigger
returns REP-1401 and following ORA-01483.
I've been trying to change the values of some user parameters
from within the trigger code, none of them is a date or a number
parameter, these are character variables who would be referenced
lexically to change a table name dynamically when the trigger
fires. Aditionally I'm using a cursor to obtain data and then
modify the parameters.
How can i get this thing to work ?
Thanks in advance for your reply...hello,
this might be related to the usage of number(1) as type/length
of your parameter. this is a known problem. it should be solved
by using e.g. number(2) as the type/length of your parameter.
regards,
the oracle reports team --pw -
Calling report from form and after parameter form trigger
Hi, I've also posted to this to the reports forum but because it works from Reports Builder it may be a forms issue which is why I'm x-posting. Apologies.
I have a report that creates a file, desname is set in the after parameter form trigger (it uses one of the parameter values).
The problem is file is not created using the path and filename set in the trigger, the file is created in the bin folder with the name account_by_service_type.txt (account_by_service_type.rdf is the report definition).
If the desname is set in the before parameter form AND a field with the source=desname is added to the parameter form then the file will be created with the correct path and name however it won't have the relevant parameter incorporated into the file name obviously.
I've noticed in other reports that where the desname is being set in the after parameter form that I've had to pass the desname from the form but obviously I cannot do that here either.
Am I missing something obvious?
Regards
SeanHi Frank,
It's WebForms. Below is the code:
-- call from menu item
run_report_object_proc(TRUE,'accounts_by_service_type.RDF',null,FILE,'delimited','paramform=yes');
-- run_report_0bject procedure
PROCEDURE run_report_object_proc (p_screen IN BOOLEAN,
p_report_filename IN VARCHAR2,
p_desname IN VARCHAR2,
p_destype IN NUMBER,
p_desformat IN VARCHAR2,
p_paramform IN VARCHAR2)IS
v_report_id report_object;
v_report varchar2(100);
v_job_id varchar2(100);
v_url varchar2(1000);
rep_status varchar2(20);
hidden_action VARCHAR2(2000) :='';
BEGIN
v_report_id := find_report_object( 'report2');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_FILENAME,p_report_filename);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESNAME,p_desname);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,p_destype);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,p_desformat);
hidden_action := hidden_action||'&report='||GET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_FILENAME);
hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_DESTYPE);
hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_DESFORMAT);
hidden_action := hidden_action||'&userid='||GET_APPLICATION_PROPERTY(username)||'/'||GET_APPLICATION_PROPERTY(password)||'@'||GET_APPLICATION_PROPERTY(connect_string);
if p_desname is not null then
hidden_action := hidden_action||'&'||p_paramform||'&desname='||p_desname;
else
hidden_action := hidden_action||'&'||p_paramform;
end if;
hidden_action := '/reports/rwservlet?_hidden_server=rserv1'||hidden_action;
SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_OTHER, 'pfaction='||hidden_action||' '||p_paramform);
-- SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_OTHER, 'paramform=no');
v_report := run_report_object( v_report_id);
IF p_screen THEN
v_job_id := substr(v_report,instr(v_report,'_',-1)+1);
rep_status:=report_object_status(v_report);
while rep_status in ('RUNNING', 'OPENING_REPORT', 'ENQUEUED')
loop
rep_status:=report_object_status(v_report);
end loop;
if rep_status='FINISHED' THEN
v_url := '/reports/rwservlet/getjobid'||v_job_id||'?server=rserv1';
web.show_document(v_url,'_blank');
else
message(rep_status||' error running report');
end if;
end if;
END;
-- report after parameter form trigger
function AfterPForm return boolean is
begin
:desname := 'c:\service_type_'||:p_service_type||'_'||to_char(sysdate,'DDMMYYYY')||'.xls';
return (TRUE);
end; -
Difference between After parameter Form Trigger and before Report Trigger
hi,
Can some one tell me difference between After parameter form Trigger and Before parameter trigger.
Why do we need both these trigger , why can't we use any one of them because after parameter trigger will obviously fire before report trigger and similarly before report trigger will fire after parameter form.
Thanks
RamHi,
i will make it clear..!
Actually, we have four type of triggers in reports..!
Before Parameter -- fires before params are suppied to the calling report..
After Parameter -- fires after params are suppied to the calling report..
Before Report -- fires before report is generated..
After Report. -- fires after report is generated..
Before Report and After Report triggers are used for formatting the report design..
like u can specify a report to be displayed based on a condition in the Before
Report trigger and u can specify some backend updations in the after report trigger
which fires after report is generated.. -
Parameter not being set in before parameter form trigger
I am running 10g reports over the web and have a problem with some parameters. I have a User parameter which I set in the BEFORE-PARAMETER-FORM trigger. This parameter is not displayed on the parameter form because it shouldn't ever be changed by a user. It is supposed to be displayed on the report output to show who ran the report, but it is appearing blank.
I've found that if I physically display the parameter on the parameter form it works, but this isn't a realistic option. It looks like it gets cleared out if it isnt displayed on the parameter form. Can anyone explain why and offer any help?Assign value to the parameter in the After Parameter Form Trigger, not Before.
-
After Parameter Form issue - Oracle Reports 10g
Hi All,
I have compiled an .rdf report to an .rep file and when
I run this file I get the "REP-1247: Report contains uncompiled PL/SQL" message.
The issue is I have built the report with dynamic XML customizations in the after parameter form trigger. When I remove this piece of code from the trigger both files .rdf and .rep works fine.
Notice that the .rdf file works fine with the after parameter form XML customization.
Please, can enyone advice me how can I have a .rep file that contains dynamic XML customization (using the srw.add_definition).
Thank you in advance.In Your code there is a line:
add_parameter(pl_id,'PARAMFORM',text_PARAMETER,'NO');
which actually disables the report parameter form.
The line:
WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'|| vjob_id||
'?server=rep_mohahubkpcomp_ORaHOme_IAS'||'&userid=
bedman/bedman@bedman'||'¶mform=yes','_blank');
displays the report to which vjob_id refers. At this point the report is competed so the parameters userid and paramform are useless.
Hope this helps.
Regards
Bekcic Aleksandar -
Problem in Insertion into table through After Report Parameter form trigger
Hi All,
I am getting problem in inserting some data into temp table through Report.
My requirement is like that, I have to do a calculation based on user parameters, and then insert the data into the temp table. I wanted to do this into After Report Parameter form trigger function. I have done all the calculation and wrote all the insert statement in that function. There is no problem in compilation. then I am taking value from this temp table in my formula columns.
When I run this report, it hangs, don't understand what is the problem.Can anybody help me out in this.
Thanks,
NidhiThe code is as follows:
function AfterPForm return boolean is
CURSOR CUR_RECEIPT(RECEIPT_NUM_FROM NUMBER, RECEIPT_NUM_TO NUMBER) IS
SELECT DISTINCT receipt, item_no FROM xxeeg.xxeeg_1229_sp_putaway WHERE RECEIPT BETWEEN
RECEIPT_NUM_FROM AND RECEIPT_NUM_TO ;
V_CUR_RECEIPT CUR_RECEIPT%ROWTYPE;
begin
OPEN CUR_RECEIPT(:RECEIPT_NUM_FROM, :RECEIPT_NUM_TO);
FETCH CUR_RECEIPT
INTO V_CUR_RECEIPT;
LOOP
EXIT WHEN CUR_RECEIPT%NOTFOUND;
IF V_CUR_RECEIPT.ITEM_NO = 'TEST1' AND V_CUR_RECEIPT.RECEIPT = '12' THEN
INSERT INTO SP_TEMP
(RECEIPT, ITEM_NO, LOCATION1)
VALUES
(V_CUR_RECEIPT.RECEIPT, V_CUR_RECEIPT.ITEM_NO, 10);
UPDATE SP_TEMP
SET LOCATION2 = 12
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
UPDATE SP_TEMP
SET LOCATION3 = 13
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
UPDATE SP_TEMP
SET LOCATION4 = 14
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
ELSE
IF V_CUR_RECEIPT.ITEM_NO = 'TEST2' AND V_CUR_RECEIPT.RECEIPT = '12' THEN
INSERT INTO SP_TEMP
(RECEIPT, ITEM_NO, LOCATION1)
VALUES
(V_CUR_RECEIPT.RECEIPT, V_CUR_RECEIPT.ITEM_NO, 10);
UPDATE SP_TEMP
SET LOCATION2 = 16
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
UPDATE SP_TEMP
SET LOCATION3 = 17
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO =V_CUR_RECEIPT.ITEM_NO;
UPDATE SP_TEMP
SET LOCATION4 = 18
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
ELSE
INSERT INTO SP_TEMP
(RECEIPT, ITEM_NO, LOCATION1)
VALUES
(V_CUR_RECEIPT.RECEIPT, V_CUR_RECEIPT.ITEM_NO, 10);
UPDATE SP_TEMP
SET LOCATION2 = 19
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
UPDATE SP_TEMP
SET LOCATION3 = 20
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO =V_CUR_RECEIPT.ITEM_NO;
UPDATE SP_TEMP
SET LOCATION4 = 21
WHERE RECEIPT = V_CUR_RECEIPT.RECEIPT AND ITEM_NO = V_CUR_RECEIPT.ITEM_NO;
END IF;
END IF;
END LOOP;
COMMIT;
CLOSE CUR_RECEIPT;
return(TRUE);
end;
..................................................................................................................... -
ERR REP-0771: After Form trigger failed.
Hi,
Concurrent request fails with the error
ERR REP-0771: After Form trigger failed.
This happen when this job runs when job is scheduled.
But doesn't occur when i manually run this job.Please review the following note, it may be helpful.
Note: 1080783.6 - REP-0771 AfterPForm Trigger Failed
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1080783.6 -
Want to Create View as per Condition Fires After Parameter Form.
Hi ..
I want to create a report from a view,and that view would create after parameter form of that
report.
Example..
I want to select max(sal) of each Dept.where employee hired between 1-jan-2007 and 31-jul-2007'
I want when i Passes dates in Parameter FOrm
a view i.e select empno,deptno,sal, from emp created.
that means that view contains only data about that certain period
SO in Report Query i can write
select deptno,max(sal) from vw_employee
group by deptno.
This is just an example....my real problem is very hard and only can be done by doing create a view as per given dates in Report Parameter Form.
Waiting for Reply
Regards
Danish HayderWrong ideea.
You should have the parameters in the report's query:
select empno,deptno,sal, from emp where hired between :p_start_date and :p_end_date
Why do you want to create a view in the report, seeing that it's best to use parameters.
Moreover, think that the oracle user running the report would have to have the priviledges to create views, which may not be good security policy.
Still, if you insist on creating the view when running the report, then you'd better create the view from a stored procedure, that would receive as parameter the SQL select for creating the view.
So, you'd have the stored procedure:
proc_view(p_select in varchar2, p_view_name in varchar2) is
begin
execute immediate 'create or replace view '||p)view_name||' as '||p_select;
end;
You then would compose the select in the afterpform trigger and call the proc_view procedure.
Note that I did not allow proc_view to execute immediate any SQL one would pass, for that would be really dangerous. What if one would pass to the procedure executing dynamic SQL the following: 'drop table my_table cascade constraints'? -
Calling a report from another report in after parameter form
hi,
I'm calling Emp.rdf report with deptno as parameter and if the parameter is '10' then i have to call dept.rdf
function AfterPForm return boolean is
begin
if :p_deptno =10 then
srw.run_report('report=c:\reports\dept.rdf destype=screen p_deptno='||:p_deptno);
end if;
return (TRUE);
end;
But, now i'm getting an error as
REP-1428: afterpform': Error while running SRW.RUN_REPORT
Could you please help on this. thanks BcjHi , I have tried destype=file , didn't work for me. same time i tried with background=yes , that time report crashed.
Actualy what i'm trying to do is,
whenever the main report received an incorrect user input , i have to run a different report based on that particular input value and to show the users the actual input values.
so the coding would be like this in the after parameter form,
BEGIN
IF :P_ID between 1000 and 5000 then
--here i'm only changing the paramter value ,
ELSE
--here i'm calling the new report
srw.run_report('report=c:\reports\emp.rdf batch=yes destype=file desname c:\reports\id.txt background=yes p_new_id='|| :p_id);
return(true);
END;
Any help.... -
Difference between AFTER PARAMETER FORM and BEFORE REPORT in Reports 6i
Hi Aii,
What is the difference between AFTER PARAMETER FORM and BEFORE REPORT in Reports 6i.
Thanks in Advance,
BaluHi Balu.,
As per my findings the After Parameter is fired after the Parameters are given to the report and Before Report fires when the queries are parsed and data is fetched.
Regards.,
Vijay G -
Using ref cursor in after parameter form in reports
hi everyone,
I have problem in usage of ref cursor in after parameter form. My actual requirement is I have user parameter :p_minval, :p_maxval. The values into these user parameters will be coming dynamically using sql_statement as shown below
select min(empid),max(empid) into :p_minval, :p_maxval from emp where empid in (:p_emp);
I will be writing this query in the after parameter form
:p_emp is a lexical parameter as per me but the after parameter form is taking it as a bind variable. so I decided to define a ref cursor and then use it for retrieve. But when I use ref cursor it is returning pl/sql error 591 saying that this is not supported by client side can anyone help me plz..
The following is the code i tried to use in after parameter form
function afterPform return boolean is
type rc is ref cursor;
l_rc rc;
sqlstmt varchar2(512);
begin
sqlstmt:='select min(empid),max(empid) from emp where empid in ('||:p_emp||')';
open l_rc for
select max(empid) from emp where empid in ('||:p_emp||')';
fetch l_rc into :p_maxval;
close l_rc;
return(true);
end;
thanks & regards
venkatI ran into the same problem. any body knows why?
-
I'm trying to allow a user to select either 1 or 2 from a drop down list along with either C or D
from another drop down list. '1' can have version C or D and '2' can also have version C or D. I need to change headings based on
the selection. It also needs to default at 1 - Version C. The list of values for 1 and 2 are found by a select statement and C and D are static variables.
Heres what i have:
--After Parameter Form
if :p_id = '1' and :p_version = 'C' then
:p_title := '1 - Version C';
else
:p_title := '1 -Version D';
end if;
if :p_id '2' and :p_version = 'C' then
:p_title := '2 - Version C';
else
:p_title := '2 - Version D';
--Main Query (Two queries- version C and version D)
where x.id = :p_id
where :p_version = 'C'
where :p_version = 'D'
--L.O.V. for 1 & 2
*hide first col
select x.id
from store xHello,
So what is the problem now? Or what is the problem you are facing?
Anyway the code is AfterParameterForm is not fine enough in my eyes..it can be...
:p_title:=:p_id||' - Version '||:p_version;-Ammad -
PDF Not Displayed After Parameter Form Submitted
We are moving a Forms6i application to web deployed Forms10g. Reports with parameter forms are being called using web.show_document(...) with the oracle.reports.utility.FrmReportsInteg JavaBean to hide database login credentials, as described in the Forms/Reports integration white papers.
On our development server this process works as expected: the form displays a new browser window containing the parameter form with URL http://server/reports/rwservlet?userid=&report=report&desformat=pdf&destype=cache¶mform=yes, the parameter form is submitted, and the report output is displayed as a PDF embedded in the new browser window.
However, on our customer's test server, after the parameter form is submitted, the Oracle Reports OracleAS Reports Services - Servlet Command Help page is displayed. Executing the rwservlet/showjobs command shows the job as being successfully completed. Clicking on the Job Name link redisplays the parameter form, and submitting this returns to the Oracle Reports OracleAS Reports Services - Servlet Command Help page.
I have not been able to trace any other posts describing the same behavior on Metalink or OTN. Has anyone else seen this?
Development server is OracleAS 10g (9.0.4.1) on Red Hat Linux, customer server is OracleAS 10g (9.0.4.1) on Solaris.
Anyone explain this difference between the two servers?wonder if your problem is the host.domain name?
It has to be the same name as the "host:" name that was entered in the "Register with Oracle Internet Directory" screen - while installing AS. Reason is that: when the .html is running, it has no connections to the AS, OID, SSO or anything else - it runs independentally. For it to go back into the oracle 'system', the full host.domain name is needed. So, if when the AS was installed, the "fully qualifed" domain name was not given, you may have problems and could need to reinstall AS again. (speaking from sad experience :) )
regards -
Reports 10g problem: Before parameter form trigger(BPFT) problem
In report bilder there is no problem - I get parameter form wit all the parameters, I initialized in BPFT
function BeforePForm return boolean is
s_date date;
begin
s_date := Trunc(SYSDATE);
if :PAR_TEM_OD is null then
:PAR_TEM_OD := '1';
end if;
if :PAR_TEM_DO is null then
:PAR_TEM_DO := '9';
end if;
if :PAR_DAT_OD is null then
:PAR_DAT_OD := s_date ;
end if;
if :PAR_DAT_Do is null then
:PAR_DAT_Do := s_date ;
end if;
return (TRUE);
end;
PAR_DAT_... is data type DATE wit input mask DD.MM.YYYY.
REPORT crashes when I run it from forms - no parameter form is displayed. When I initialize only CHAR PARAMETERS IN BPFT then I get result - parameter form is displayed. . The problem is when I want to initailize DATE parameters.
Any idea?
GordanWhy are you using srw.do_sql here? You are just performing some sql and pl/sql statements here. This is an explanation of do_sql in the Report Builder Help:
"Since you cannot perform *DDL statements* in PL/SQL, the SRW.DO_SQL packaged procedure is especially useful for performing them within Report Builder, instead of via a user exit."
So, your code would simply be:
function BeforePForm return boolean is
segment2 varchar2(10);
begin
select segment1
into segment2
from xxmssl_po_headers_all
where rownum<2;
... etc. ...
end;
Maybe you are looking for
-
After upgrading to MAC OS X 10.10.2 Lightroom 5 cannot read the card (RAW files , converting to DNG) when importing. The card is fine as I can import into iPhoto - any ideas?
-
Hi 1.Using the LSMW interface i want to upload my Purchase order data from the flat file . And i want to Capture the Error Records which is to be displayed in ALV format , Success Records in SAP Script. Provide me the sample code or links which will
-
Transfer Asset from Non Depreciating Asset Class to Depreciating Asset Clas
We use the fixed asset subledger to maintain patents and patent applications. The patent applications do not amortize. How do I transfer from the patent application class to the patent class which will begin to amortize?
-
Hi, Can we release a Purchase Order with price equals zero? ( like in SD- free of charge sales Order) Regards, Vijay Bhat
-
Expandable menu buttons are not working in transaction iviews
Hi, I created the transaction iviews and it connects to the backend. I can able to see all the data's but when I click the Menu, its not expanding. I activated the all the services as per the note517484 and 1088717. When I go to the Webgui service