B
Brock
I am trying to populate a Crystal Report from data in my DataGrid.
The
reason for this is that I want the user to be able to change values
without updating the database, but still have their report reflect
the
values they anticipate committing to see hypothetical totals of
columns from a set of records. These records are displaying properly
on my DataGrid but I'm not sure how to get Crystal Reports 10 to use
as its datasource the dataset in memory that could be had directly
from the datagrid.
I'm guessing I need to Dim a new DataSet, populate it from the
datagrid, and set the new dataset as the datasource for CR. But how?
How can I specify that the Datagrid's DataSource property can be
explicitly cast as a DataSet object that CR can pick up. And how in
CR
do I tell it that this resultingDataSet is what it needs for the
report?
I found a snippet of code that may work as PART of the solution, but
I
need a little direction.
Private Sub FillDataSet(ByVal DataFromGrid As DataSet)
DataFromGrid = CType(dgEmployees.DataSource, DataSet)
End Sub
The
reason for this is that I want the user to be able to change values
without updating the database, but still have their report reflect
the
values they anticipate committing to see hypothetical totals of
columns from a set of records. These records are displaying properly
on my DataGrid but I'm not sure how to get Crystal Reports 10 to use
as its datasource the dataset in memory that could be had directly
from the datagrid.
I'm guessing I need to Dim a new DataSet, populate it from the
datagrid, and set the new dataset as the datasource for CR. But how?
How can I specify that the Datagrid's DataSource property can be
explicitly cast as a DataSet object that CR can pick up. And how in
CR
do I tell it that this resultingDataSet is what it needs for the
report?
I found a snippet of code that may work as PART of the solution, but
I
need a little direction.
Private Sub FillDataSet(ByVal DataFromGrid As DataSet)
DataFromGrid = CType(dgEmployees.DataSource, DataSet)
End Sub