Solved

Reporting Database info to reports

Posted on 2004-08-31
8
149 Views
Last Modified: 2010-05-02
Hello, I am trying to use the DataReport object.  I am getting an error....

Can anyone tell me if Visual Basic 6 comes with Crystal Reports?  I see there is a Crystal Reports Object, but do I need Crystal Report program to run it?  I probably do since it is named as a viewer.

The error I get with DataReport Object is : "Failed getting Rowset(s) from current datasource."  Can someone get me past this error?  Also can someone point me to example of how to use this tool?  I don't need to make complex report, just a basic one.

I would like advise on Crystal Reports and DataReport Object....   Which one is the quickest way to create a report.


Thanks...

0
Comment
Question by:strongd
  • 5
  • 3
8 Comments
 
LVL 2

Expert Comment

by:x50Fade
ID: 11950680
Crystal is cool....Datareport is fine....

I use Data reports for basically all my reporting needs....I have yet to do something that is not possible in Datareports...

How are you using the Datareports?   Through Data Environment......or something else

Please elaborate a bit more on how u are using it and where it gives ou the error
0
 

Author Comment

by:strongd
ID: 11965777
I am trying to use Data Environment.  I think I have everything setup right but I keep getting the error "Failed getting Rowset(s) from current datasource."  

Now I know my query works.  I even opened up Enterprise Manager, and used the same SQL statement to test it.  It worked there, so I cut and pasted it into CommandText property in my command1, but it keeps giving me this error...  Does this error mean that it is not getting any records back?

I would like to use this tool, but I have read on other sites that is a kind of unstable and weird to get to work.  If I could just gets it to work with this basic query, I will use it.

0
 
LVL 2

Accepted Solution

by:
x50Fade earned 250 total points
ID: 11970499
I dislike using the data environment....It's not a good tool....a lot of dwarwbacks....

So instead I stil use Datareports, but without the dataenvironment...

Make up your report in Datarepots, set the "field name" propperty of the labels to whatever the fields are that your wish to report (inside your DB).

Now you can open your recordset using using normal ADO coding.....

Once you populate your rs, merely do this

set Datareport1.recordsource rs
datareport1.show
0
 

Author Comment

by:strongd
ID: 11999142
I just got this message...  I will check this out....  if it works, I'll give x50Fade the points...

Give me a little bit to check and test it...


0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:strongd
ID: 11999296
x50Fade....  can you supply sample code...


Thanks

0
 

Author Comment

by:strongd
ID: 12000831
Never mind X50Fade... I got it to work... Here are the points...
0
 

Author Comment

by:strongd
ID: 12000849
Thanks a lot x50Fade, what you told me worked great.  I wish I knew this sooner.  I wasted a couple of days messing with the stupid dataenvironment.

0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12003581
No Problem

Glad I could help
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now