Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Report XI - Mulitple Columns Grouping Post Reply Post New Topic
Author Message
Sbvkk
Newbie
Newbie
Avatar

Joined: 14 Jul 2009
Online Status: Offline
Posts: 3
Quote Sbvkk Replybullet Topic: Crystal Report XI - Mulitple Columns Grouping
     Posted: 14 Jul 2009 at 5:03am
Hi,
I created a report in crystal report XI having the following structure:


Main Report Structure
  • Page Header (Report Title, Date and displayed Columns Title)
  • Group Header (Group header will be displayed)
  • Details - a (Records List will be populated)
  • Group Footer (Sub Report which displays the Notes in tabular format)
  • Page Footer (Page number will be displayed)
I kept 'keep together' for 'Group Footer' section.
Sub Report Structure
  • Group Header (No contents will be displayed here)
  • Details - a (Header)
  • Details - b (Content)
  • Group Footer (blank section)
In the sub report, the Details section was set for multi columns with across and then down property. The Details section width was set such that at max 3 columns will fit. Also 'keep together' property was set for the details sections so that both header and its content will always stay together. (Assume that the subreport data will be displayed like rows of data with each row having 3 cells.)
Both main and sub reports picks the required data from database stored procedure.

My Porblem
As 'Group Footer' section in main report was kept 'keep together' some times more empty space was leaving at the bottom of the pages in the main report.

So i tried to remove 'keep together' option for 'Group Footer' section in the main report. By doing this the empty space was now reducing by splitting the subreport rows in multiple pages.

So far fine but the problem arises when the first row second cell or first row third cell data is large enough so that it can't fit at the bottom of the page in the available space. So because of this, the cells in a row are splitting between the pages.


Either i want to display the entire row with all the 3 cells at a time or blank in the pages' availble space for 'Group Footer' section in main report.
(I don't want to display splitted rows. I want entire row with all the 3 cells to be dispalyed at once.)

Can any one suggest me how can i fix this?
I hope i clearly presented my problem. If not, let me know where you want more clear.

Thanks in advance.


IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Jul 2009 at 6:17am

Sorry to say, what you are looking to do is going to be exceeding hard, since Crystal doesn't give any tools to find if a row has been split. If what is meant by split is really just that there are multiple rows of data, then you might have a chance.

the only solution is to count lines or heights that have been been printed and then conditional turn the 'Keep Together' on or off in the Section Expert.  If you are not using the Section Expert current for the Keep Together option, then you won't be able to this at all.  You might want to try instead using 'New Page Before' from Secton Expert.

As to counting, use a shared variable the you update in both the main and the subreport, you need to know where you are on the page. Reset it every page, and check it before the footer.
 
There have been several posts that I have answered regarding this very issue.
 
Good luck, it is not going to be easy...especially when the subreport has 3 rows being 1.
IP IP Logged
Sbvkk
Newbie
Newbie
Avatar

Joined: 14 Jul 2009
Online Status: Offline
Posts: 3
Quote Sbvkk Replybullet Posted: 14 Jul 2009 at 6:28am
Hi lockwelle,

Thanks for replying.

In my report there are different fonts sizes in the page. Also the amount of data per cell in the sub report row will also varies and it too contains more than one font size.

So for this type of report, does your suggestion works?

It will be great if can send few links regarding counting the lines with shared variable.



Edited by Sbvkk - 14 Jul 2009 at 6:28am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Jul 2009 at 7:07am
the more variable the length is, if can grow is on or not tend to make this hard.
 
what you are looking to do, it to keep track of where the report is on the page.  I would create a shared variable and set it to the height of the page header, in the page header.
 
Then for EVERY section that is printed, increment the shared variable by the height of the section.  If the section Can Grow because a field inside Can Grow, then you will need to determine how big the section is.  I don't know about font sizes/styles, character length, and Crystal won't tell you, at least no one has reported how to do that. So you are left to determine how big a section is.
 
Finally, in the section that you want to modify, you will need to compare where you are on the page, and if it too low or too high to respond correctly.  I realize that this isn't too detailed, but shared variables are easy to use, it is implementing the concept that is difficult in this case.
 
I don't have links or lines of code.  I make them up as I go.  You might try looking for previous posts that reference page breaks, that is what people are usually looking to do.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum