what am i trying:
I have a databand A which runs through IDs and another databand B which has databand A as a main component and i want Databand Bs Query to be dynamically changed according to the ID in Databand A.
Example:
I have 3 Departments with 10 different people attached to them and the report should look like this:
Code: Select all
Department A
Person of Department A 1
...
Person of Department A 10
Department B
Person of Department B 1
...
Person of Department B 10
Department C
Person of Department C 1
...
Person of Department C 10
I have successfully created a variable "DepartmentKey" that changes to the ID of the current department in the Before Print Event of the Person-Databand. And the query of person objects looks like this SELECT Name FROM Person WHERE Department = @DepartmentKey
But the person Databand does not update its data and prints the same list of person objects per department, it looks like the query is evaluated with the start parameter once and then printed per department
Is there a way to make this happen with different components or am i overlooking something?
Note: This case is a simplifaction of my original problem, so changing the report to a single databand with a single query and running a group component for the departments will not work due to the database structure i am working with