D
Dana L. Stille
I have a crystal report that I want to print using a single record. I want to report on any changes that have taken place through the bound controls. I am using the following code to get the current row that is being displayed (MOD_NO is the primary key field), and merging it into a dataset to be used in the report.
Dim CurrentRow() As dsSCRData.scrdataRow = SCRDataSet.Tables(AC.SCRSettings.TableName).Select("MOD_NO = '" & txtModNo.Text & "'")
dsCurrentSCR.Merge(CurrentRow, False, MissingSchemaAction.Ignore)
Dim SCRReport As New rptSCR
SCRReport.SetDataSource(dsCurrentSCR)
The problem is that when I view the report the values that changed in the bound controls are not reflected in the report. While debugging this code I can see that the change is being correctly reflected in the DataRow "CurrentRow." However, the change does not get placed in the dataset. I used specified "FALSE" for the "preserveChanges" parameter in the Merge method. Also, when I view the row state in the dataset "dsCurrentSCR" it is set to "Unchanged". What am I doing wrong?
Dim CurrentRow() As dsSCRData.scrdataRow = SCRDataSet.Tables(AC.SCRSettings.TableName).Select("MOD_NO = '" & txtModNo.Text & "'")
dsCurrentSCR.Merge(CurrentRow, False, MissingSchemaAction.Ignore)
Dim SCRReport As New rptSCR
SCRReport.SetDataSource(dsCurrentSCR)
The problem is that when I view the report the values that changed in the bound controls are not reflected in the report. While debugging this code I can see that the change is being correctly reflected in the DataRow "CurrentRow." However, the change does not get placed in the dataset. I used specified "FALSE" for the "preserveChanges" parameter in the Merge method. Also, when I view the row state in the dataset "dsCurrentSCR" it is set to "Unchanged". What am I doing wrong?