cancel
Showing results for 
Search instead for 
Did you mean: 

Spaces in a subreport after the Report Header and before the Detail

Former Member
0 Kudos

I have a report with several subreports. The subreports are straightforward, consisting of a Report Header a Details a with Data fields and a Details b with a line.

When I preview the report I see a lot of white space before I see the data. I've checked for page breaks between the Report Header and the Details a and can't find any.

Any idea what might be causing all this white space?

Happens in both Crystal XI and Crystal 2011.

Thanks,

Dick

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Richard,

Suppress any sections in the Subreport you don't need.

Then, right click each Subreport > Format Subreport > Common tab > uncheck the 'Keep Object Together' option.

-Abhilash

Former Member
0 Kudos

Sorry, that doesn't seem to help.

If I Edit the Subreport, then Preview the Subreport, I see the white space. So I think it's withing the Subreport, but I can't figure out where. Possibly a Page Break between the Report Header and the Detail a of the subreport but that is a guess.

Dick

abhilash_kumar
Active Contributor
0 Kudos

I can't say for sure without looking at the report. Would you be able to send it to me with data if that's possible?

-Abhilash

Former Member
0 Kudos

What's the best way to do this, "Save Data with Report"?

Former Member
0 Kudos

I have some more information.The column that is causing the extra white space to appear is varchar(max). If the user just enters a moderate amount of data it doesn't cause extra white space. But the contents of this column can be very large. At some point (say 1000 words or so) the white space appears.

Does this help?

Dick

abhilash_kumar
Active Contributor
0 Kudos

To attach the report, first save it with data (File > Check Save Data with Report).

Then, changes the report's extension from .rpt to .txt and click the 'use advanced editor' option in the reply window here.

-Abhilash

Former Member
0 Kudos

Abhilash Kumar wrote:

To attach the report, first save it with data (File > Check Save Data with Report).

Then, changes the report's extension from .rpt to .txt and click the 'use advanced editor' option in the reply window here.

-Abhilash

HI,

I hope this does it.

Dick

former_member292966
Active Contributor
0 Kudos

Hi Richard,

The report doesn't have the data saved in it.  You have to preview the report then save it with the Save Data with Report flag turned on in the File menu.

I had a look at the report though.  Which fields are the varchar(max)?  Are you referring to the ones in the Main Report's Detail section on in the subreports?

I noticed the subreports have the Details section set to conditionally suppress if the field is NULL.  They may not be suppressing because they may contain spaces instead of NULL.  You can change the report to something like:

isnull({SUBFORMS.MEMO005}) or {SUBFORMS.MEMO005} = "";

In the Main report, you can also try right-clicking the subreport, select Format Subreport and in the Subreports tab turn on Suppress Blank Subreport.

Good luck,

Brian

Former Member
0 Kudos

Hi,

If there is not data for a particular section then the ISNULL() works fine. The problem is when there IS NULL for a section  and a column called MEM005 which is varchar(max) is displaying that we get the extra spaces. The subreport is only displaying 1 row when there is data. It is the MEMO005 (varchar(max)) that is causing the extra white space when there is enough real text.

I hope I have given you the data with this report.

Thanks,

Dick

Former Member
0 Kudos

I meant "The problem is when there IS data for a section", not

"The problem is when there IS NULL "

former_member292966
Active Contributor
0 Kudos

Hi Richard,

I see what's happening.  The subreport are larger than 1 page so it pushes the subreport to the next page.  And because the memo field inside the subreport is longer than the page, it pushes it to start on the next page as well.  So now you have a 1 1/2 blank pages before you see your subreport.

Subreports are handled as OLE objects.  Same as in Word, when you insert a picture and if it doesn't fit on the current page, it pushes it to a new page.  Keep together doesn't work in this situation.

I've never been able to work around this aside from trying to limit the size of an object.

I'm hoping someone else has suggestions.

Sorry,

Brian

abhilash_kumar
Active Contributor
0 Kudos

Hi Richard,

Find attached the updated report. I hope this is what you were looking for.

@Brian: The Memo fields also have the 'Keep Object Together' property. If you uncheck that you shouldn't see a page break.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

This is exactly what I am looking for. Thanks.

What did you do that i didn't? Uncheck the "Keep Object Together" checkbox or more?

Dick

abhilash_kumar
Active Contributor
0 Kudos

I unchecked that option on all the Memo fields in the Subreports.

-Abhilash

Answers (0)