• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1940
  • Last Modified:

Crystal Reports 10 problem: Multiple Column formatting issue

Hi,

I have a sub-report that contains details with 'Format with Multiple Columns' and 'Across then Down' printing option enabled. My problem is when it prints if a column detail has more information than it could fit in the current page towards the end of the page. A page break happens and the remaining column detail is offset to the beginning of next page.

for example:
 col1      col2      col3
 X            X        X
 X            X        X

If the data in row 2 and col 2 couldn't be fit into the current page this is what I see

page1
 col1      col2      col3
 X            X        X
 X          

 page2
 col1      col2      col3
 X            X

this data presentation is not correct as printing should have started from col2 in second page.

can anyone suggest how can I stop this from happening.

-Thanks
0
hs_19redgate
Asked:
hs_19redgate
  • 4
  • 3
  • 2
1 Solution
 
frodomanCommented:
To the best of my knowledge Crystal is always going to start a new page in column 1 and I don't believe there is any way to change that.

The only possible solution I can think of is if you have some way to determine in advance if the data will fit on a page and force a page break earlier.  Do you, for example, have groups on the report so you could consider a page break before each group starts?
0
 
hs_19redgateAuthor Commented:
I have only one group in my sub-report with details section, but this sub-report is part of a group in my main report.
0
 
frodomanCommented:
I assume that some of these records are multi-line and that's where the running out of space becomes an issue?
0
Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

 
hs_19redgateAuthor Commented:
That's exactly whats happening :)
0
 
frodomanCommented:
Yuck!  Well, the only solution I can think of is a huge mess.  Basically you would need to figure out how many rows of data you can fit on a page.  Then you'll need to create a shared variable and use it to count the number of rows rendered and force a page break when you're getting close to the end of a page (when you get close enough that the largest record won't fit).  You can't control it precisely because you need to do the page break before column1 is rendered but at that point you won't have access to the column3 data (because you can only use 'Next' to look ahead one record).

Biggest problem is that Crystal won't tell you how many rows are printed, you'll need to figure out how many characters fit on a line and calculate based on the size of the field how many rows it'll take.  You will absolutely need to use a fixed-width font to make this possible.

This isn't a solution I particularly recommend.  It is technically possible to do but it really is a big mess so unless it's absolutely essential I wouldn't go through the effort...
0
 
hs_19redgateAuthor Commented:
how do i force a page break from inside the details section? I tried inserting a detail section with new page after and all I got out of it was a bigger mess(it started printing only one record on a page)
0
 
frodomanCommented:
On the new detail section you need to make the page break after conditional based on what you calculate with your variables.  Use the formula button (X+2) next to page break and write a formula based on the variable such as:

  if MyTotalLineCount > 60 then true else false

0
 
RodgerSystems AnalystCommented:
I am sorry but I am new to the Crystal way of coding.  Where do I find the variable MyTotalLineCount.  I am not sure this is going to work as this will create a new page so my graph will still be on a seperate page.

I had another thought, that if I add some sorting to my Temp table.  If I evaluate the number of rows per event and I have 10 records I then update a field to A1, B1, C1, D1, E1, A2, B2, C2, D2, E2 So now each row could be sorted and if I print it across and down then I will get . . .

A1                 A2
B1                 B2
C1                 C2
D1                 D2
E1                 E2

I think this will do it.  I'll let you know, uless you can think of another option.
0
 
RodgerSystems AnalystCommented:
Please ignore my post above.  I thought I was reading a reply to my question I had posted.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now