Search code examples
crystal-reportssubreport

crystal report subreport spread accross multiple details


for the first record in detal section I have sureport from other datasource. For example

------ -------------
worker1 working hours
worker2 working hours

but for the first worker I have subreport that has data for organization unit, number of workers, address, data for previuos period....

when I put subreport in detail it make first detail bigger, as big as subreport.

             ------- -------------
   subreport worker1 working hours
   subreport
             worker2 working hours
             worker3 working hours

Is there a way to spread that sub over all details, so they keep their height. Like this

             ------- -------------
   subreport worker1 working hours
   subreport worker2 working hours
             worker3 working hours

Please do not suggest rearanging report and data, that is not possible.


Solution

  • You should be able to achieve the result you want using Section Underlay. In a Header Section you can insert the Subreport. Then use Section Expert to enable Section Underlay by checking the checkbox for "Underlay Following Sections". This will allow all of the following sections to print over-top of the header section where Section Underlay is enabled. Place the worker data in your details section and you should be good to go.

    One thing to be aware of when using this feature though. If your subreport ends up being 3 inches in height, and all of the detail sections are less than 3 inches in height, then your footer sections could end up printing over-top of your subreport. Once an underlay has begun, it will print all sections over-top of that section until the full height of the section where Underlay was enabled has printed.