Link to home
Start Free TrialLog in
Avatar of steve_mills
steve_mills

asked on

Access report from VB5.0

I would like to be able to send a varable to access from vb5.0 and print out a access report.

Thanks
Steve
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Hi, i think what you need is use VB5.0 to connect to the access database rather than send a variable to it.
Avatar of steve_mills
steve_mills

ASKER

How do I do this
Hi, i can't tell you the purpose way, bcos i'm using VB6 right now.

Anyway, Are you develop your application on Access Database itself? If yes then you should use VBA included in Access.

OR if you want to use VB, then there are so many ways to connect VB to an Access Database, such as ADO, DAO.
Do you want to filter your data? In this case, you can use the last parameter of the OpenReport method (which is the Criteria and must contain the Where clause).
Has anyone have a snipit of code I can look at because you guys are loosing me.

Thanks
Steve
hi
create a report design in access and save
include crystal report activex control
use open report method to connect to access report
i think you can give report name intead of table
you can  create paramater field in access and
we assign values into paramater field using the crytal controls methods
explore
regards
mpaul4u can you give me the vb5.0 comands you are talking about
Hi,
Maybe u can include the Acess.Application to do some work:

You need to add a "project reference" to Access. Click [Project] > [References].
Select "M'soft Access 8.0 Object Library"!
p.s - your may have different version of Access. (Access 8.0 is for the MS Access 97)

In ur code:
Dim appAccess As Access.Application



MilkTin
http://go.to/cyberprogrammer         
Hi Steve,here is a link from MSDN shows how to use OpenReport Method in Access, hope it's useful:

http://msdn.microsoft.com/library/officedev/office97/output/F1/D2/S5A192.HTM
I have managed to get some of these to work but you seem to need access on your PC. I am hoping you can open a report with out having a full version of access on your PC to.

Thanks
Steve



You absolutely need to install Access on these computers to use its reports feature. It is like using Word or Excel, you need to have them installed.
Ok so it looks like I am taking the wrong direction. So I have a report I need to do in crysatl reports. I can produce a temp table and do it that way. But I have tried to do this with no luck. I was using sub forms in access to do what I wanted in access. Is there a function like this in crystal and if not how do I get around it.

Thanks
Steve



You need the pro version of CR to be able to insert sub-reports.
any idea how much
It look like $500 us bit steep any other suggestions

Thanks
Steve
Nothing is for free!

Don't upgrade to VB6 only to use the DataReport. It won't help in your case.

If you don't want to distribute Access to all your users (which may cost more than 500$), I would definitely go with CR pro.
I have a version of CR pro that come with VB5 version

Product 4.6.10
CRW32 4.6.1.116

But know info on subreport in this version am I after a latter version and if so what.

Thanks
Steve
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi I have got hold of a Seagate Crystal reports Ver 8
This has the supreports in it, and I have managed to get it to do what I want with the data. But using the following nothing comes up in my program

cryRepView.DataFiles(0) = (BuildPath & gsDataBase)
cryRepView.ReportFileName = BuildPath & "reports\haz7.rpt"
cryRepView.SelectionFormula = " {HazReg.HazID} =  " + txtHazID + ""
cryRepView.Destination = crptToWindow
cryRepView.PrintReport

are there other commands I should be using, or do I have to load another ocx file and if so were can I get it and what is its name.

Thanks
Steve

P.S. Thanks for persisting with me.
You have plenty of samples when you install CR. Take time to look at them.
Any news?
Still alive?
Please maintain:

Questions Asked 35
Last 10 Grades Given A B A B A A A C B B  
Question Grading Record 29 Answers Graded / 30 Answers Received
The original question was about Access reports!
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order.
I deserve the points
Thank you, emoreau, I have force accepted and moved to the PAQ.  If Asker returns with additional need in this regard, I trust you will return to continue this collaboration.

Moondancer
Community Support Moderator @ Experts Exchange
I am sorry for the lack of reply to emoreau but I have been on leave and know back into it. Hope to look at this issue again next week.

Thanks
Steve