Bertie
Oct 25th, 1999, 03:46 PM
I am trying to create a report using vb6's new in-built reporting tool.
Crystal would have been preferred but I am restricted to VB reporting.
I have 3 queries calculated in code in order to extract data based on a supplied list of names.
These 3 SQL queries have to assigned to the SQL statement text box for each of 3 commands in the data environment. The 3 commands are necessary to obtain the grouping of the data required.
The 3 commands in tha data environment need to be set as command 1 as parent of command 2 and command 2 as parent of command 3 in order for the fields to be selected for adding to the report and for the grouping on the report to reflect the structure of the commands.
When writing the 3 SQL queries back to the data environment commands, using :
DataEnv.Commands("cmd1").CommandText = query1
DataEnv.Commands("cmd2").CommandText = query2
DataEnv.Commands("cmd3").CommandText = query3
works fine for the parent but not for the subsequent child and grandchild.
My question is :
How do I reference the text box of the child commands in order to write my SQL queries to them?
Crystal would have been preferred but I am restricted to VB reporting.
I have 3 queries calculated in code in order to extract data based on a supplied list of names.
These 3 SQL queries have to assigned to the SQL statement text box for each of 3 commands in the data environment. The 3 commands are necessary to obtain the grouping of the data required.
The 3 commands in tha data environment need to be set as command 1 as parent of command 2 and command 2 as parent of command 3 in order for the fields to be selected for adding to the report and for the grouping on the report to reflect the structure of the commands.
When writing the 3 SQL queries back to the data environment commands, using :
DataEnv.Commands("cmd1").CommandText = query1
DataEnv.Commands("cmd2").CommandText = query2
DataEnv.Commands("cmd3").CommandText = query3
works fine for the parent but not for the subsequent child and grandchild.
My question is :
How do I reference the text box of the child commands in order to write my SQL queries to them?