BAQReportForm error

Hello guys i am getting the error i place below. I added the code and the error

Error: The name ‘BAQReportForm’ does not exist in the current context

private void CashRecForm_Load(object sender, EventArgs args)
{
	// Add Event Handler Code
		
	if ((BAQReportForm.LaunchFormOptions != null)) 
	{ 

			if ((BAQReportForm.LaunchFormOptions.ContextValue != null)) 
			{ 
					EpiDataView ParamView = (EpiDataView)oTrans.EpiDataViews["CashHead"]; 
					ParamView.dataView[ParamView.Row].BeginEdit(); 
					ParamView.dataView[ParamView.Row]["CheckRef"] = BAQReportForm.LaunchFormOptions.ContextValue; 

			}
	}
}

I’m assuming you want to launch a BAQ report from the Cash Receipt form?
If so, I think you just got wires crossed…which forms get which code.

I’d expect CashRecForm would have some LaunchFormOptions,
And code like the above would be added to the BAQReportForm customization?

yes that was exacly what happened lol it was 2 am when i asked that question then today i realized it

I still have issues when i run my code it runs fine but when i open the report it through an error could you please let me know what is wrong in this code that i use from a folk that post it here

EpiDataView edvReportParams = (EpiDataView)oTrans.EpiDataViews[“ReportParam”];

			 // Grab LFO passed from CashReceipt: Checkref, CustID, GroupID, InvoiceNum, OrderNum 
			string FullStr = BAQReportForm.LaunchFormOptions.ContextValue.ToString();
			
			// Parse and set Check/Ref
			Int32 FieldBeg = 0;
			Int32 FieldEnd = FullStr.IndexOf(",",FieldBeg);
			Int32 FieldLen = FieldEnd - FieldBeg;
			string strCheckRef = FullStr.Substring(FieldBeg, FieldLen);
			edvReportParams.dataView[edvReportParams.Row]["CheckRef"] = strCheckRef;