Passing Parameters/Options to Report Quantity Program

You can pass a value into the called program using LaunchFormOptions..
Try passing the labour head & detail sequence numbers in this format:
lfo.ValueIn = laborHedSeq + "," + laborDtlSeq and see if that does what
you want automatically.



If that doesn't work, I've used this technique to pass data into a
called program - a report in my case. The caller saves the data using
SetEnvironmentVariable, and the called form uses GetEnvironmentVariable
in the FormLoad procedure to pick up that data. A previous post on this
list had the details of building a unique env variable name from the
Epicor session ID, or I can dig out my code.



Brian.



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of simstrak
Sent: Monday, January 23, 2012 11:35 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Passing Parameters/Options to Report Quantity Program





I have a button which launches the Report Quantity Program. However,
when the program opens up, it is not opening with any of the fields
enabled.

A trace of the canned ReportQty program shows that upon opening the
program, one of the first things it does is runs the methods "GetRows"
from the Labor bo, then it runs "GetList" from the EmpBasic bo. The
Initial GetRows call passes parameters (laborhed sequence, activetrans
flags, etc). Eventually, it uses this information to call
"GetNewReportQty". This is all done on the form loading of the ReportQty
program, without any customizations.

When I run the ReportQty program that I'm calling from a button, it is
not executing any of these method calls.

I can only assume that the MES program, when the Report Quantity button
is clicked, must be passing these parameters to the ReportQty program.
So the question is, how do I duplicate that functionality?

On my custom button click, I know that I can add options to the
LaunchForm command, and I can set those options to the value of the
LaborHedSeq, and any other fields I may need. What I don't know how to
do is access these parameters/options once inside the custom ReportQty
program. I assume that I will have to put something in the Form Load.

Has anyone had to set options when calling a program, then get those
options from within the program that is called?

Thanks,
Kevin Simon





[Non-text portions of this message have been removed]
I have a button which launches the Report Quantity Program. However, when the program opens up, it is not opening with any of the fields enabled.

A trace of the canned ReportQty program shows that upon opening the program, one of the first things it does is runs the methods "GetRows" from the Labor bo, then it runs "GetList" from the EmpBasic bo. The Initial GetRows call passes parameters (laborhed sequence, activetrans flags, etc). Eventually, it uses this information to call "GetNewReportQty". This is all done on the form loading of the ReportQty program, without any customizations.

When I run the ReportQty program that I'm calling from a button, it is not executing any of these method calls.

I can only assume that the MES program, when the Report Quantity button is clicked, must be passing these parameters to the ReportQty program. So the question is, how do I duplicate that functionality?

On my custom button click, I know that I can add options to the LaunchForm command, and I can set those options to the value of the LaborHedSeq, and any other fields I may need. What I don't know how to do is access these parameters/options once inside the custom ReportQty program. I assume that I will have to put something in the Form Load.

Has anyone had to set options when calling a program, then get those options from within the program that is called?

Thanks,
Kevin Simon