Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot get report to use ADO recordset

Status
Not open for further replies.

dalchri

Programmer
Apr 19, 2002
608
US
I am using craxddrt9.dll (CR9) in VJ++. I've created a very simple report off of a ttx file. The ttx file has one table, Test, and one field, Test String(20).

I used to be able to pass recordsets from VB6 to CR7 with no problem using crpeaut32.dll but I can't find this dll anymore with CR9.

I use the following code to no avail:
[tt]
rst = new Recordset();
rst.getFields().append("Test",AdoEnums.DataType.VARWCHAR,20);
rst.open();
rst.addNew();
rst.getField("Test").setString("Testing123");
rst.update();

rptTest.getDatabase().getTables().getItem(1).SetPrivateData(3, new Variant(rst));

CRViewer.setReportSource(rptTest);
CRViewer.ViewReport();
[/tt]
No matter what I do, the report is ignoring the recordset and retreiving data from the ttx file. I know it is doing this because I've renamed the ttx file and it prompts me for its location. I've made sure that the recordset matches the field definition file, that the report does not save data with it, and that the recordset stays in scope so it doesn't close prematurely.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top