matrix717
asked on
How to make Reports ?
I 'm using Visual Studio 6 and an Access 2000 database, how can I make a simple report from VB using the info from some tables of access?
Please gime me step by spet instruction because I really dont know hot to do this...
Thanks a lot
Please gime me step by spet instruction because I really dont know hot to do this...
Thanks a lot
Simply use the data report that is bundled in vb
Very easy to use. See MSDN on how to get started with data reports. MSDN has step by step information.
Ajay Chadha ..... :-)
Very easy to use. See MSDN on how to get started with data reports. MSDN has step by step information.
Ajay Chadha ..... :-)
From MSDN,
Check these Link on how to get started with Data Reports with simple Access Databases.
" Creating a Simple Data Report with Access Databse in VB"
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconcreatingsimpledatareport.htm
" Extending the Data Report "
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconextendingdatareport.htm
" Visual Basic Data Report Samples "
http://msdn.microsoft.com/library/devprods/vs6/vbasic/VBRef98/vbsamppage.htm
" Writing Reports with the Microsoft Data Report Designer "
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconusingmicrosoftdatareportdesigner.htm
and this one search page tooooo...
http://search.microsoft.com/us/dev/default.asp?qu=Creating+a+Simple+Data+Report&boolean=ALL&nq=NEW&so=RECCNT&ig=01&p=1&nq=NEW&i=00&i=01&i=02&i=03&i=04&i=05&i=06&i=07&i=08&i=09&i=10&i=11&i=12&i=13&i=14&i=15&i=16&i=17&i=18&i=19&i=20&i=21&i=22&i=23&i=24&i=25&i=26&i=27&i=28&i=29&i=30&i=31&i=32&i=33&i=34&i=35&i=36&i=37&i=38&i=39&i=40&i=41&i=42&i=43&i=44&i=45&i=46&i=47&i=48&i=49&i=50&i=51&i=52&i=53&i=54&i=55&i=56&i=57&i=58
Good Luck....
Ajay Chadha ..... :-)
Check these Link on how to get started with Data Reports with simple Access Databases.
" Creating a Simple Data Report with Access Databse in VB"
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconcreatingsimpledatareport.htm
" Extending the Data Report "
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconextendingdatareport.htm
" Visual Basic Data Report Samples "
http://msdn.microsoft.com/library/devprods/vs6/vbasic/VBRef98/vbsamppage.htm
" Writing Reports with the Microsoft Data Report Designer "
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconusingmicrosoftdatareportdesigner.htm
and this one search page tooooo...
http://search.microsoft.com/us/dev/default.asp?qu=Creating+a+Simple+Data+Report&boolean=ALL&nq=NEW&so=RECCNT&ig=01&p=1&nq=NEW&i=00&i=01&i=02&i=03&i=04&i=05&i=06&i=07&i=08&i=09&i=10&i=11&i=12&i=13&i=14&i=15&i=16&i=17&i=18&i=19&i=20&i=21&i=22&i=23&i=24&i=25&i=26&i=27&i=28&i=29&i=30&i=31&i=32&i=33&i=34&i=35&i=36&i=37&i=38&i=39&i=40&i=41&i=42&i=43&i=44&i=45&i=46&i=47&i=48&i=49&i=50&i=51&i=52&i=53&i=54&i=55&i=56&i=57&i=58
Good Luck....
Ajay Chadha ..... :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1- Add Data Environment and Data Report into your project (click Project menu, you'll see)
2- Right click on Connection1 object under Connections in Data Environment and set a source to use as database file. and also set the properties like permissions and passwords (if a password exists).
3- Right click on Commands and Add Command. Select a connection in the properties window. And then select a source like table, query or create a custom SQL text in SQL Statement. (if your connection is ok then you will see tables in Object Name combobox if you select a table type as a database object. (If command has a valid source then you can see the objects listed under Command1 name which you created.)
5- Goto Data Report design view and set your Data Environment as Data source and your Command as Data Member.
6- Insert a TextBox and Set DataMember as your Command1 and set DataField as a field name listed in related combo in properties window.
Now run it by using;
DataReport1.Show
in a command button to show the report.
This is the basics to use data reports integrated in Visual Basic. But you will see it would be disaster to use Data Reports which is in Visual Basic to create advanced reports. So i suggest what emoreau and chadhaajay said about using Access Reports within VisualBasic.
Of course Crystal Reports would be great to create advanced reports and integrate it into your application.
Good Luck!
suat
2- Right click on Connection1 object under Connections in Data Environment and set a source to use as database file. and also set the properties like permissions and passwords (if a password exists).
3- Right click on Commands and Add Command. Select a connection in the properties window. And then select a source like table, query or create a custom SQL text in SQL Statement. (if your connection is ok then you will see tables in Object Name combobox if you select a table type as a database object. (If command has a valid source then you can see the objects listed under Command1 name which you created.)
5- Goto Data Report design view and set your Data Environment as Data source and your Command as Data Member.
6- Insert a TextBox and Set DataMember as your Command1 and set DataField as a field name listed in related combo in properties window.
Now run it by using;
DataReport1.Show
in a command button to show the report.
This is the basics to use data reports integrated in Visual Basic. But you will see it would be disaster to use Data Reports which is in Visual Basic to create advanced reports. So i suggest what emoreau and chadhaajay said about using Access Reports within VisualBasic.
Of course Crystal Reports would be great to create advanced reports and integrate it into your application.
Good Luck!
suat
ASKER
Hi chadhaajay, Thanks a lot 4 for help. Also to smozgur but chadhaajay was first.
Chadhaajay, where to get information about making reports with Crystal Reports?
Chadhaajay, where to get information about making reports with Crystal Reports?
Use this code:
Private Sub Command1_Click()
Dim ac As Access.Application
Set ac = New Access.Application
' open the database.
' replace the "c:\myDir\myDBFileName.mdb
' database file name
ac.OpenCurrentDatabase "c:\myDir\myDBFileName.mdb
' uncomment the line below if you want to see Print Preview
' ac.Visible = True
' replace the acViewNormal below with acViewPreview
' if you want to see Print Preview
ac.DoCmd.OpenReport "MYREPORT", acViewNormal
' delete the line below if you want to see Print Preview
ac.CloseCurrentDatabase
End Sub
Notice that users to whom you install the application will require Access to be installed on their PC.