makspetar Newbie
Joined: 17 Feb 2005 Posts: 1
|
Posted: Feb 17th, 2005 07:36 AM Post subject: Help, Help, Help !!!!!!!! |
|
|
Please, help me !!!!!!!!!!!!!!
I want to make application which have 3 tables (COUNTRY, CITY, FACTORY). Tables is created on Oracle database. Forms for input data is created on VB(6.0). I want to create report(Data Report) which show data from this table, but I want to choose country, city or factory. When country is choose, then report show that country, same is for city and factory. Because that I think to use parameter list. I know to created report which show date from all tables and report which show data with parameter query, but it is not enough. I want to amplify existent Command ( DataEnvironment.Command2-Command3-Command4 interrelation as parent and child) which show all data from tables.
Code:
Dim strS As String
Private Sub cmdRunReport_Click()
If DataEnvironment1.rsCommand2.State = adStateOpen Then
DataEnvironment1.rsCommand2.Close
End If
If txtCountry.Text = "" Then
DataEnvironment1.Command2
rptProba.Show
Else
strS = "SHAPE {SELECT code, name FROM country"
strS = strS & " where name = ?}"
strS = strS & " AS Command2 "
strS = strS & "APPEND (( SHAPE {SELECT code_country, code_city, name FROM city}"
strS = strS & "AS Command3 "
strS = strS & "APPEND ({SELECT code_c, name, telefon FROM PR.factory}"
strS = strS & "AS Command4 RELATE 'code_city' TO 'code_c') AS Command4)"
strS = strS & "AS Command3 RELATE 'code' TO 'code_country') AS Command3"
DataEnvironment1.Commands!Command2.CommandText = strS
DataEnvironment1.Commands!Command2(0) = txtCountry.Text
DataEnvironment1.Command2
rptProba.Show
End If
End Sub
How I to add parameter for city and factory, and how I to execute then Command??????????????  |
|