Senin, 27 Februari 2012

[MS_AccessPros] Re: Subreport with columns?

 

Hi Duane,

Thanks for the idea. I think I'll put it on my to do list for down the road as I'm guessing it will take me some time to understand and do it and this is low on the priority scale. Will let you know the results when I do try it.

Thanks again!
Connie

--- In MS_Access_Professionals@yahoogroups.com, "Duane" <duanehookom@...> wrote:
>
> I'm not sure this is possible but am anxious to find out if it does work ;-)
>
> If the number of records is not known (but the number of columns is), I generally create a column in the subreport record source that can be used to sort so they appear in the proper order. For instance this record source:
> 1 Jan
> 5 Feb
> 9 Mar
> 2 Apr
> 6 May
> 10 Jun
> 3 Jul
> 7 Aug
> 11 Sep
> 4 Oct
> 8 Nov
> 12 Dec
> When displaying this in four columns across then down will "appear":
> Jan Apr Jul Oct
> Feb May Aug Nov
> Mar Jun Sep Dec
>
> The trick is to use counts and MOD or integer division or whatever to get the correct numerical order.
>
> Duane Hookom
> MS Access MVP
>
> --- In MS_Access_Professionals@yahoogroups.com, Crystal <strive4peace2008@> wrote:
> >
> > Hi Connie,
> >
> > not sure ... sounds reasonable though. 
> >
> >
> > > "unless perhaps one fixes the height"
> >
> > this is not hard to do ... put code on the OnFormat event of the section that the subreport is in to set the exact height
> >
> >
> > you will need to experiment with this a little ... and once you get it working, it will be sweet!
> >
> > '~~~~~~~~~~~~~~~~~~~~~~~~~~
> > dim nHeight as double
> > dim nNumRecords as Long
> >
> > const INCHEStoTWIPS = 1440
> >
> > nNumRecords = 'figure this out
> >
> > nHeight = (1 + 2 + (3 * nNumRecords/Numbercolumns) + 4) * INCHEStoTWIPS
> >
> > me.subreport_controlname.height = nHeight
> > '~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > WHERE
> > 1 is the height of the report header in inches
> > 2 is the height of the report footer in inches
> > 3 is the height of the detail section in inches4 is for a little extra
> >
> > Warm Regards,
> > Crystal
> >
> > Microsoft MVP
> > remote programming and training
> >
> > Access Basics by Crystal
> > http://www.AccessMVP.com/strive4peace
> > Free 100-page book that covers essentials in Access
> >
> >  *
> >    (: have an awesome day :)
> >  *
> >
> >
> >
> > ________________________________
> > From: mrsgoudge <no_reply@yahoogroups.com>
> > To: MS_Access_Professionals@yahoogroups.com
> > Sent: Wednesday, February 22, 2012 10:19 AM
> > Subject: [MS_AccessPros] Re: Subreport with columns?
> >
> > Thanks Crystal and Duane.  Turns out I need the columns to go Down and Across and from my research on the internet that is not possible in a subreport. (unless perhaps one fixes the height.  Correct?) 
> >
> > Thanks again!
> > Connie
> > Access 2007
> >
> > --- In MS_Access_Professionals@yahoogroups.com, mrsgoudge <no_reply@> wrote:
> > >
> > > Good afternoon! 
> > >
> > > I have a report with several subreports.  I would like one of them to have the info on two columns when necessary.  It is the bottom subreport of the report. All of the subreports grow as needed.  Is this possible? 
> > >
> > > Thanks!
> > > Connie
> > >
> >
> > [Non-text portions of this message have been removed]
> >
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar