[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
Re: Data report with mysql
Welcome On the forums. :wave:
Data report has a fixed width, and when you make the data report larger then the 6.0 width then this type of error occur.
So I suggest you to that check the width of the data report and decrease the width of the data report and run the report.
Re: Data report with mysql
Thx for welcoming me :)
I do as you told and it work's fine now, thx for replying.
Re: Data report with mysql
Quote:
Originally Posted by madymoon
Thx for welcoming me :)
I do as you told and it work's fine now, thx for replying.
Your Welcome :thumb:
If You Got the solution Of your Problem The click on the thrad tool menu and Mark Thread as Resloved , so People Know That it is Resloved.