Home » Developer & Programmer » Forms » Problem in sending a parameter to report from form
Problem in sending a parameter to report from form [message #118676] Fri, 06 May 2005 16:21 Go to next message
aditya_gangadharam
Messages: 43
Registered: February 2005
Location: Hyderabad
Member

hi all,

i am using forms 9i and reports 9i and in the report i have a parameter named remarks where i have to send the remarks from the form itself and
while sending the parameter i am sending it like below

add_parameter_list(pl_id,'P_remark',text_parameter,:Block.Item);


in the :Block.Item i am entering as "This is fine". this is giving an error as
1) unable to run report,
2) unable to get job status,.. etc..

but if i give it as "ThisIsFine" this is not an error and giving showing the report.

what is the mistake i made in sending the parameter.
P_remark is parameter in report and length is 200 characters.
:Block.Item is also char 200 in forms.

thanks for the help.,]

aditya
Re: Problem in sending a parameter to report from form [message #118795 is a reply to message #118676] Sun, 08 May 2005 19:59 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You might like to post this question in the 'Reports' forum.
Re: Problem in sending a parameter to report from form [message #119196 is a reply to message #118795] Wed, 11 May 2005 02:38 Go to previous messageGo to next message
subba lakshmi
Messages: 36
Registered: March 2005
Member
hello aditya,

i was allocated a system temporarily which doesn't have reports,
but i tried the same with two forms.it is working fine.try the same with reports

form1
with text box and button

on when-button-pressed

declare
pl paramlist;
begin
if id_null(pl) then
pl:=create_parameter_list('simple');
add_parameter(pl,'param',text_parameter,:block3.text_item4);
call_form('d:\jslakshmi\frm2.fmx',no_hide,no_replace,query_only,pl);
end if;
end;

form2
with a textbox and a parameter named param.

in when-new-form-instance

declare
pl paramlist;
begin
pl:=get_parameter_list('simple');
:block3.text_item4:=:parameter.param;
end;

instead of when-new-form-instance you use corresponding report triggers.

from
subba lakshmi
Re: Problem in sending a parameter to report from form [message #119222 is a reply to message #118676] Wed, 11 May 2005 06:07 Go to previous messageGo to next message
showry
Messages: 1
Registered: March 2005
Junior Member
this document http://www.oracle.com/technology/products/forms/pdf/10g/frmrepparamform.pdf
describes a limitation where the value contains blanks and suggests some plsql code, there isn't much detail but it might be a starting point for you
Re: Problem in sending a parameter to report from form [message #119339 is a reply to message #118676] Thu, 12 May 2005 00:18 Go to previous messageGo to next message
Gokul
Messages: 21
Registered: October 2000
Junior Member
Solution :

1)
add_parameter_list(pl_id,'P_remark',text_parameter,:Block.Item);

Use the following instead of the above :

add_parameter_list(pl_id,'P_remark',text_parameter,''''||:Block.Item||'''');

Reason :
If You pass a string(more than one words or with space), you must enclose the string within single quotes.

2)

This will also work

set_report_object_property(report_object_id,report_other,'P_remark='''||:Block.Item||'''');

Re: Problem in sending a parameter to report from form [message #120126 is a reply to message #118676] Tue, 17 May 2005 18:55 Go to previous message
danosw
Messages: 20
Registered: May 2005
Location: California
Junior Member
We had problem with embedded quotes in are data.

one more solution... this is what we do for all parameters.


Add_Parameter(pl_id,
'P_Name',
TEXT_PARAMETER,
replace( :block1.NAME,'''',''''''));
Previous Topic: Check it Please.
Next Topic: PDE-CAT006 cannot find .pll
Goto Forum:
  


Current Time: Mon Nov 04 13:42:33 CST 2024