Not understanding 'can shrink' where gridlines are involved?

peskywinnets

Registered User.
Local time
Today, 16:00
Joined
Feb 4, 2014
Messages
578
I've a report footer where I want fields to disappear when there's no data...I have it working (shrinking) but only if my report data is not arranged/placed on design gridlines. Difficult to put into words, but take a look at a screenshot...

https://s16.postimg.org/3ninvu1bp/temp.jpg

the top 'group' of fields DO NOT shrink when there's no data (you can just about see that they are placed on faint gridlines in this section)

However the bottom group of fields DO shrink.

So what's the deal with p'acing report data onto grid lines?!! (as it goes, I need to use gridlines to get a subtotal 'line' & 'Total' line that moves with the shrinking fields)
 
Last edited:
don't think it is anything to do with gridlines, its to do with the fact you have labels in the top bit - see this link for a fuller explanation.
https://msdn.microsoft.com/en-us/library/office/ff835012.aspx
In particular, take note of

Sections shrink vertically across their entire width. For example, suppose a form has two text boxes side by side in a section, and each control has its CanShrink property set to Yes. If one text box contains one line of data and the other text box contains two lines of data, both text boxes will be two lines long because the section is sized across its entire width. To shrink the data independently, you can place two subform or subreport controls side by side, and set their CanShrink property to Yes.

and

Overlapping controls can't shrink
 
Thanks for the reply.

Actually, the jpg I posted has confused matters (it was just to show the gridlines). If I remove all labels on those rows, there's still no 'shrink' going on (yet the data below shrinks & it's the same report footer...so it looks to be something to do with the data when placed on a grid.

I'd like to start the grid arrangement from scratch & build up slowly (whereas I actually copied/pasted in those gridlines from another report!)....n00b admission - I don't know how to insert gridlines/rows into a report footer!!!

P.S. about your specific points, I'd previously watched this useful video where the same points were made ...https://www.youtube.com/watch?v=sJ6PXSDDs54
 
the grid arrangement is basically fixed, all you can do is define how may 'lines' per inch - see this link

https://www.youtube.com/watch?v=ajbk0pa_KcY

I've never experienced your issue, so do check that the fields are empty and don't contain non visible characters such as spaces.

Also try recreating them

The other options are to use conditional formatting to set borders and forecolours to white, or vba code to hide the controls if required
 
Thanks.

RE grids, rows & columns...the bit I've still not got to grips with in Access reports is how is it (in the jpg posted in my opening post) that some of the data is 'free form' wrt layout, whereas in the top group, they are aligned to rows & columns...what setting is it in access that makes the data column & row based vs being able to drop cells wherever I want? And how do I insert a row colum on a report that doesn't already have them (I've noticed that rows can be added in the Arrange view - but only if there are rows in existence already)
 
my guess is you used a wizard to create the report initially which included the top group.

In design view on the ribbon, click on the arrange tab. Select the controls and click on remove layout. If you don't want them anywhere, highlight all controls
 
Thanks ...that certainly removes them, but are you saying the only way to get them in the first place (because I actually need them... but want to start small with one row & build from there) is to use the report wizard?

In other words, there's no option to just 'insert a row' on a blank report?
 
I think (not 100%) that only bound controls shrink, and not labels, and unbound controls. Is this a possibility?

The green triangles in your VAT and Total Charge text boxes indicate they are not bound to the source query, so I would check those 2 out.
 
I don't understand what you mean - where do the rows come into it? If you mean a control, on the ribbon, design tab, click on the add existing fields tab and drag the required field to where you want it. Or for an unbound control, drag a textbox or other control to where you want it
 
I think (not 100%) that only bound controls shrink, and not labels, and unbound controls. Is this a possibility?

The green triangles in your VAT and Total Charge text boxes indicate they are not bound to the source query, so I would check those 2 out.

I'm aware of the limitation & have made sure all my boxes are bound (apologies for the confusion arising from the jpg...this was uploaded just to show the grid (row/column) structure of the data that won't shrink...but I confused everyone - sorry.
 
I don't understand what you mean - where do the rows come into it? If you mean a control, on the ribbon, design tab, click on the add existing fields tab and drag the required field to where you want it. Or for an unbound control, drag a textbox or other control to where you want it

Please note that I'm still very much finding my feet with respect to reports. But coming back to to what I'm trying to get at. Looking back at my original jpg....the top group of data has a row & column structure (you can just make out the faint gridlines behid)....as you say probably created from a wizard (I can't seem to replicate that type of structure from the Access menu options?). The lower group of data (which does shrink) is free form ...not constrained to being on a column/row format. But here's the thing...I need it on a grid because only then I can press the 'grid format' lines into play in the propoerties (& create a 'subtotal' line & 'total' line)...but in light of the outrageous amount of time I've now spent trying to get to the bottom of this, I may now have to look at the conditional formatting you mentioned earlier (something else to learn...eek, where does this end!)

 
Last edited:
personally, I don't use wizards and I don't use the sort of functionality you are talking about because on balance they are too restrictive and you end up undoing most of what the wizard does.

If you want to group controls together, highlight them and select one of the options on the arrange tab - might be what you want.

good luck with your project
 
Are the upper boxes empty (null) or not?

can you post an up to date image. I don't believe the grid lines are the issue, but you do seem to have dots in the top bit of the footer, but not the bottom, which is curious.
 
with regards lines, just draw a line, you don't need gridline properties
 
Ok, bingo...I've made some progress (& a discovery, thanks to the final post at the bottom of this thread/page by a the user with the name armsys .... http://windowssecrets.com/forums/showthread.php/120251-Border-vs-gridline).

the report properties I'm trying to press into play is 'gridlines style top' ...this property puts a nice 'total' type line that moves when fields shrinking/growing accordingly. But even though I had it enabled, the line wasn't visible (it has sent me potty!) ...this led me up a path wrt gridlines & general confusion (& my original thread's line of questioning)....but actually all I needed to do was to select the 'fields' & then in the design-arrange menu, select 'stacked'...the gridlines style top property I seek then started working ...phew!

Thanks for all your input :-)
 
with regards lines, just draw a line, you don't need gridline properties

When you draw a line...I think that if the field shrinks the line stays static so will be in the wrong place? (I'm not 100% on this) ...whereas using the particular property that I want to press into play...the subtotal/total line is dynamic & moves with the data.

Are the upper boxes empty (null) or not?

can you post an up to date image. I don't believe the grid lines are the issue, but you do seem to have dots in the top bit of the footer, but not the bottom, which is curious.

Once I've had a bit more dabble (after finding out about 'stacking' & the gridlines property subsequently working), I'll see if the fields not shrinking remains a problem for that part of the reort ...to paraphrase Arnie...."I'll be back"
 
I am pretty sure the line will stay in it's absolute position, not a relative position.
 
Ok, I think I now understand the workings of this a little more (or at least have it working the way I seek)

Firstly the format 'lines' that I seek (report -> properties ->format -> Gridline Style Top)are only possible if you select your particular 'box of interest' (for want of a better term) & then in 'design'-'arrange' click 'stacked' (&/or probably 'tabular' ...dunno never tried)....you will not see these format lines if you don't....



However, if you do choose 'stacked' & then place any labels say next to the these fields (e.g. on the left) the cell won't then shrink. Therefore the solution is to stack only those field where the gridline/formatting line is needed...leaving the other boxes 'free form' so to speak....going this way allows me to have my Subtotal & Total lines, but still allows the boxes in between to shrink too.

Thanks once again for all your input :-)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom