How to set the path for "uses" directive in report script
Hi all.
I have a report that contains a MasterData-band, a groupheader and a groupfooter, listing data fro an IBXQuery.
The grouping condition has to be calculated and can't be read directly from the Query. So I try this:
1. In the MasterDetail.OnBeforePrint I use code to store the grouping condition in a variable.
2. In the GroupHeader I set the variable as the condition.
The result is that I get grouping, but 1 record to late. The first record of next group ends up in the previous group.
I suppose the variable calculation happens to late for the grouping.
Using an expression in the Groupheader.condition is not an option in this case, due to the complex grouping condition.
Any hints anyone? Where can I put the calculation of my grouping-variable, so that it gets right for the group header?
Edit: Sorry about the wrong title for this post, (started as one post, ended as another...)
I have a report that contains a MasterData-band, a groupheader and a groupfooter, listing data fro an IBXQuery.
The grouping condition has to be calculated and can't be read directly from the Query. So I try this:
1. In the MasterDetail.OnBeforePrint I use code to store the grouping condition in a variable.
2. In the GroupHeader I set the variable as the condition.
The result is that I get grouping, but 1 record to late. The first record of next group ends up in the previous group.
I suppose the variable calculation happens to late for the grouping.
Using an expression in the Groupheader.condition is not an option in this case, due to the complex grouping condition.
Any hints anyone? Where can I put the calculation of my grouping-variable, so that it gets right for the group header?
Edit: Sorry about the wrong title for this post, (started as one post, ended as another...)
Comments
My querydata look like this:
Type Text
A Group text 1
B Detail text1
B Detail text2
B Detail text3
A Group text 2
B Detail text4
B Detail text5
A Group text 3
B Detail text6
B Detail text7
What I need is a new group starting each time the type is A.
So I put this in the detailband.OnBeforePrint:
if <MyQuery."Type"> = 'A' then
Set('MyGroupingVariable', <MyQuery."Text">);
and in the groupheader.Condition: <MyGroupingVariable>.
If I could set up my query with the grouping condition as a field the problem would be solved, but this is not that easy in this case.
I've posted som additional information about my data.