UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> spacing of subreports    
 
   
krc777
post Jan 27 2006, 11:52 AM
Post #1

UtterAccess Veteran
Posts: 453
From: Lansing, MI. USA



Hello-
I have a report that contains 4 subreports. I have written code behind to not display titles for the subreports meeting certain criteria. My question is how to move the subreports from below those not displayed up to the top. In other words if the top two subreports are not being displayed I want to move the 3rd and 4th subreport up so there isn't a large space when the report prints.
Thanks,
k
Go to the top of the page
 
+
fredrisg
post Jan 27 2006, 02:29 PM
Post #2

UtterAccess VIP
Posts: 1,795
From: LA, CA, USA



When I put my subrpts into the main, they are just 'really thin' . . . less then the height of these letters.

The subrpt print, they will expand . . .

Thus, if you stack the 4 subs close together and the first two don't print, the report reader won't know the difference.

Steve
Go to the top of the page
 
+
krc777
post Jan 27 2006, 02:45 PM
Post #3

UtterAccess Veteran
Posts: 453
From: Lansing, MI. USA



I thought that was a very good idea and tried it but the problem is that when the data in the subreports does display there need to be spaces between the subs. This causes a problem with just the bottom two subreports contain data.
But thanks for the suggestion. It was worth a try.
k
Go to the top of the page
 
+
krc777
post Jan 27 2006, 03:58 PM
Post #4

UtterAccess Veteran
Posts: 453
From: Lansing, MI. USA



Still working on this problem, I have placed 3 of the subreports in their own subreport. Can I code behind a subreport to have it not activate when certain conditions are met?
k
Go to the top of the page
 
+
fredrisg
post Jan 27 2006, 04:47 PM
Post #5

UtterAccess VIP
Posts: 1,795
From: LA, CA, USA



Yes, you can . . . try the OnOpen of the report or even OnFormat in the detail sections.

I have a report that includes two subs . . .one for Approved projects and another for Pending.

I do some math on the main report that requires that if no approved projects exit, I have to write a 0 into a box (since the sub doesn't exist with no records) so the calc in the pending sub doesn't get an error for a null.

As far as the primary issue, there's no doubt that some object VBA code might be able to move the subs around but I haven't done that . . . but have seen some code here that does.

Maybe try some searches . . .

Steve
Go to the top of the page
 
+
krc777
post Jan 30 2006, 11:17 AM
Post #6

UtterAccess Veteran
Posts: 453
From: Lansing, MI. USA



Sounds good. Care to share your code for how to 'deactivate' the subreport if no data exists?
Thanks.
Go to the top of the page
 
+
krc777
post Jan 30 2006, 11:41 AM
Post #7

UtterAccess Veteran
Posts: 453
From: Lansing, MI. USA



Or is there a way in the properties or code behind to turn 'visable' to no. If I was able to turn the subreport's visible property to no I would be all set.
k
Go to the top of the page
 
+
fredrisg
post Jan 30 2006, 02:43 PM
Post #8

UtterAccess VIP
Posts: 1,795
From: LA, CA, USA



If a subrpt has no records . . .it doesn't print . . .thus I don't think you'd need to set it to invisible.

If you have conditions, I haven't tried that yet . . . but in the On Open or On Format, since a subrpt does have a visible property, you could test using VBA code and make it invisible.

Steve
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 01:44 PM