darkpl Posted August 8, 2003 Posted August 8, 2003 Crystal Report. I'm new to VB.Net, i know there is a new features - Crystal Report. Can anyone give me an example how to create and show (say, a button press) a report using Crystal Report? I'm using OLEDB and connect to Access DB. :( :( :( Quote
Dirty Howi Posted August 8, 2003 Posted August 8, 2003 crystal in vb is nothing new, if you have VS.NET there is a report wizard, just drop your db connection onto a form and the report generator will pretty much take care of the rest, don't ask how to make a report after the wizard is done, cause crystal and i don't get along. Quote
KenpoMatt Posted August 8, 2003 Posted August 8, 2003 Take a look at this articel. It should be enough to get you started: http://www.aspalliance.com/articles/CrystalReportVSNet.aspx Quote
tomshark Posted August 15, 2005 Posted August 15, 2005 Crystal Reports in VB Crystal Report. I'm new to VB.Net, i know there is a new features - Crystal Report. Can anyone give me an example how to create and show (say, a button press) a report using Crystal Report? I'm using OLEDB and connect to Access DB. :( :( :( Here is the easiest way I know: 1. Create your Crystal report and save it...you will need the full path and report name (example: X:\CrystalReports\MyReport.rpt ). 2. Create a New Standard EXE VB project and, in Project References, check the boxes for: Crystal Report Viewer Control 9 Crystal Reports 9 ActiveX Designer Design and Runtime Library Crystal Reports 9 ActiveX Designer Run Time Library 3. In Project Components, checkmark the box for Crystal Report Viewer Control 9. 4. Create two forms...name one frmMain and the other frmCrystal. 5. On frmMain, create a Command button for your report...double click it and put frmCrystal.Show as the code 6. On frmCrystal, double-click the CRViewer9 icon (on the General Toolbar) to put the viewer on the form (it will default name it CRViewer91 . You should set WindowState to Maximized. 7. Right-click on the form, click VIEW CODE and paste this code: Private Sub Form_Load() Dim Appl As New CRAXDRT.Application Dim Report As New CRAXDRT.Report CRViewer91.Top = 0 CRViewer91.Left = 0 CRViewer91.Height = 12336 CRViewer91.Width = 15408 Set Report = Appl.OpenReport("X:\CrystalReports\MyReport.rpt") CRViewer91.ReportSource = Report CRViewer91.ViewReport End Sub 8. You can put a Command button on this form called Exit and paste Unload Me in it to return to frmMain. 9. This should do the trick...the great thing is you can edit the Crystal Report without opening VB and it does not overload the VB project with all your CR forms. Run it and enjoy. TomShark :D Quote
tomshark Posted August 15, 2005 Posted August 15, 2005 Crystal Reports in VB Crystal Report. I'm new to VB.Net, i know there is a new features - Crystal Report. Can anyone give me an example how to create and show (say, a button press) a report using Crystal Report? I'm using OLEDB and connect to Access DB. :( :( :( Here is the easiest way I know: 1. Create your Crystal report and save it...you will need the full path and report name (example: X:\CrystalReports\MyReport.rpt ). 2. Create a New Standard EXE VB project and, in Project References, check the boxes for: Crystal Report Viewer Control 9 Crystal Reports 9 ActiveX Designer Design and Runtime Library Crystal Reports 9 ActiveX Designer Run Time Library 3. In Project Components, checkmark the box for Crystal Report Viewer Control 9. 4. Create two forms...name one frmMain and the other frmCrystal. 5. On frmMain, create a Command button for your report...double click it and put frmCrystal.Show as the code 6. On frmCrystal, double-click the CRViewer9 icon (on the General Toolbar) to put the viewer on the form (it will default name it CRViewer91 . You should set WindowState to Maximized. 7. Right-click on the form, click VIEW CODE and paste this code: Private Sub Form_Load() Dim Appl As New CRAXDRT.Application Dim Report As New CRAXDRT.Report CRViewer91.Top = 0 CRViewer91.Left = 0 CRViewer91.Height = 12336 CRViewer91.Width = 15408 Set Report = Appl.OpenReport("X:\CrystalReports\MyReport.rpt") CRViewer91.ReportSource = Report CRViewer91.ViewReport End Sub 8. You can put a Command button on this form called Exit and paste Unload Me in it to return to frmMain. 9. This should do the trick...the great thing is you can edit the Crystal Report without opening VB and it does not overload the VB project with all your CR forms. Run it and enjoy. TomShark :D Quote
neodatatype Posted August 18, 2005 Posted August 18, 2005 Crystal Report. I'm new to VB.Net, i know there is a new features - Crystal Report. Can anyone give me an example how to create and show (say, a button press) a report using Crystal Report? I'm using OLEDB and connect to Access DB. Just a question. Why when you need a report you say "Crystal Report", also if it is (in my opinion) the worse tools all around? Quote > NeoDataType.net < Try my Free .Net Reporting Tool!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.