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

Comments

  • edited December 2016
    you need 2 databands :
    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 ...

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.