Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Forms says: "Invalid ID" instead of "OK"

Status
Not open for further replies.

cutovoi

Programmer
Oct 11, 2002
1
BR
Hi

I would like to know why this thing does not occurs! I explain:
I have created a Oracle Forms Application and when I click in print button, it must to show me a report.
But when I click in the button the following message appears:
"Cannot delete parameter list: Invalid ID".
I have defined the value for each radiobox in the Oracle Form Builder.
In my queries I compare the value write in the text box with the field in the query. Like this:
a.cod_cta_ger_rch = ':block3.grup', where block3 is my Datablock and grup is my textbox.
The code to pass the value of the text box is this:

if :tipo = 'IMP' and :BLOCK3.GRUPOS = 'GRUPO' then
pl_id2 := create_parameter_list('untitled');
IF :IMPRESSAO.IMP_ARQ <> 'Impressora padrão' then
add_parameter(pl_id2,'DESNAME',TEXT_PARAMETER,:IMPRESSAO.IMP_ARQ);
END IF;
add_parameter(pl_id2,'DESTYPE',TEXT_PARAMETER,'PRINTER');
add_parameter(pl_id2,'PARAMFORM',TEXT_PARAMETER,'NO');
add_parameter(pl_id2,'GRUPOS',text_parameter, :block3.grupos);
add_parameter(pl_id2,'GRUP',text_parameter, :block3.grup);
add_parameter(pl_id2,'USER',text_parameter,user);

and this is the code where I pass:

&quot;and b.cod_cta_ger_rch = ':block3.grup';&quot;
The name of my canvas is &quot;Parametros&quot;. Duty I to pass the name of my canvas or the name of my Datablock.
If I have not been concise I'll explain again for anyone which help me.

Please, can anyone help me?


Tks



Alex Cutovoi

 
You need to re-code your button trigger like this:

DECLARE
pl_id2 PARAMLIST := Get_Parameter_List('untitled');
BEGIN
IF NOT Id_Null(pl_id2)
THEN
Destroy_Parameter_List(pl_id2);
END IF;
--
IF :tipo = 'IMP' and :BLOCK3.GRUPOS = 'GRUPO' then
pl_id2 := create_parameter_list('untitled');
--
IF :IMPRESSAO.IMP_ARQ <> 'Impressora padrão' then
add_parameter(pl_id2,'DESNAME',TEXT_PARAMETER,:IMPRESSAO.IMP_ARQ);
END IF;
--
add_parameter(pl_id2,'DESTYPE',TEXT_PARAMETER,'PRINTER');
add_parameter(pl_id2,'PARAMFORM',TEXT_PARAMETER,'NO');
add_parameter(pl_id2,'GRUPOS',text_parameter, :block3.grupos);
add_parameter(pl_id2,'GRUP',text_parameter, :block3.grup);
add_parameter(pl_id2,'USER',text_parameter,user);
END IF;
.
.
.
.

I'm not sure what you mean with &quot;and b.cod_cta_ger_rch = ':block3.grup';&quot;. The literals around :block3.grup will cause the AND to compare b.cod_cta_ger_rch with the literal string &quot;:block3.grup&quot; rather than the contents of :block3.grup. Is that what you want?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top