cancel
Showing results for 
Search instead for 
Did you mean: 

Subreport Grouping

Former Member
0 Kudos

A subreport I am writing has a heading and column titles in group 1 header. It is grouping on a function @ShowPH, which is defined this way.

WhileReadingRecords;

" "

I got the idea here (http://www.c-sharpcorner.com/UploadFile/mahesh/SubReportPH10062006160749PM/SubReportPH.aspx).

The purpose of having the header setup that way was so that it could repeat at the top of each page. However, the Group 1 header will occasionally print alone at the bottom of the page and then repeat at the top of the next page with more data. The subreport grouping has keep together checked. In the main report, the section containing the subreport also has keep together checked.

How do I prevent it from printing alone at the bottom of the page? Any ideas appreciated.

Thanks,

Sally

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Sally,

Go to the Group Expert > Select the @ShowPH formula in the Group List > Options > Options tab > Check 'Keep Group Together'.

That should do the trick.

-Abhilash

Former Member
0 Kudos

This doesn't seem to be doing the trick.

This is the setting I have selected. I'm also using Crystal Reports 8.5 so everything is a little different than I'm accustomed to seeing it. I couldn't find the group expert, but I think this the setting  you indicated.

abhilash_kumar
Active Contributor
0 Kudos

Yes, that is the option I was referring to and the purpose of this option is to move the 'whole' group to a new page if doesn't have enough space on the page.

Could you also try unchecking the 'Keep Object Together' option for the Subreport (Right-click the Subreport > Format Subreport). I'm not too sure if this has anything to do with this but please do try.

-Abhilash

Former Member
0 Kudos

I appreciate all of the suggestions.

Unfortunately, unchecking "Keep Object Together" on the subreport didn't solve the issue either. Do you have more ideas about what might be happening?

abhilash_kumar
Active Contributor
0 Kudos

Could you run the Subreport alone and check if the Group Header prints at the bottom while the rest of its contents are on the next page?

So, to do that, get into the Subreport and refresh. If you have linked the Subreport with Main Report, then you will be prompted for a parameter value. Enter a valid value - a value that would otherwise be passed from the Main Report to the Subreport when running the whole report.

-Abhilash

Former Member
0 Kudos

It prints at the top of the page when the subreport is run alone. The main report contains many subreports. This particular subreport is near the end of the main report. When the subreports above it contain more records, the split is likely to occur. It seems to related to the position as well. Out of 40 records, it happens 7 times.

abhilash_kumar
Active Contributor
0 Kudos

Can't say much without looking at the report. Would you be able to attach the report with save data if that's possible? It's much easier to look at the report.

To attach the report change its extension from .rpt to .txt and click the 'Use advanced editor' link.

-Abhilash

Former Member
0 Kudos

I'm sorry, I can't. It would violate HIPPA. Thank you so much for your assistance in troubleshooting.

abhilash_kumar
Active Contributor
0 Kudos

Hi Sally,

Have you been able to resolve this? Still can't believe checking the 'Keep Group Together' option doesn't do what it's supposed to!

-Abhilash

Former Member
0 Kudos

Sadly, no. I have tried lots of different things with the keep together with no luck.  I'm taking some different options back to the client. I almost wonder if this was a bug with 8.5 that was resolved in later version.

abhilash_kumar
Active Contributor
0 Kudos

If this was indeed a bug then that's a huge bug!

Anyway, I hope someone can confirm this for us.

-Abhilash

JWiseman
Active Contributor
0 Kudos

hi Sally, if Abhilash can't fix this, then no one can. what you may wish to do to check to see if it is a bug and fixed in a later version is download a free trial version of crystal from here. unfortunately 8.5 is way past its support date so if it is a bug then nothing can be done about it for that version.

Former Member
0 Kudos

This whole group is amazing when it comes to solutions. That's why I decided it must be time to try something new.