Elton,
Thanks for your reply. After some struggling, I was able to create a
ttx file to use as I am designing my report (thank you!). However, I
am having a problem populating the report with data from my dataset. I
use the same code as above, but after I populate my dataset, I do this:
Dim crReport As New TcReport01
crReport.SetDataSource(AuthorsDataSet) 'Set the data source for the
report
CrystalReportViewer1.ReportSource = crReport 'Set the report to view
And all the report shows (in the detail section) is the default value
in my TTX file. For example, my TTX file looks like this:
; Field definition file for table: ADORecordset
Description String 20 Default
But the the detail on the report always shows just "Default". Can
anyone see where I am going wrong?
Thanks.
Elton W - 12 Jan 2006 03:28 GMT
Hi Kirk,
Two possible reasons:
1. The report might be in a Save Data with Report mode. It always shows data
in design time. You can open report in Seagate Report Designer. From Menu
File uncheck Save Data with Report, then save the report.
2. It’s better to use DataTable as report’s data source like following:
Report.Database.Tables[0].SetDataSource(datatable0);
Report.Database.Tables[1].SetDataSource(datatable1);
…
HTH
Elton Wang
> Elton,
>
[quoted text clipped - 18 lines]
>
> Thanks.
Kirk - 12 Jan 2006 20:04 GMT
Elton,
Thanks for your great response. I followed your second option and was
able to get my report to work!
I changed the code to this:
crReport.Database.Tables(0).SetDataSource(AuthorsDataSet.Tables(0))
...and it worked correctly.
Thanks for following up with me and getting me past this hurdle. I
greatly appreciate your help!
Kirk
Elton W - 13 Jan 2006 19:00 GMT
I'm very glad that helped.
> Elton,
>
[quoted text clipped - 10 lines]
> greatly appreciate your help!
> Kirk