General information
Category:
Coding, syntax & commands
Title:
DataReport and DataEnvironment
Hi!
I'm using a Data Environment and a Data Report in a program. I want to change the SQL String and the database name because the name of the databse will change if I'm in Demo mode or in Real Mode... Can I do that?? I haved try :
dataEnv.connGis3000.Open(puDatabaseName)
dataEnv.connGis3000.DefaultDatabase = puDatabaseName
I want to change the original query too to add " Where =......"
For this I haved try
dataEnv.rscmdName.Source = SqlQuery$
But does not show that it's working..... Let me show you the part of the code I use to call my report Where dataEnvSoumission1is my dataEnvironmen name, rscmdSoumissions is my parent command, connGis3000 is my connection name and dataReportSoumission1is my dataReport sheet name..
dataEnvSoumission1.connGis3000.Open (puNomFichierClientMDB$)
dataEnvSoumission1.rscmdSoumissions.Source = "Select * From Soumissions Inner Join Client On Client.Id=Soumissions.Numero_client Where Soumissions.Numero_soumission=" & Int(Trim$(lblNumero_soumission.Caption))
If dataEnvSoumission1.rscmdSoumissions.State = 0 Then
dataEnvSoumission1.rscmdSoumissions.Open
End If
dataEnvSoumission1.rscmdSoumissions.Requery
dataReportSoumission1.Show 1
dataEnvSoumission1.rscmdSoumissions.Close
dataEnvSoumission1.connGis3000.Close
Thanx!!!!!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only