mattKnight
Programmer
Hi All,
This is a post made in the VB forum, which has sunk without trace there. Is anyone here able to offer some help?
I have a SQL database and CR9 Advanced I wish to create a recordset on the fly in code and pass to CR for display.
I have done the following,
Stage 1 - Created ttx file (had to do it manually as CR9.1 has made the api call you suggest obsolete..) I have even added sample data into the file.
Stage 2 & 3 - Created report usng TTX file... This works OK with smaple data
Stage 4 Created record set from SQL server (used command object) (yes it does return records) and passed ado recordset to CR using setDatasource See the code snippet below...
Ths code execute without an error, andshows a report in the viewer however, it shows the sample data in the TTX file only. If I edit the TTX file to remove the sample, verfiy report etc, I get a blank report viewed.
Where am I going wrong, does the name of the recordset (adoRS) need to match the ttx file? Do I need to map fields?
Any suggestions gratefully accepted!
Does anyone have any suggestions as to why I only get the test data in the TTX file shown when the viewreport method is called?
Take Care
Matt
If at first you don't succeed, skydiving is not for you.
This is a post made in the VB forum, which has sunk without trace there. Is anyone here able to offer some help?
I have a SQL database and CR9 Advanced I wish to create a recordset on the fly in code and pass to CR for display.
I have done the following,
Stage 1 - Created ttx file (had to do it manually as CR9.1 has made the api call you suggest obsolete..) I have even added sample data into the file.
Stage 2 & 3 - Created report usng TTX file... This works OK with smaple data
Stage 4 Created record set from SQL server (used command object) (yes it does return records) and passed ado recordset to CR using setDatasource See the code snippet below...
Code:
Set adoRS = adoCmd.Execute
Screen.MousePointer = vbHourglass
rep.Database.Tables.Item(1).SetDataSource adoRS, 3
CRViewer91.ReportSource = rep
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
Ths code execute without an error, andshows a report in the viewer however, it shows the sample data in the TTX file only. If I edit the TTX file to remove the sample, verfiy report etc, I get a blank report viewed.
Where am I going wrong, does the name of the recordset (adoRS) need to match the ttx file? Do I need to map fields?
Any suggestions gratefully accepted!
Does anyone have any suggestions as to why I only get the test data in the TTX file shown when the viewreport method is called?
Take Care
Matt
If at first you don't succeed, skydiving is not for you.