Home » Developer & Programmer » Reports & Discoverer » expression is of wrong type (oracle repoerts )
expression is of wrong type [message #647003] Mon, 18 January 2016 00:14 Go to next message
mist598
Messages: 1188
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

My requirement is add barcode to due_date column in oracle apps rdf report.
Due date column F_TERM_DUE_DATE(name) and it's source is TERM_DUE_DATE_FROM_PS column
function F_TERM_DUE_DATEFormatTrigger return boolean is
begin
if :p_choice != 'Adj'
then return(true);
else return(false);
end if;  
return (TRUE);
return idautomation.code128(:TERM_DUE_DATE_FROM_PS);   --> Added new code 
end;


When i am adding but getting error expression is of wrong type

could you pls help me
/forum/fa/12962/0/


[mod-edit: imaged inserted into message body by bb]
  • Attachment: code128.PNG
    (Size: 15.01KB, Downloaded 510 times)

[Updated on: Mon, 18 January 2016 21:58] by Moderator

Report message to a moderator

Re: expression is of wrong type [message #647010 is a reply to message #647003] Mon, 18 January 2016 03:15 Go to previous messageGo to next message
cookiemonster
Messages: 13720
Registered: September 2008
Location: Rainy Manchester
Senior Member
How many parameters does idautomation.code128 need and what datatype are they?
How many parameters are you supplying to idautomation.code128 and what datatype are they?
Re: expression is of wrong type [message #647030 is a reply to message #647010] Mon, 18 January 2016 09:01 Go to previous messageGo to next message
mist598
Messages: 1188
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
How many parameters does idautomation.code128 need and what datatype are they?
How many parameters are you supplying to idautomation.code128 and what datatype are they?

Thanks for reply.

How to know idautomation.code128 has how many params?

Actually i want to add barcode to the oracle apps report for 4 columns , those due_date(its source is TERM_DUE_DATE_FROM_PS
2nd another column that has number datatype

Could you please let me know how to implement barcode? (for 4 columns)

Please suggest
Re: expression is of wrong type [message #647031 is a reply to message #647030] Mon, 18 January 2016 09:36 Go to previous messageGo to next message
cookiemonster
Messages: 13720
Registered: September 2008
Location: Rainy Manchester
Senior Member
mist598 wrote on Mon, 18 January 2016 15:01

How to know idautomation.code128 has how many params?

Are you really, seriously telling us that you're trying to call a procedure/function and don't know what parameters it needs?
You tell by looking at it's definition - same as for any function/procedure.

mist598 wrote on Mon, 18 January 2016 15:01

Actually i want to add barcode to the oracle apps report for 4 columns , those due_date(its source is TERM_DUE_DATE_FROM_PS
2nd another column that has number datatype

Could you please let me know how to implement barcode? (for 4 columns)


Generally you get a bar code by using a bar code font. The number of columns is irrelevant. I've no idea what these functions you're trying to call do.
Re: expression is of wrong type [message #647071 is a reply to message #647031] Mon, 18 January 2016 15:32 Go to previous messageGo to next message
Littlefoot
Messages: 21509
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
First of all, this function would probably never even execute this line:
return idautomation.code128(:TERM_DUE_DATE_FROM_PS);   --> Added new code 

as it would terminate a line above it which says
return (TRUE);


Moreover, I guess that "idautomation.code128" is not a function. It looks like a barcode font name and "idautomation.code128(:TERM_DUE_DATE_FROM_PS)" looks as if the OP wants to apply that font to the TERM_DUE_DATE_FROM_PS item/column.

If that's so, well, you shouldn't do it that way. You should open Paper Layout Editor, select item(s) and change font in Fonts Select List (top toolbar).
Re: expression is of wrong type [message #647074 is a reply to message #647071] Mon, 18 January 2016 20:28 Go to previous messageGo to next message
cookiemonster
Messages: 13720
Registered: September 2008
Location: Rainy Manchester
Senior Member
Idautomation is a package according to the screen shot in the first post
Re: expression is of wrong type [message #647087 is a reply to message #647071] Tue, 19 January 2016 03:51 Go to previous messageGo to next message
cookiemonster
Messages: 13720
Registered: September 2008
Location: Rainy Manchester
Senior Member
Littlefoot wrote on Mon, 18 January 2016 21:32
First of all, this function would probably never even execute this line:
return idautomation.code128(:TERM_DUE_DATE_FROM_PS);   --> Added new code 

as it would terminate a line above it which says
return (TRUE);


Actually it'll terminate on one of the two returns in the IF statement.

@mist598 - I've no idea what you're trying to achieve here but you need to sort out your return statements. You've got at least 2 too many.
code128 returns the wrong datatype for what this trigger does. I rather suspect you shouldn't be calling it in this trigger at all since this trigger is just to determine if the item should be displayed at all, but you'll need to tell us what code128 does before we can make suggestions about where it should be called.
Re: expression is of wrong type [message #647096 is a reply to message #647087] Tue, 19 January 2016 09:01 Go to previous messageGo to next message
mist598
Messages: 1188
Registered: February 2013
Location: Hyderabad
Senior Member
Sorry for delay cookiemonster and i got the issue because i have attached PLL in the PLSQL libraries not in Attached libraries .

My process is:
1)attached IDAUTOMATION.PLL
2)compiled the rdf and PLL using ctl+shift+k

function CF_BARCODEFormula return varchar2 is
v_barcode  varchar2(240);
begin
 
  v_barcode :=IDAUTOMATION.CODE128('123456666');
  return (v_barcode);

exception
 when others then
   return(null);
end;


and create one new field in the layout and set the source of CF_BARCODE, it is showing the barcode in local, but when i am trying to see the output page in the oracle apps report.

please see the image once.

Could you pls suggest me.
  • Attachment: 1.PNG
    (Size: 1.30KB, Downloaded 359 times)
Re: expression is of wrong type [message #647100 is a reply to message #647096] Tue, 19 January 2016 09:39 Go to previous messageGo to next message
cookiemonster
Messages: 13720
Registered: September 2008
Location: Rainy Manchester
Senior Member
Let's be clear - IDAUTOMATION is not an oracle supplied package.
It appears be a third party library that you have to pay money for.
Consequently I have no idea what it does and chances are no one else around here does either.

We can't work out issues with code we can't see.
Re: expression is of wrong type [message #647111 is a reply to message #647074] Tue, 19 January 2016 13:46 Go to previous message
Littlefoot
Messages: 21509
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
cookiemonster wrote on Tue, 19 January 2016 03:28

Idautomation is a package according to the screen shot in the first post


Didn't even notice the attachment until Barbara chose to display it inline ... my bad, sorry.
Previous Topic: setting up Excel Cell Borders in RPT2XLS
Next Topic: oracle fa depreciation projection report
Goto Forum:
  


Current Time: Thu Nov 14 18:20:30 CST 2019