[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 503
  • Last Modified:

Getting Columns to Wrap in a subreport

I'm trying to create a report that prints a deposit ticket for the bank.  I have 2 tables.  The first is a table containing all the totals (checks and cash) that are being deposited on the ticket.  The second is a listing of the ammount of each check being depositted.  So I created a report that puts the information from the first table on to the top portion of the deposit ticket, then I created a subreport to dsiplay the amount of each check at the bottom of the deposit ticket.

I set up the subreport to use 6 columns going down and then accross, and if I open up this subreport by itself it works fine, the check amounts wrap to the next column when they get to the bottom of the page.  However, when I open up the main report which contains the subreport in its detail section, the check amounts get the bottom of the page and then go onto the next page.  Does anyone know how I can fix this?

Thanks

Ben
0
valencehealth
Asked:
valencehealth
  • 3
  • 3
  • 2
  • +1
1 Solution
 
IT-SchubertzCommented:
Hi,

set the "CanGrow" property of the according fields to true.
Also set the "CanGrow" of the sections to true and check the "KeepTogether" property of the section

hth

Andy
0
 
valencehealthAuthor Commented:
Those are already all checked to true
0
 
thenelsonCommented:
Try moving the subreport to the header or footer.
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
valencehealthAuthor Commented:
I just tried that and that didn't work either.
0
 
thenelsonCommented:
I will post a notice in the "experts message question" to see if anyone else has an idea.
0
 
harfangCommented:
Hello,

For columns to work, the engine needs to know the page length, quite obviously. For subreports, it hence needs to know the size of the control. If you use "can grow", the virtual page length of the subreport is infinite. So you can only have columns in a subreport if the subreport control has a fixed length *without* the CanGrow property.

You might want to say "use the remaining available space, please", but I don't know of a way to specify that.

Cheers!
(°v°)
0
 
valencehealthAuthor Commented:
I took off the can grow and can shrink and made the size of it to be the bottom 2/3 of the page and its working fine now.  Now I assume that if the data fills up all 6 columns then the second page will only be using 2/3 of the page as well.  If there is an easy way of fixing this so that subsequent pages use the full page that would be great, if not this shouldn't be too big of a deal.
0
 
thenelsonCommented:
Change the size of the section in the on format event of the page header section.  Add a control with a contorl source of "=page".  Let's call it "txtPageNumber".  Then in the on format event of the page header section put:
Private Sub Header_Format(Cancel As Integer, FormatCount As Integer)
If txtPageNumber > 2 Then Detail.Height = some number in twips
End Sub

twips = 1440/inch
0
 
harfangCommented:
> Now I assume that if the data fills up all 6 columns then the second page will only be using 2/3 of the page as well.

Sorry, but that assumption is wrong. There will be no second page. The data that does not fit will simply not be shown.

If your top portion of the report is also columnar, I see no easy solution. If not, consider doing it the other way around: use the main report for the columnar output and rewrite the top portion of the first page as a subreport in the report header.

If both portions are columnar, I think you will have to generate the report in a text processor and not in Access, but that is of course much more complex.

Good luck!
(°v°)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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