REP-300 : 'invalid identifier SELECT ==> [message #437928] |
Wed, 06 January 2010 09:35 |
lkngstr82is
Messages: 33 Registered: January 2010 Location: USA
|
Member |
|
|
Hi All,
I have created a report using lexical references. I can run it without errors from within oracle reports. However, When I call it from form or using rwclient it fails with the following error message:
REP-300 : 'invalid identifier' SELECT ==> REPORT FROM
I used following format for running report:
rwclient server=<reports server name> userid=<username>/<pwd>@<connect string> report=test_report1.rdf destype=cache desformat=html
Let me know if you could help me out
Thanks
Harshad
|
|
|
|
|
Re: REP-300 : 'invalid identifier SELECT ==> [message #437942 is a reply to message #437928] |
Wed, 06 January 2010 10:00 |
lkngstr82is
Messages: 33 Registered: January 2010 Location: USA
|
Member |
|
|
Thanks for the reply. lexical references/parameter are added as user parameters and assigned in after parameter form trigger.
I have tried running using parameters, it gave me the same error:
rwclient server=rep_cio14-5394-b userid=scott/cis_test@cisdev report=test_report1.rdf destype=cache desformat=html empno=RPAD(ENAME,256)
Following are the codes:
QUERY:
SELECT &EMPNO REPORT FROM EMP
EMPNO has width of 256 and has been initialized as
rpad(ename,256)
BEFORE PARAMETER FORM TRIGGER:
function BeforePForm return boolean is
begin
:EMPno := NULL;
return (TRUE);
end;
AFTER PARAMETER FORM TRIGGER:
begin
IF :EMPno = 'Y' THEN
:EMPNo := 'RPAD(TO_CHAR(eMPNo),10)'||'||'' ''';
--:TITLE := 'Employee No';
END IF;
IF :Ename = 'Y' THEN
IF LOWER(:EMPno) = 'N' THEN
:EMPno := 'RPAD(Ename,30)';
ELSE
:EMPno := :EMPNO || '||RPAD(Ename,30)';
END IF;
END IF;
IF :MGR = 'Y' THEN
IF LOWER(:EMPNO) = 'N' THEN
:EMPNO := 'RPAD(MGR,13)';
ELSE
:EMPNO := :EMPNO || '||RPAD(MGR,13)';
END IF;
END IF;
IF :DEPTNO = 'Y' THEN
IF LOWER(:EMPNO) = 'N' THEN
:EMPNO := 'RPAD(DEPTNO,13)';
ELSE
:EMPNO := :EMPNO || '||RPAD(DEPTNO,13)';
END IF;
END IF;
return (TRUE);
end;
|
|
|
|
|
Re: REP-300 : 'invalid identifier SELECT ==> [message #437955 is a reply to message #437942] |
Wed, 06 January 2010 10:32 |
lkngstr82is
Messages: 33 Registered: January 2010 Location: USA
|
Member |
|
|
I apologize and thank you for the correction.
I have correctd the code as below, it still gives me the same error.
begin
IF :EMPno = 'Y' THEN
:EMPNo := 'RPAD(TO_CHAR(eMPNo),10)'||'||'' ''';
END IF;
IF :Ename = 'Y' THEN
IF UPPER(:EMPNO) = 'N' THEN
:EMPno := 'RPAD(Ename,30)';
ELSE
:EMPno := :EMPNO || '||RPAD(Ename,30)';
END IF;
END IF;
IF :MGR = 'Y' THEN
IF UPPER(:EMPNO) = 'N' THEN
:EMPNO := 'RPAD(MGR,13)';
ELSE
:EMPNO := :EMPNO || '||RPAD(MGR,13)';
END IF;
END IF;
IF :DEPTNO = 'Y' THEN
IF UPPER(:EMPNO) = 'N' THEN
:EMPNO := 'RPAD(DEPTNO,13)';
ELSE
:EMPNO := :EMPNO || '||RPAD(DEPTNO,13)';
END IF;
END IF;
return (TRUE);
end;
|
|
|
|
Re: REP-300 : 'invalid identifier SELECT ==> [message #437964 is a reply to message #437928] |
Wed, 06 January 2010 11:00 |
lkngstr82is
Messages: 33 Registered: January 2010 Location: USA
|
Member |
|
|
IF UPPER(:EMPno) = 'N' THEN
EMNO is the lexical parameter that holds all the other columns initialized in AFTER PARAMETER FORM trigger.
Also, even if I remove EMPNO initialization,i.e. rpad(ename,256)-error message still persists.
Let me know if I did something wrong in posting message
Thanks
Harshad
EDIT: fixed code tags - CM
[Updated on: Wed, 06 January 2010 11:28] by Moderator Report message to a moderator
|
|
|
Re: REP-300 : 'invalid identifier SELECT ==> [message #437970 is a reply to message #437964] |
Wed, 06 January 2010 11:28 |
cookiemonster
Messages: 13952 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
lkngstr82is wrote on Wed, 06 January 2010 17:00
IF UPPER(:EMPno) = 'N' THEN
EMNO is the lexical parameter that holds all the other columns initialized in AFTER PARAMETER FORM trigger.
EMNO or EMPNO?
Becuase I can see no EMNO in your code.
But if EMPNO is the lexical parameter, why are you using it as a Y/N flag? You've got 1 parameter here when you need 2, one for the Y/N and one for the lexical.
|
|
|