[AccessD] Raising events from subreports

Jim Dettman jimdettman at verizon.net
Sat Mar 24 12:09:00 CDT 2012


Charlotte,

  I would move down the page by repeating the detail section with:

MoveLayout = True
NextRecord = False
PrintSection = True

 until you see the page change either by using .Page or checking your
position on the page and it suddenly becoming less (.Top).

Jim. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Saturday, March 24, 2012 12:45 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Raising events from subreports

All the subreports are separate by language and by the portions of the
boilerplate they contain.  The data manipulation isn't an issue, it's the
subreport manipulation that's a bugger!  They don't want to do it in a Word
doc, which would be a hassle anyhow because of the varying detail, but it
has to resemble a Word doc when printed.  So the data and boilerplate flow
from one page to another, and the language-specific subreports are toggled
in the parent report's groupheader for the claim based on the language flag
in the parent recordset (2 records per claim, one flagged English and one
Spanish).  What I'm mainly trying to avoid is the detail printing on one
page and the totals printing on the next.  It isn't an every letter
occurrence, but it will happen if I don't find a solution.  The Word
template doesn't provide for space between the end of the detail and the
totals.  It's is presented in a visible grid, so lines are being drawn
too.  The lines are varying height, so I use a line control below the
textboxes to push the line down as needed.  The vertical lines are drawn
from code.  Trying to make this unbound would be a total headache in Access
and the fine control just isn't there to do the fancy tricks I've done in
VB.Net to feed the data a record at a time to the grid.

Charlotte

On Sat, Mar 24, 2012 at 9:25 AM, Jim Lawrence <accessd at shaw.ca> wrote:

> Hi Charlotte:
>
> Just a thought here and I do not know whether it is applicable in this
> case.
>
> On major web sites that cater to multiple languages, to produce a faster
> and
> more accurate set of reports they just make pages for each language and
> that
> removes much of the complex data manipulation.
>
> The only other solution is to manually build the reports. You have been it
> the business long enough to remember that days when that was the only way
> reports were created. (I still support some old shops that have their
> command based applications and I am still called upon, on occasion, to
> manually build some complex reports, for printer or web pages and make
them
> look pretty.)
>
> Could some of the subreport detail, within the document, be managed but
> code?
>
> HTH
> Jim
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> Sent: Saturday, March 24, 2012 7:57 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Raising events from subreports
>
> OK, this report is actually a long letter explaining benefits adjustments.
> It has a standard header (one in each language) for each claim, detail of
> the adjustments, which has to show up in each language version, a total of
> the amounts involved, and explanation of each of the adjustments in that
> particular claim (in each language).  Right after the explanation comes
> several pages of standard boilerplate (in each language) and another bit
of
> boilerplate (in each language) that lists legal aid providers in the
county
> of the claim.  It has to print first as two separate letters, one in
> English and one in Spanish for each claim.
>
> The parent form is a shell containing the individual subreports and
> juggling them to print the same detail information and boilerplate, once
in
> English and once in Spanish.  The subreports are either English or Spanish
> versions.  The only things that are not translated between the letters is
> the detail of the amounts and the legal aid addresses.  The codes,
> explanations, descriptions, etc. are toggled for language.
>
> Sound complicated enough for you?  The primary subreport has the language
> version of the letter header, detail of the adjustments, and a subreport
> containing the explanations peculiar to the adjustments in that claim in
> that language.  This is the only nesting in the subreports, and it works
> nicely.  The problem arises when the detail pushes onto a second page.  I
> can easily identify in the subreport when the entire print length so far
> will force a page break by keeping an accumulative variable that adds the
> printed height of each detail record.  What I can't find a good way to do
> is let the parent know.  We're emulating a Word document here, so I'm
> trying to find a way to keep labels together.  They have to be separate
> labels for font size and formatting.
>
> Charlotte
>
> On Sat, Mar 24, 2012 at 6:10 AM, Jim Dettman <jimdettman at verizon.net>
> wrote:
>
> > Charlotte,
> >
> > <<Subreports are nested no more
> > than 3 deep, but I need to find a way to deal with child level
subreports
> > that cover multiple pages. >>
> >
> >   In what way?  After reading your description, I'm still left wondering
> > what it is your trying to do/avoid when the sub reports print.
> >
> > Jim.
> >
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
> Foust
> > Sent: Saturday, March 24, 2012 02:45 AM
> > To: Access Developers discussion and problem
> > Subject: Re: [AccessD] Raising events from subreports
> >
> > Here's the issue:  I have a report with multiple subreports for
> individual
> > parts of the docuent, including detail specific to each subreport and
> > boiler plate that runs to about 3-4 pages..  Subreports are nested no
> more
> > than 3 deep, but I need to find a way to deal with child level
subreports
> > that cover multiple pages.  I'd like to know when that condition occurs,
> > which I can determine within the Print event of the Detail section of
the
> > subreport by testing overall cumulative height against a maximum number
> of
> > twips.  I just haven't found a good way of passing the information back
> to
> > the parent form in order to force a page break.  Page breaks don't work
> in
> > subreports, so  it has to be done at the parent level, and I'm banging
my
> > head against the problem.
> >
> > Charlotte Foust
> > On Fri, Mar 23, 2012 at 5:59 PM, Charlotte Foust
> > <charlotte.foust at gmail.com>wrote:
> >
> > > Has anyone had luck raising custom events from subreports to their
> parent
> > > reports?  I used to do it in VB.net but Access report objects play by
> > > different rules.
> > >
> > > Charlotte Foust
> > >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> >
> >
> > Website: http://www.databaseadvisors.com
>
>
> >
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> >
> >
> > Website: http://www.databaseadvisors.com
>
>
> >
> >
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> Website: http://www.databaseadvisors.com
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> Website: http://www.databaseadvisors.com
>
>
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list