|
-
January 20th, 2000, 02:28 AM
#1
VB Data Report
I am facing following problems while working with data report(Visual Basic 6)
1. Please tell me how to pass sql to Command Object of dataenviroment at run time.
For example:
Name Age
==== ===
Pavan 12
Pallavi 10
Swati 6
Deepak 35
In case if I want Names where age is less than a number
2. Title for the Data Report
In case if I select all the records where age is less than 20
I want to give title to the report as
List of Names of age less than 20
Please help me.
-
January 20th, 2000, 02:50 AM
#2
Re: VB Data Report
I would do it like this way:
private Sub DataReport_Initialize()
'requery recordset
If deYourDataEnvironment.rsYourReturningRecordset.State = adStateOpen then
deYourDataEnvironment.rsYourReturningRecordset.Requery
End If
'display only the desired results
deYourDataEnvironment.rsYourReturningRecordset.Filter = " Age <= 20 "
End Sub
private Sub DataReport_QueryClose(Cancel as Integer, CloseMode as Integer)
While me.AsyncCount > 0
DoEvents
Wend
Unload me
End Sub
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
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
|