HELP, TTX file and using a ADO Rs 
Author Message
 HELP, TTX file and using a ADO Rs

Ive been to the KB, the forums and the what they call a help files.
I still cant get this damn thing to work,

really stimple access97 database ..  one table, one field.

What the hell is the TTX file supposed to look like ..

this is what mine says.
Serials.TTX
SerialNumbers String 50

my report says its using the serials.ttx from what i can tell and
i have the SerialNumbers field showing in the report.

My code ......
-------------------------------------------------------
Viewer Form
Option Explicit
Private Sub Form_Load()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim SQL As String
Dim fld As ADODB.Field

Screen.MousePointer = vbHourglass

SQL = "SELECT Products.SerialNumbers FROM Products WHERE
(((Products.SerialNumbers) Like ""5%""));"

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source=.\SerialNumbers.mdb;"

rst.Open SQL, cnn, adOpenKeyset, adLockOptimistic

Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report

'REPORT3 was created with a TTX file
Set crxRpt = crxApp.OpenReport(App.Path & "\serialnumbersreport3.rpt")
CRViewer1.ReportSource = crxRpt

' just a check to make sure im getting data in the Rst and yes there is.
Do Until rst.EOF
  Debug.Print rst.Fields("SerialNumbers").Value
  rst.MoveNext
Loop

crxRpt.Database.Tables(1).SetDataSource rst, 3

CRViewer1.ViewReport

Screen.MousePointer = vbDefault

End Sub

----------------------------------
Form unload
close the rst and cnn code

--
Notice: Spelling mistrakes left in for people who
need to correct others to make their life fulfilled.



Thu, 22 Apr 2004 07:23:27 GMT  
 HELP, TTX file and using a ADO Rs
Add the following --

CRViewer1.ReportSource = crxRpt

before the line --

CRViewer1.ViewReport

Jay

Quote:
>-----Original Message-----
>Ive been to the KB, the forums and the what they call a
help files.
>I still cant get this damn thing to work,

>really stimple access97 database ..  one table, one field.

>What the hell is the TTX file supposed to look like ..

>this is what mine says.
>Serials.TTX
>SerialNumbers String 50

>my report says its using the serials.ttx from what i can
tell and
>i have the SerialNumbers field showing in the report.

>My code ......
>-------------------------------------------------------
>Viewer Form
>Option Explicit
>Private Sub Form_Load()
>Dim cnn As New ADODB.Connection
>Dim rst As New ADODB.Recordset
>Dim SQL As String
>Dim fld As ADODB.Field

>Screen.MousePointer = vbHourglass

>SQL = "SELECT Products.SerialNumbers FROM Products WHERE
>(((Products.SerialNumbers) Like ""5%""));"

>cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>      "Data Source=.\SerialNumbers.mdb;"

>rst.Open SQL, cnn, adOpenKeyset, adLockOptimistic

>Dim crxApp As New CRAXDRT.Application
>Dim crxRpt As CRAXDRT.Report

>'REPORT3 was created with a TTX file
>Set crxRpt = crxApp.OpenReport(App.Path

& "\serialnumbersreport3.rpt")

- Show quoted text -

Quote:
>CRViewer1.ReportSource = crxRpt

>' just a check to make sure im getting data in the Rst
and yes there is.
>Do Until rst.EOF
>  Debug.Print rst.Fields("SerialNumbers").Value
>  rst.MoveNext
>Loop

>crxRpt.Database.Tables(1).SetDataSource rst, 3

>CRViewer1.ViewReport

>Screen.MousePointer = vbDefault

>End Sub

>----------------------------------
>Form unload
>close the rst and cnn code

>--
>Notice: Spelling mistrakes left in for people who
>need to correct others to make their life fulfilled.

>.



Sun, 25 Apr 2004 00:48:02 GMT  
 HELP, TTX file and using a ADO Rs
If u look it is before that line


Quote:
> Add the following --

> CRViewer1.ReportSource = crxRpt

> before the line --

> CRViewer1.ViewReport

> Jay

> >-----Original Message-----
> >Ive been to the KB, the forums and the what they call a
> help files.
> >I still cant get this damn thing to work,

> >really stimple access97 database ..  one table, one field.

> >What the hell is the TTX file supposed to look like ..

> >this is what mine says.
> >Serials.TTX
> >SerialNumbers String 50

> >my report says its using the serials.ttx from what i can
> tell and
> >i have the SerialNumbers field showing in the report.

> >My code ......
> >-------------------------------------------------------
> >Viewer Form
> >Option Explicit
> >Private Sub Form_Load()
> >Dim cnn As New ADODB.Connection
> >Dim rst As New ADODB.Recordset
> >Dim SQL As String
> >Dim fld As ADODB.Field

> >Screen.MousePointer = vbHourglass

> >SQL = "SELECT Products.SerialNumbers FROM Products WHERE
> >(((Products.SerialNumbers) Like ""5%""));"

> >cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> >      "Data Source=.\SerialNumbers.mdb;"

> >rst.Open SQL, cnn, adOpenKeyset, adLockOptimistic

> >Dim crxApp As New CRAXDRT.Application
> >Dim crxRpt As CRAXDRT.Report

> >'REPORT3 was created with a TTX file
> >Set crxRpt = crxApp.OpenReport(App.Path
> & "\serialnumbersreport3.rpt")
> >CRViewer1.ReportSource = crxRpt

> >' just a check to make sure im getting data in the Rst
> and yes there is.
> >Do Until rst.EOF
> >  Debug.Print rst.Fields("SerialNumbers").Value
> >  rst.MoveNext
> >Loop

> >crxRpt.Database.Tables(1).SetDataSource rst, 3

> >CRViewer1.ViewReport

> >Screen.MousePointer = vbDefault

> >End Sub

> >----------------------------------
> >Form unload
> >close the rst and cnn code

> >--
> >Notice: Spelling mistrakes left in for people who
> >need to correct others to make their life fulfilled.

> >.



Mon, 26 Apr 2004 11:29:56 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need help displaying a rs in a listbox using ado

2. Crystal sub-reports problem using TTX file and data tables

3. Using TTX files in a vb project...Question

4. Saving data with report (using ttx files)

5. Help! TTX File - Physical Database Not Found - CR8

6. HowTo export ADO/RS to Excel File?

7. How to convert ADO RS to MDB file

8. ADO RS help request

9. HELP: UpdateBatch on rs with identity column Fails (ADO 2.5)

10. Help! Open Excel file using ADO

11. ADO Help Files and reports using DAO

12. Help, error in file links when using ado

 

 
Powered by phpBB® Forum Software