Как передать значение sql в параметр Crystal Report? Я застрял здесь около недели. Пожалуйста, помогите мне спасибо всем.
Dim header As New SqlCommand("SELECT SalesOrder.salesorder_id, SalesOrder.sales_code, Delivery.driver_code, SalesOrder.invoice_dt, Delivery.remark, SalesOrder.customer_icno, Delivery.c_name, Delivery.c_hpno, Delivery.address FROM SalesOrder,Delivery WHERE SalesOrder.salesorder_id = Delivery.salesorder_id AND SalesOrder.salesorder_id=" & checkInvoiceReceiptSalesOrderNo.Text, conn)
Using readerObj As SqlClient.SqlDataReader = header.ExecuteReader
While readerObj.Read
Dim paramFields As New ParameterFields()
Dim paramField As New ParameterField()
Dim discreteVal As New ParameterDiscreteValue()
paramField.ParameterFieldName = "son"
Dim str As String
str = readerObj("salesorder_id").ToString()
discreteVal.Value = str
paramField.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
End While
End Using