Você está na página 1de 8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

Home Get Started Downloads Web Pages Web Forms MVC Solutions

FRAMEWORKS
Web Pages Web Forms MVC

TECHNOLOGIES
Web API Single Page Application Ajax Mobile

vNEXT
ASP.NET 4.5 ASP.NET MVC 4 ASP.NET Web Pages 2 More information Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources Community Forums
Search ASP.NET

Sign In| Join Home/ASP.NET Forums/Advanced ASP.NET/Crystal Reports/how to create crystal report using VB.NET with the database of ACCESS

how to create crystal report using VB.NET with the database of ACCESS RSS
7 replies
forums.asp.net/t/1389210.aspx/1 1/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

Last post Mar 04, 2009 06:56 AM by asad_black (1) Previous Thread|Next Thread Reply

asad_black
Member 17 Points 67 Posts

how to create crystal report using VB.NET with the database of ACCESS
Feb 24, 2009 02:58 PM|LINK hi..! i want to create crystal report of my project. em using access database...!

but i have no idea how to create reports using VB.NET with the access db Reply

asad_black
Member 17 Points 67 Posts

Re: how to create crystal report using VB.NET with the database of ACCESS
Feb 24, 2009 05:09 PM|LINK
forums.asp.net/t/1389210.aspx/1 2/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

i create the report but it shows only one record Reply

shail_nautiyal
Member 69 Points 42 Posts

Re: how to create crystal report using VB.NET with the database of ACCESS
Mar 03, 2009 10:51 AM|LINK hi ...... You can do it PUSH method of creating crystal reports...!!!!! In push method Typed Dataset is used as the data sourcefor crystal report...!!! Steps for creating the report could be..... 1. add a typed dataset to your solution. 2.go to server explorer. 3.connect your access file to your server explorer. 4.Change data base.. 5.attach access file..!! 6.test connection... 7. Drag and drop the table from server explorer to typed Dataset.. 8. Now add a crystal report to your solution.... 9. at report creation wizard, get the dataset from project data... 10. Design the report.... 11. use following code for OLEDB conection... cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDB.mdb;")
forums.asp.net/t/1389210.aspx/1 3/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

12. now create an object ( say ds ) of your dataset, and fill that with the data....using the "data adapter". 13. create an instanse of crystal report viewer ... and with all other coding , set the datasource of your report Document to ds .......

i hope this'll help you....!!!!!! ----------------------------------------------------------please mark as ans.. if the post helps you..!!!

Reply

shail_nautiyal
Member 69 Points 42 Posts

Re: how to create crystal report using VB.NET with the database of ACCESS
Mar 03, 2009 11:14 AM|LINK actually i was trying to show you the snap shots.... but dont know why the images are not visible in the post...... by the way.. i think the post will help you..!!!!!!! Reply

asad_black
Member 17 Points 67 Posts
forums.asp.net/t/1389210.aspx/1 4/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

Re: how to create crystal report using VB.NET with the database of ACCESS
Mar 04, 2009 03:49 AM|LINK thankx for the reply...! if u post the coding for creating report i will be very thankful of u ....!

Reply

shail_nautiyal
Member 69 Points 42 Posts

Re: how to create crystal report using VB.NET with the database of ACCESS
Mar 04, 2009 05:13 AM|LINK ohh yes .. why not...!!!!!

after adding the dataset and creating the schema of your table you should... 1. add... CrystalDecisions.CrystalReports.Engine CrystalDecisions.Shared CrystalDecisions.Windows.Forms CrystalDecisions.ReportSource 2.Create a DataTable containing the data for the report: Imports System.Data.OleDb Dim strConnection As String = "..."

forums.asp.net/t/1389210.aspx/1

5/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

Dim Connection As New OleDbConnection(strConnection) Dim strSQL As String = "Select * From Customers" Dim DA As New OleDbDataAdapter(strSQL, Connection) Dim DS As New DataSet1 '(DataSet1 is the typed dataset) ' ' Create a datatable in your dataset. The datatable's name ' must match that in the schema file used by the report. ' DA.Fill(DS, "Customers") 3. CrystalReport's .RPT file:: Dim strReportPath As String = Application.StartupPath & _"\" & strReportName & ".rpt" If Not IO.File.Exists(strReportPath) Then Throw (New Exception("Unable to locate report file:" & _ vbCrLf & strReportPath)) End If 4. set datasource :: Dim cr As New ReportDocument cr.Load(strReportPath) cr.SetDataSource(DS.Tables("Customers")) ' always remember one thing that the table name should be exactly same in 'Typed dataset and your code behind 5.Do what ever you like to do with your report viewer...!! CrystalReportViewer.ShowRefreshButton = False CrystalReportViewer.ShowCloseButton = False CrystalReportViewer.ShowGroupTreeButton = False CrystalReportViewer.ReportSource = cr i think this should be enough for you to create report using crystal report..... ---------------------------------------------please mark as answer if the post helps you...!!![;)]
forums.asp.net/t/1389210.aspx/1 6/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

crystal report using vb.net Reply

shail_nautiyal
Member 69 Points 42 Posts

Re: how to create crystal report using VB.NET with the database of ACCESS
Mar 04, 2009 05:33 AM|LINK here are some links ... which will definately help you....

http://www.tek-tips.com/faqs.cfm?fid=3940 http://www.beansoftware.com/ASP.NET-Tutorials/Using-Crystal-Reports.aspx http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/threads/ happy programming...!!!!! [:)] -------------------------------------------------------------- please mark as answer if post helps you...!!! Reply

asad_black
Member 17 Points 67 Posts

Re: how to create crystal report using VB.NET with the database of ACCESS
Mar 04, 2009 06:56 AM|LINK thank you so much my friend i will try it later then i will inform you :) thankx
forums.asp.net/t/1389210.aspx/1 7/8

5/1/12

how to create crystal report using VB.NET with the database of ACCESS : The Official Microsoft ASP.

Previous Thread|Next Thread

Powered by MSDN
Privacy Statement| Terms of Service| Site Feedback| Advertise With Us

Follow Us On:
Twitter| Facebook

Microsoft
Feedback on ASP.NET| File Bugs

forums.asp.net/t/1389210.aspx/1

8/8

Você também pode gostar