![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I've recently moved over from VB6 to VB.Net 2005 Initial impressions are pretty good, but there's on bit that's driving me insane! In a VB6 app I've done, I created a Crystal report and give it a datasource of an ADO recordet - Perfect!! Trying to do the same in 2005 and I've wasted 2 days in this!! It seems that I can't create a report, either crystal or the ms report viewer, without a database connection!! My current app creates the database as it runs for the first time, and it's location is variable. I'm totally new to datasources - I've always worked with recordsets As I can't seem to attach a recordset to it, I though of populating a table in the database and having the report read from there... It would seem I can't create a report without defining a datasource and this needs configuring into my database - which could be anywhere! I've read vaugly about being able to use an object as a datasource, and wondered if that might be a better solution, but being new to this, can't find any details that I understand! My object is created thus: Imports System.text Namespace Report Namespace Objects Public Class ReportSummary Public m_DATE As String Public m_ID As String Public m_TRIPtime As String Public m_DISTANCE As Double Public m_MAXspeed As Double Public m_AVspeed As Double Public m_IDLE As Double Public Sub New(ByVal sDATE As String, ByVal sID As String, ByVal sTRIPtime As String, _ ByVal dDISTANCE As Double, ByVal dMAX As Double, ByVal dAV As Double, ByVal dIDLE As Double) m_DATE = sDATE m_ID = sID m_TRIPtime = sTRIPtime m_DISTANCE = dDISTANCE m_MAXspeed = dMAX m_AVspeed = dAV m_IDLE = dIDLE End Sub Public ReadOnly Property ID() As String Get Return m_ID End Get End Property Public ReadOnly Property EvDate() As Integer Get Return m_DATE End Get End Property Public ReadOnly Property TripTime() As Integer Get Return m_TRIPtime End Get End Property Public ReadOnly Property Distance() As Integer Get Return m_DISTANCE End Get End Property Public ReadOnly Property Max() As Integer Get Return m_MAXspeed End Get End Property Public ReadOnly Property Av() As Integer Get Return m_AVspeed End Get End Property Public ReadOnly Property Idle() As Integer Get Return m_IDLE End Get End Property End Class End Namespace End Namespace Can I populate this object, or an array base therron, with multiple records that I can then use to fill my report with? Is there an easier way to acheive my objective of creating a recordset and using it as a source for my report? I've given up on crystal and am using the microsoft report viewer as its going to be easier to deploy., and it's not a sophistaced report so there's no point complicating matters! Help and prozak appreciated... Tym. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |