4
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by romel.bunag
0

What kind of report?
What database, access, sql, Mysql?
What code and what data?

You need to give us more information if you want a solution.:)

0

How create a Report in VB6.0.
pls send me detail as early as possible.

Private Sub PrintPreviewMainWarehouse()
Dim RS As New Recordset
Dim strPass As String

If cmbCategory.Text = "Select All..." Then
strPass = "SELECT tbl_products.product_code, tbl_products.description, tbl_products.pieces_qty, tbl_products.net_amount, tbl_products.vat_amount, tbl_products.gross_amount" & _
" From tbl_products" & _
" GROUP BY tbl_products.product_code, tbl_products.description, tbl_products.pieces_qty, tbl_products.net_amount, tbl_products.vat_amount, tbl_products.gross_amount;"
RS.Open strPass, CN, adOpenStatic, adLockOptimistic
Set MainWarehouse.DataSource = RS
MainWarehouse.Show vbModal
Set RS = Nothing
Else
strPass = "SELECT tbl_products.product_code, tbl_products.description, tbl_products.pieces_qty, tbl_products.net_amount, tbl_products.vat_amount, tbl_products.gross_amount" & _
" From tbl_products" & _
" Where (((tbl_products.category_id) = '" & cmbCategory.Text & "'))" & _
" GROUP BY tbl_products.product_code, tbl_products.description, tbl_products.pieces_qty, tbl_products.net_amount, tbl_products.vat_amount, tbl_products.gross_amount;"
RS.Open strPass, CN, adOpenStatic, adLockOptimistic
Set MainWarehouse.DataSource = RS
MainWarehouse.Show vbModal
Set RS = Nothing
End If
End Sub

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.