|
-
December 29th, 2005, 07:54 AM
#1
Access Reports, Crystal Reports, or VB reports
I have written a user survey application, collecting obvisiously user information. I have their information going into an Access database when they hit submit.
I have also written a viewer application, for anyone in my shop to be able to browse through the database, without having to know anything about Access.
I want to add to this viewer all sorts of different reports that will basically sort the different pieces of information for whatever us administrators want to see.
I started off with DataReport's in VB, but I didn't really like them... didn't seem to be nearly enough functionality. (If I am wrong here and these DataReport's can be made really nice and are fairly simple to throw code into, please let me know.)
Next I tried Crystal Reports, but as I had expected, for anyone else to use my application and the report found within, they need at the very least, the crystal.ocx(can't remember the exact name) file installed locally on their machine. --Sure I could write a script to install whatever files need to be installed but, I really don't feel like it :-P
So my final question is, is there any way to actually access a MS Access report from VB. Kind of the same thing as crystal reports maybe?? If this does exist, it would work fantastically considering everyone already has Access installed on their machines.
Basically can I bring up an Access Report from VB, should I just write a script and use Crystal Reports, or am I missing some functionality of DataReports??
Thanks... You guys are awesome and I know you'll get to this when you can.
Happy Holidays
-
December 30th, 2005, 06:09 AM
#2
Re: Access Reports, Crystal Reports, or VB reports
Anyone have any idea's or suggestions??
Thanks
-
December 30th, 2005, 04:52 PM
#3
Re: Access Reports, Crystal Reports, or VB reports
You can use a 'ADODB' connection to the DB or 'DOA'
Do a search on CG for information on how to connect to the db..
Hope this Helps......
.
Gremmy
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
December 31st, 2005, 04:06 PM
#4
Re: Access Reports, Crystal Reports, or VB reports
I am already using an ADODB connection to the database. I have gotten the VB DataReport to work, and the Crystal Reports to work from my application. However, when I created the .exe and put it on our network for one of our other admins to try out, the crystal reports didn't work because it said crystal.ocx(or something of that sort) not found.
With VB DataReports, it just doesn't seem like it would be very easy to throw code into to change the report around. I could use Crystal Reports, but I would have to write a script to push out the required files to all our admin machines, and I don't really want to do that.
OR.
Are you saying that you can say something like
Code:
dim myReport as new ADODB.Report
'the connection will already be active to the db through the var "conn"
Set myReport = New ADODB.Report
'on click of menu item
myReport.open
sorry if I confused you before, and if you still are just let me know.
Thanks in advance.
Buddy
-
December 31st, 2005, 04:50 PM
#5
Re: Access Reports, Crystal Reports, or VB reports
You didn't mention that you are using 'ADODB', so i just asumed you weren't.. (Sorry)...
Build queries or reports in the Acces db, and use the ADODB connetion to pull the data back into your vb application. Then display the reports on a custom painted form, You can now add your own functionality to your reports. and no need to include any other OCX or applications. see the discution on this thread with a related problem..
Having a ADODB connection already active, you can pull any thing from the db without adding any further Dll's and OCX's, Just need a little more in your app itself.
Hope this Helps...
Gremmy..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
January 5th, 2006, 07:04 AM
#6
Re: Access Reports, Crystal Reports, or VB reports
Thanks Gremmy, but I finally found exactly what I was looking for.
Code:
Dim oAccess As Access.Application
Set oAccess = New Access.Application
oAccess.OpenCurrentDatabase ("D:\db1.mdb")
oAccess.Visible = True
oAccess.DoCmd.OpenReport ReportName:="myReport", View:=acViewNormal
You can actually use this to open ("preview") a report from MS Access, which is exactly what I wanted to do. Takes out the crystal report option all together, and I don't have to mess around with VB DataReports. I can create exactly what I want in my Database, and preview/print it with this.
Well I hope anyhow, I haven't gotten to try it out quite yet, but it makes sense 
And I know what you were saying, but I think I still might have had you a little confused. I know that I can pull anything I want to from the table itself, and arrange it however I want. I actually already have it done that way in my app The problem was generating nice looking, printable reports that we could brief or whatever. and a print out of my VB form, probably wouldn't cut it... Hehe 
Once again thanks Gremmy for responding you have helped me out a lot on these forums...
-
January 5th, 2006, 03:25 PM
#7
Re: Access Reports, Crystal Reports, or VB reports
 Originally Posted by Buddy008
Thanks Gremmy, but I finally found exactly what I was looking for.
Code:
Dim oAccess As Access.Application
Set oAccess = New Access.Application
oAccess.OpenCurrentDatabase ("D:\db1.mdb")
oAccess.Visible = True
oAccess.DoCmd.OpenReport ReportName:="myReport", View:=acViewNormal
You can actually use this to open ("preview") a report from MS Access, which is exactly what I wanted to do.
Just remember that any pc now running this app will need MS Access to be installed..(Pref. the same version, Newer version will popup a msg "DB 'Name' was created in a previous vertion of access.. OPen or Convert." every so often. <-- well first time a new DB is opened on the system) and this can get anoying....
Gremmy...
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
January 6th, 2006, 06:12 AM
#8
Re: Access Reports, Crystal Reports, or VB reports
Yes and thank you. Access is pretty much a standard on all of our workstations. And we also need to keep everything on our network at the same version, so this won't be an issue for me at all.
This was the issue I was running into with Crystal Reports though, because before a few weeks ago, I had never even heard of them. So, they were hardly a standard software package on our network. To get it to work properly I would have had to push out some CR specific files to all of our administrative machines 
So this is very good news for Me
-
January 6th, 2006, 03:52 PM
#9
Re: Access Reports, Crystal Reports, or VB reports
 Originally Posted by Buddy008
Yes and thank you. Access is pretty much a standard on all of our workstations. And we also need to keep everything on our network at the same version, so this won't be an issue for me at all.
This was the issue I was running into with Crystal Reports though,
So this is very good news for Me 
This is good news... Your lucky with this...
At the one company i worked at .. the further down the 'Food Chain' you were, the older the system (and related software).. I was trying to support Win 3.1 , NT, 95 and 98.. MS office 4, 5( think it was 4 and 5 or 2 and 3 or whatever...) and 97..
Talk about a total nightmare...
Just remember.. any new systems that require your app, should get the same ver Office loaded... ( Hell theres a new version practicaly every year now.. )
Gremmy.
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|