I have a question regarding parameters to child commands in the
DataEnvironment. I will try to explain the problem with a simple
The relation is ID = ID ofcourse.
I would like to use the same report to show:
1) PetOwner and his/hers pets with an age < 2 (Or with an age <
2) PetOwner and his/hers pets with name = 'Peter'
3) PetOwner and his/hers pets with Gender = male
1) Is it possible to have some variables/parameters for this or do I
have to do three different reports?
(This wont solve the problem with the parameter in report #1)
I know how to use parameters in the 'parent' command. My problem is
that I would like to pass the parameters to the child command.
In this way I would be able to use the same commands & report to
make different reports depending on the parameters.
The obvious solution is to make more commands and reports. (They
will be almost identical. But I will not be able to make 'dynamic'
querys like I want.) This is something that I would like to avoid.
2) I could manage to do what I want if I could change the CommandText
of the child command. (CommandText~=SQL command)
I know how to set the CommandText of the 'parent', but I cannot do
it for the child command.
This is how I do it for the 'parent' command:
DataEnv.Commands("cmdPetOwner").CommandText = "SELECT * FROM
Is there anyone that knows how to find and change the child
CommandText and parent relations?
3) I could add a new table that contains the parameters.
I would have to insert the parameters into this new table prior to
running the command/report.
The command would have to look at this table to get the parameters.
I would like to avoid this if it's possible.
Is there anyone that has had the same problem? And maybe a/the