Cannot Set Key1 Parameter in BAQ Report

I’m trying to set UD02.Key1 in a BAQ report from a ContextValue. I have followed all the instructions I’ve found online to help out with this but I get an error trying to set the value. I have ensured that the correct ContextValue was passed. It’s failing at line “paramView.dataView(paramView.Row)(“Key1”) = BAQReportForm.LaunchFormOptions.ContextValue.ToString” with an Inner Exception saying that it can’t set Key1.

	Private Sub BAQReportForm_Load(ByVal sender As Object, ByVal args As EventArgs)
		' Add Event Handler Code
		If (Not (BAQReportForm.LaunchFormOptions) Is Nothing) Then
			If (Not (BAQReportForm.LaunchFormOptions.ContextValue) Is Nothing) Then
				Dim paramView As EpiDataView = CType(oTrans.EpiDataViews("ReportParam"), EpiDataView)
				paramView.dataView(paramView.Row).BeginEdit
				paramView.dataView(paramView.Row)("Key1") = BAQReportForm.LaunchFormOptions.ContextValue.ToString
				paramView.dataView(paramView.Row).EndEdit
				oTrans.NotifyAll
			End If
		End If
	End Sub

This is the code setting the value in my UD menu.

Private Sub printTags_ToolClick(ByVal sender As Object, ByVal args As ToolClickEventArgs)
	Dim lfo As LaunchFormOptions = New LaunchFormOptions
	Dim edvUD02 As EpiDataView = CType(oTrans.EpiDataViews("UD02"), EpiDataView)
	Dim ncmrNum As String = String.Empty
	ncmrNum = Me.txtNCMRNum.Text
	lfo.ContextValue = ncmrNum
	ProcessCaller.LaunchForm(oTrans, "NCMRTag", lfo)
End Sub

In the BAQ Report Designer, add an Option Field for UD02_Key1. This will typically be assigned to ReportParameter.field1. This can be verified by using Field Help and checking the binding when you test the Report Form.

Then in the customization:
paramView.dataView(paramView.Row)(“field1”) = BAQReportForm.LaunchFormOptions.ContextValue.ToString

It was as simple as that! A lot stuff had “field1” but I assumed that to be a placeholder for the actual field name. Works like a charm now. Thank you!