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

Crystal Reports and VB6

Status
Not open for further replies.

walleyevis

Programmer
Aug 16, 2001
2
US
I have a vb dataaccess dll that hits a microsoft 2000 database.

I thought I could use crystal reports and this dll to access the data.

Is there any way I can use code to hit the dll and then post it on the report. I have tried using the text box in crystal reports to show the data but I get a read only type of error. Then I tried to use an unbound field control but get some wierd could not creat object error. I am just wondering if it is possible to create a report without using a DSN or any other control.

Any help would be appreciated.

thanks
 
If you are doing this within an application, and you can get the data into a recordset, then you can pass the recordset to the report. The report will probably have to be recreated to accept a recordset, but this way you can get the data however you like. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Thank you for the reply. I am using crystal reports through vb using the crystal reports control. Do you have any suggestions on how to get the data I want. You suggested using a recordset. I can get the data into a public recordset using a module to create the public recordset but what do I do with it then. Every time I add a field or text box to the crystal report it auto fills in the stuff but I want to fill in the box or field on the fly depending which user is logged into the system and what the date is on the form. I have global variables that keep track of the user and date within vb, is there a way to get at these in crystal reports?
 
Let me review the concept and see if this works for you.

First you have to create the report using a temporary recordset that has the same columns as the one you will pass. You can't pass a recordset to just any report.

Then, once you have the report, you use a command in VB to pass your recordset to the report. You can generate the recordset any way you want. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top