Grouping in Detail Data Band
I am new to FastReport and slowly finding my way around. I want to do something which in my mind ought to be simple and group part of the data on my report by a field ClaimType but am having difficulties.
My Structure looks like this;
Data: Practitioner
Data: Practitioner.Claims
Data: Practitioner.Claims.ClaimDetails
Footer
Footer
And it is the ClaimDetails entry which I want to group so that I can have a sub total for each ClaimType. However, if I add a group and select Practitioner.Claims.ClaimDetails.ClaimType as my field, it insists on being at the master data level and nothing I seem to do can change that.
Any ideas what I am doing wrong or is there another way to approach it that might work?
Hope that makes sense but if you need more info to understand the problem, let me know.
Cheers
sy
My Structure looks like this;
Data: Practitioner
Data: Practitioner.Claims
Data: Practitioner.Claims.ClaimDetails
Footer
Footer
And it is the ClaimDetails entry which I want to group so that I can have a sub total for each ClaimType. However, if I add a group and select Practitioner.Claims.ClaimDetails.ClaimType as my field, it insists on being at the master data level and nothing I seem to do can change that.
Any ideas what I am doing wrong or is there another way to approach it that might work?
Hope that makes sense but if you need more info to understand the problem, let me know.
Cheers
sy
Comments
1. first databand, a query to join Practitioner and Claim, say 'A'
2. second databand, a query to join ClaimDetails and ClaimType, say 'B'
design an interactive report, look at demo from fastreport. Report with subreports.
report A is related to report B, if user click report A, it will open report B, based on ClaimDetails.Lookup = Claim.ID
from your question :
"And it is the ClaimDetails entry which I want to group so that I can have a sub total for each ClaimType"
Solve it with a query in report A :
select ..., COUNT(ClaimDetails.ClaimType) as Total
from Practitioner inner join Claim inner join ClaimDetails on .....
group by ...