Question

I want to set the height of group section in crystal report. I want to set the group section such that it must at the most accommodate 10 records in the section.

If I have only 2 records in the section, it should show 8 empty lines. If I have more than 10 records in the section, the remaining records will be placed on the next page.

After that, the footer will be printed at the end of it.

Is this possible as i didnt get any solution even after lot of searching

Was it helpful?

Solution

Its a typical requirement but will try to provide solution. There is no need to increase the size of the group section just Try Below given way.

1. Insert 11 group sections.
2. Place the data field in 1st group section. 
3. In the remaining 10 group sections place a line and write the supress condition for individual group section on the number of records retrived. For e.g if 5 records are retrived then 5 group sections with lines should get displayed and remaining sections with lines should get supressed, If 10 records are retrived then all 10 sections should get supressed.

Note: This is not a tested code.

OTHER TIPS

I have seen requests like this before and they never quite work out due the way CR is structured. To limit your group to only show 10 records, you go into the Section Expert and under the paging tab you can check "New Page after 10 visible Records". As far as the blank lines go, you could try and create a formula that will insert blank lines if the total of lines is less than 10, or you could try to display the records using a subreport that you format accordingly.

What you need to do instead of suppressing the band is to suppress the fields instead.. That way the band height remains even if the fields dont print

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top