Focal Point
Maintain Parameter Error

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3171078322

April 17, 2007, 11:21 AM
<Vijaya_settu>
Maintain Parameter Error
Hello
I have parameter in procedure.It works.
But I would like set parameter in Maintain.
I have edit box in my form.
I set the following line in maintain
"EXEC fanrpt from Test INTO HTMLSTACK;"

But I receveived the following Error
(FOC03692) Run-time Error : Internal error while copying value!
(FOC03692) Run-time Error : At call/exec FANRPT

I appreciate any thoughts...

Thanks
Vijaya
April 17, 2007, 12:43 PM
Alan B
Vijaya

I think the reason could be:

In your focexec fanrpt, you should reference the &variable &1, not &Test. You can:
-SET &Test=&1;

This is because the parameters passed to teh focexec are only passed as values, in the order in which you use them on the EXEC line. The focexec has no knowledge of what you called the parameter in the Maintain.

If you want to pass more than one parameter:
EXEC fanrpt from Test1 Test2 INTO HTMLSTACK;
then refer to them as &1 and &2 in the fanrpt focexec.

If this is not the issue, and I have never seen tha error, let me know with perhaps the focexec, and I'll investigate further.


Alan.
WF 7.705/8.007
April 17, 2007, 01:40 PM
<Vijaya_settu>
quote:
focexec fanrpt

Hello Alan,
I followed your suggestion. I set this line " -SET &LST=&1;" in focexec fanrpt.
IN maintain I have this line
" EXEC fanrpt from LST1 INTO HTMLSTACK;".
Now I am getting this error
(FOC03601) ERROR AT OR NEAR LINE 22 IN PROCEDURE faculty/Start5.MAINTAIN
(FOC03847) MntEX Compile failed for faculty/Start5
(FOC03649) Undefined Stack : LST1 : in FROM clause.

Thanks
Vijaya
April 17, 2007, 02:09 PM
Alan B
Vijaya

The name on the exec line MUST be available in the maintain. So in your maintain

MAINTAIN ......
.
.
Declare Test/a12;
.
.
.
Exec fanrpt from Test into HTMLStack;
.
.

Then link the edit box, with the option 'Edit intial text' to the variable Test.

In the fanrpt focexec:
-SET &NAMETEST=&1;
TABLE FILE FANNAMES
PRINT TITLE FIRSTNAME EMAIL
BY LASTNAME
IF LASTNAME EQ &NAMETEST
.
.

In the maintain make sure that Test is not of type StackOf or A0 and ensure that it is declared correctly and linked to the edit box.

This should work, let me know.


Alan.
WF 7.705/8.007
April 17, 2007, 02:26 PM
<Vijaya_settu>
quote:
Test

Thanks Alan, It works fine...
April 17, 2007, 02:57 PM
Alan B
Great.

Sometimes I do have problems explaining this concept clearly without a whiteboard and computer screen!

Any other maintain help needed, just ask.


Alan.
WF 7.705/8.007