Quote:
Originally Posted by Ali Rizwan
Hi all,
How can i add or delete some columns from datareport at runtime.
How can i refresh datareport at runtime.
How can i format fields at runtime
How can i cjange the datastring or database at runtime.
Using XP
Using VB6
Using Data Environment
Using Data Report not Crystal Reports.
Thanx
Let's try it one at a time, if you do not mind, Ali...
I think this will handle refreshing the data:
-
-
Private Sub Form_Load()
-
Set conn = New ADODB.Connection
-
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
-
"Data Source=" & App.Path & "\YourDB.mdb;" & _
-
"Persist Security Info=False"
-
End Sub
-
-
Private Sub cmdLoad_Click()
-
Set rs = conn.Execute("SELECT Field1, Field2, Field3 " & _
-
"Field4 FROM ThisTable ORDER BY Field1")
-
-
Set rptTitles.DataSource = rs
-
rptTitles.Show vbModal
-
End Sub
-
-
Private Sub Form_Unload(Cancel As Integer)
-
conn.Close
-
End Sub
-
-
Tell us how that works then we'll tackle the rest. How's that for a deal?
Dököll