Windows CR reports or Web CR reports?
1. create a <your_report_filename>.ttx file (Notepad or from within VS as a
*.* file) per my info above
Field1 String 3
Field2 Number 10
Field3 Date
Field4 Currency
(adjust field names and types to match your datatable fields)
2. load/create .rpt in your solution/project
3. open up the "Field Explorer" in left pane
4. right click "Database Fields"
5. click on "More Data Sources"
6. click on "Field Definitions Only"
7. enter the path to the .ttx file you created above (step 1)
8. click on ">" to move the file to "Selected Tables" list
9. click Ok
You should see the list of fields you defined in your .ttx from step 1.
Drag and drop these fields into your report. So long as the field names and
types match up with your DataTable field names and types, you should be good
to go. You can probably do the same with XML document if you like, but XML
has a ton of tags and other useless garbage that isn't needed. If you need
to change the contents of you .ttx file, then right click on "Database
Fields" and do "Verify Database" -- this will synch up the .ttx to the .rpt
(be careful, type changes will remove the field from the report and you'll
have to re-add it) when you do this.
There are many ways to link up data to a report, I personally prefer the
simplest approach (.ttx) as I don't need all the overhead associated with a
DataSet (which can contain multiple tables).
Rob.
"oscar" <os***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
putting the datatable right into the crystal report works much better, but
do i have to create the reports off of a .xml version first so i know all
the
fields are right and then get rid of the .xml document and bind the
datatable
to the crystal report? every time i create fields in the crystal report
then
send the datatable to it i get an error message telling me that the fields
don't exist.