Using DataReports.NET in Visual Basic Express

dualshock03

Well-known member
Joined
Jan 28, 2007
Messages
105
Programming Experience
1-3
Hi! its been a long time since my last post here.. anyway i need a help regarding this DataReport viewer for .NET framework. Its a DataReport.NET component which i'd downloaded from www.dbAutoTrack.com. and i got it for evaluation version only. What i wanted now is to try to use this component using with my MySQL Database, im using MysqlConnector to connect to database.. I have a system which i need to hav report generation though i cant get the right DataReport Component for my system. VBExpress Edition doesnt had any Report viewer compare to the VS.NET which include crsytal Reports.. will you tell me where i can download a crystal report component for VBExpress 2005??

Hoping for any great replies!! Thanks!
 
You can't download a Crystal Report component for VB Express. If you want to use Crystal Reports with VB Express then you need to buy Crystal Reports. That said, the SQL Server Reporting Services components are included with VB Express. Despite the name, SQL Server Reporting Services is not reliant on SQL Server unless you want to implement a report server, which you do not.
 
... the SQL Server Reporting Services components are included with VB Express. Despite the name, SQL Server Reporting Services is not reliant on SQL Server unless you want to implement a report server, which you do not.

I am installing SQL Server Express with Reporting Services as I type. I have had to install IIS as well. Can RS be used with Windows Applications? Will the user have to have IIS installed to use the reports?
 
When you're using a ReportViewer without a Reporting Server it is entirely stand-alone. It's up to you to retrieve and prepare the data, which you then simply pass to the viewer for display. I've never used any Reporting Services functionality so I can't speak from experience. I just went to MSDN and read about it. I suggest that you do the same.
 
DataReports.NET 2.0 an alternative to Crystal Reports for VBExpress

Hey guys!! i already know how to use this reporting component easily. its 100% compatible for VbExpress and works great! Unlike using crystal reports 10 and 11 versions for VbExpress, DR.NET is more relevant for your reporting applications.. I did it with using MYsql Database... Either ur downloaded it in EV or FV it works ok..
 
Hey guys!! i already know how to use this reporting component easily. its 100% compatible for VbExpress and works great!

Haven't played around with it for long, but very impressed.
It's really easy to use.

I need to pass variables to reports, but haven't been able to find out how yet. Any ideas?
 
Replying...

i dont need to pass variables as should.. i just go for the sql syntax.
just go look at the sample apps in using IDataReaderBinding for DataReports.NETv.1.5 and analyze the sql query. Im using Mysql so as the syntax goes.

Here's my sample...

Using IDataReader..=(Interface IDataReader Class)
Namespace: System.Data
Assembly: System.Data (in system.data.dll)

Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a datasource, and is implemented by .NET Framework data providers that access relational databases.


Code:----------------------------------------------------------------
Declare Function:

Private Function GetIDR() As IDataReader
mysqladapter = New MySqlDataAdapter
Dim connection1 As New MySqlConnection
connection1.ConnectionString = "server =localhost; user id=root; password=amacc; database=lnupayroll2007"
Dim command1 As New MySqlCommand
command1.Connection = connection1
command1.CommandText = "SELECT * FROM regularpayroll2007 where EmpNo= '" & tremp.Text & "'"
mysqladapter.SelectCommand = command1
command1.Connection.Open()
Return command1.ExecuteReader
End Function

Generate Report:
---------------------------------------------------------------------
Private Sub btnprintreg_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnprintreg.Click
Dim report1 As New DataReports1
Dim viewer1 As New NETviewer
Try
report1.DataSource = GetIDR()
report1.Generate()
viewer1.ViewerSlip.Document = report1.Document
viewer1.ShowDialog()
Finally
End Try

End Sub

After adding this code, just put the proper datafields properties in your DataReports components e.g. the datafield of DbATTextBox etc. prior to your database columns.

NoTE: All your DR.NET equivalent controls should be created in details design surface for this
to work coz its where data is generated
 

Attachments

  • payslip.GIF
    payslip.GIF
    47.4 KB · Views: 84
I've found it is very easy to pass variables.
The report components are the same as form components, so after placing a DbATLabel on the report, you just use something like:
VB.NET:
Me.DbATLabel.Text = ("It's as easy as that?!")
Just keep the brackets.
 
Back
Top