|
-
Nov 24th, 2006, 09:37 PM
#1
Thread Starter
New Member
[RESOLVED] Data report with mysql
I'm having problem displaying the report, everytime i run it an error pop up "Report width is larger than the paper width". Can someone show me a better way to display report using mysql.
Set conn = New ADODB.Connection
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=localhost;" _
& " DATABASE=test;" _
& "UID=root;PWD=; OPTION=3"
conn.Open
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Set VcdReport.DataSource = rs
rs.CursorLocation = adUseServer
rs.Open "SELECT * FROM vcd", conn, adOpenDynamic, adLockOptimistic, adCmdText
With VcdReport.Sections("Section1").Controls
.Item("txtVcdId").DataField = rs("VcdID").Name
.Item("txtTitle").DataField = rs("Title").Name
.Item("txtDirector").DataField = rs("Director").Name
.Item("txtGenre").DataField = rs("Genre").Name
.Item("txtPrice").DataField = rs("Price").Name
.Item("txtStatus").DataField = rs("Status").Name
.Item("txtRentCost").DataField = rs("RentCost").Name
End With
VcdReport.Show
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|