Link to home
Start Free TrialLog in
Avatar of jana
janaFlag for United States of America

asked on

Filter a VB6 Data Report using DataEnvironment

I have a simple Data Report code using DataEnvironment:

     - I use ODBC to access the database (connections)
     - in the Command1, i have a select script
             "SELECT VendorTable .* FROM VendorTable"
     - in the child Command2, I have another select  
             "SELECT VendorTableTrans .* FROM VendorTableTrans"
     - in DataReport, I inserted Group/Header and pull the needed fields and sub-totals
     - in the Form, all I have is a command button with the following code:

             Private Sub Command1_Click()
               DataReport1.Orientation = rptOrientLandscape
               DataReport1.Show vbModal
             End Sub
     
This works fine and displays all vendors with their subtotal

I want is to include a field in the form and modified my command button to filter out the selected vendor and in my Command1_Click() subroutine, to filter the report
ASKER CERTIFIED SOLUTION
Avatar of Luhana
Luhana

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

will try

Thanx
Avatar of jana

ASKER

Sorry kind'a lost.

Can u give example?
Avatar of Luhana
Luhana

I am getting error

The extension of one or more files in the archive is not in the list of allowed extensions: DataProject Query Report from DE/DataEnvironment1.DCA

I this this is EE site bug that did not allow vb files even in zip.

I am writing code it is simple

'to show button
'Rest is only report design and property setting of command object in dataEnv.
 
Private Sub Command1_Click()
DataEnvironment1.Command1 Text1.Text
DataReport1.Show
Unload DataEnvironment1
End Sub

Open in new window

Avatar of jana

ASKER

Can u explain?
Avatar of jana

ASKER

(sorry for the delay)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

roncaduro@yahoo.com
Avatar of jana

ASKER

hi...i haven't receive any email...please advice
I will send u today :)
Avatar of jana

ASKER

Hello, please excuse not attending the questions, we've been out.  We'll followup shortly thank you
I am resending you code.

Avatar of jana

ASKER

Hi...sorry for the delay, but can u send it again?

Please excuse the inconvenience.

Thanx
I think you replied from ur ipad that u received code
Avatar of jana

ASKER

really....oooops!  ...oh, from my iPhone...thanx...let me view it...
again sent on roncaduro@yahoo.com
Avatar of jana

ASKER

OK
Avatar of jana

ASKER

fully understood.
Thank you