Passing Variables from MES to BAQ Report Report using LFO

I usually use LFO.ContextValue and not ValueIn. Note if you have multiple input values, you can store them in a List or array.

// Setting values in LFO and calling a form
	private void PrintBillOfLading(int bolNum)
	{
		LaunchFormOptions lfo = new LaunchFormOptions();
		lfo.ContextValue = bolNum;
		lfo.IsModal = true;
		ProcessCaller.LaunchCallbackForm(oTrans, "CustBOLP", lfo); // Not sure why I used LaunchCallbackForm instead of LaunchForm, but either should work.
	}

and

// Retrieving LFO value(s) and assigning to BAQ Report parameters
	private void BAQReportForm_Load(object sender, EventArgs args)
	{
		// Add Event Handler Code
		if (BAQReportForm.LaunchFormOptions != null)
		{
			if (BAQReportForm.LaunchFormOptions.ContextValue != null)
			{
				EpiDataView param = oTrans.Factory("ReportParam");
				param.dataView[param.Row].BeginEdit();
				param.dataView[param.Row]["Field1"] = BAQReportForm.LaunchFormOptions.ContextValue;
				param.dataView[param.Row].EndEdit();
				oTrans.NotifyAll();
			}
		}
	}