I am attempting to use this code to bind data with a button click. The button is located on the Edit PO Release form that appears from clicking a button on Change PO Suggestions. I want to bind this data so Crystal will know to print a water mark on the report. I receive an error saying Cannot set POHeader.PrintAs. I would appreciate if anyone has any ideas or if I'm missing something in my code. Thanks in advance.
Here is the code I am using.
Private Sub epiButtonC2_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
Dim btnLaunchActivity_btnConfigureOn As EpiButton = CType(csm.GetNativeControlReference("a7399644-fe78-4c69-8ecb-695229e09307"), EpiButton)
Dim PONum as string = txtPONum.text
Dim answer as DialogResult
Dim edv1 as new EpiDataView
Dim changed as string = "C"
Answer = MessageBox.Show("Would you like to print a copy of the modified PO?","Important",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
If answer = DialogResult.Yes Then
edv1 = DirectCast(oTrans.EpiDataViews("POHeader"), EpiDataView)
edv1.dataView(edv1.Row)("POHeader.PrintAs")=changed
edv1.Notify(New EpiNotifyArgs("POEntryForm", edv1.Row, edv1.Column))
btnLaunchActivity_btnConfigureOn.PerformClick()
ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.POForm", PONum)
else
btnLaunchActivity_btnConfigureOn.PerformClick()
end if
End Sub
Here is the code I am using.
Private Sub epiButtonC2_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
Dim btnLaunchActivity_btnConfigureOn As EpiButton = CType(csm.GetNativeControlReference("a7399644-fe78-4c69-8ecb-695229e09307"), EpiButton)
Dim PONum as string = txtPONum.text
Dim answer as DialogResult
Dim edv1 as new EpiDataView
Dim changed as string = "C"
Answer = MessageBox.Show("Would you like to print a copy of the modified PO?","Important",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
If answer = DialogResult.Yes Then
edv1 = DirectCast(oTrans.EpiDataViews("POHeader"), EpiDataView)
edv1.dataView(edv1.Row)("POHeader.PrintAs")=changed
edv1.Notify(New EpiNotifyArgs("POEntryForm", edv1.Row, edv1.Column))
btnLaunchActivity_btnConfigureOn.PerformClick()
ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.POForm", PONum)
else
btnLaunchActivity_btnConfigureOn.PerformClick()
end if
End Sub