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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Fields in CR10 and VB6 ADODB recordset 1

Status
Not open for further replies.

kellytim

Programmer
Oct 28, 2004
10
US
I am trying to use an ADODB recordset that I create by appending fields and addnew, update in VB as the data source for my report. I set the report.database.setdatasource to the recordset. I want the fields from my recordset to be used in my report and to show up under the database fields. Is this possible?

Other reports have been done on this project (by a developer that has left the company) using ADODB recordsets as the data source, but the recordsets have always been filled from an SQL statement on a database table. I don't know how the fields get on the report under the database fields, ado.

Thanks for any help that can be provided.
 
zemp,
Thanks for your response. I'll look into the link you sent.


I am very new to both VB and Crystal Reports and I was wondering how the previous developer got the fields on the reports he did. When I look under the database fields I see ado. Under the ado the fields that the VB sql statement returns are listed. When I right click and choose set database location (I think this is right, I'm at home and don't have Crystal Reports in front of me), it shows the current location to be something like:

report
server machine name
username
someother fields

ado
properties
table (sometimes a table, sometimes just ado)
someother fields.

Sorry this isn't complete, but I can't get access to my office today.

How would he have gotten the fields listed? What I see on the existing reports doesn't seem to show me how I would duplicate it.

Thanks in advance for any help.

KellyTim
 
I am not sure what the developer did. The link should explain things to you so that you can accomplish the same thing.

zemp
 
Have a look at my response in this thread: thread767-864667. It describes another method for setting up a report to use ado without using .ttx files. That's obviously the route that the original developer took.

-dave
 
Thanks zemp and dave. I think I may have to use the .ttx file if I want to use my recordset that I defined the fields in, since I am building it from several other sql statements.

However, I think dave is correct about what the previous developer did. Before he left he said I needed to put SQL in my report but couldn't remember how to look at it and show me. I think that he put his sql directly into the forms data source. I think it will take me some figuring to do it, but I hope I can get it. I'm not sure how to set up my data source from 'Make New Connection. I'll give it a try on Monday.

Thanks again everyone.

kellytim
 
I was able to implement the ado without .ttx files. I have to figure out how to get all my data on my report from multiple database files, but, I got connected and was able to send data from a record set in VB to my database fields in Crystal Reports.

Thanks for all the help,

kellytim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top