Reports
am 01.02.2008 19:25:47 von lgeastwood
I have a report that has a variable quantity of details to print in
the detail section per record
In other words record 1 could have 5 details and record 2 could have
50 details.
These details must be listed one after the other in the detail
section, per record.
I have looked (in vain) for code to create text boxes during the
format event. Apparently it can't be done.
Next I tried creating controls on the report and set their Visible,
Top, etc properties during the format event. This worked...somewhat.
The problem was that each record regardless of details ends up having
visible the number of controls of the record with the greatest number
of details. So record 1 with 5 details had 50 visible controls because
record 2 had 50 details.
There could potentially be even more details per record so this
approach isn't cutting it. I'd rather not have 100 invisible controls
on my report. Too cumbersome.
It seems that there ought to be a fairly standard method to handle
this but I can't seem to hit on it.
Does anyone know of a method that achieves what I'm trying to describe?
Re: Reports
am 01.02.2008 19:52:20 von Fred Zuckerman
"Lou O" wrote in message
news:8c6836cf-a2fe-450a-b867-4bdc01aefdb6@s19g2000prg.google groups.com...
>I have a report that has a variable quantity of details to print in
> the detail section per record
> In other words record 1 could have 5 details and record 2 could have
> 50 details.
> These details must be listed one after the other in the detail
> section, per record.
> I have looked (in vain) for code to create text boxes during the
> format event. Apparently it can't be done.
> Next I tried creating controls on the report and set their Visible,
> Top, etc properties during the format event. This worked...somewhat.
> The problem was that each record regardless of details ends up having
> visible the number of controls of the record with the greatest number
> of details. So record 1 with 5 details had 50 visible controls because
> record 2 had 50 details.
> There could potentially be even more details per record so this
> approach isn't cutting it. I'd rather not have 100 invisible controls
> on my report. Too cumbersome.
> It seems that there ought to be a fairly standard method to handle
> this but I can't seem to hit on it.
> Does anyone know of a method that achieves what I'm trying to describe?
Have you investigated sub-reports?
Fred Zuckerman
Re: Reports
am 01.02.2008 21:36:25 von mike1174
Is all your data coming from 1 table? Sounds like it. If you have 2
tables (1 for master and 1 for detail), reports would be easier to
create.
Re: Reports
am 01.02.2008 21:43:21 von Bob Quintal
Lou O wrote in
news:8c6836cf-a2fe-450a-b867-4bdc01aefdb6
@s19g2000prg.googlegroups.co
m:
> I have a report that has a variable quantity of details to print
> in the detail section per record
> In other words record 1 could have 5 details and record 2 could
> have 50 details.
> These details must be listed one after the other in the detail
> section, per record.
> I have looked (in vain) for code to create text boxes during the
> format event. Apparently it can't be done.
> Next I tried creating controls on the report and set their
> Visible, Top, etc properties during the format event. This
> worked...somewhat. The problem was that each record regardless of
> details ends up having visible the number of controls of the
> record with the greatest number of details. So record 1 with 5
> details had 50 visible controls because record 2 had 50 details.
> There could potentially be even more details per record so this
> approach isn't cutting it. I'd rather not have 100 invisible
> controls on my report. Too cumbersome.
> It seems that there ought to be a fairly standard method to handle
> this but I can't seem to hit on it.
> Does anyone know of a method that achieves what I'm trying to
> describe?
Redesign your report with a group header on what you call the
"detail" Put each one of the "Details" in the detail section.
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
Re: Reports
am 01.02.2008 21:45:41 von lgeastwood
On Feb 1, 1:52 pm, "Fred Zuckerman" wrote:
> "Lou O" wrote in message
>
> news:8c6836cf-a2fe-450a-b867-4bdc01aefdb6@s19g2000prg.google groups.com...
>
>
>
> >I have a report that has a variable quantity of details to print in
> > the detail section per record
> > In other words record 1 could have 5 details and record 2 could have
> > 50 details.
> > These details must be listed one after the other in the detail
> > section, per record.
> > I have looked (in vain) for code to create text boxes during the
> > format event. Apparently it can't be done.
> > Next I tried creating controls on the report and set their Visible,
> > Top, etc properties during the format event. This worked...somewhat.
> > The problem was that each record regardless of details ends up having
> > visible the number of controls of the record with the greatest number
> > of details. So record 1 with 5 details had 50 visible controls because
> > record 2 had 50 details.
> > There could potentially be even more details per record so this
> > approach isn't cutting it. I'd rather not have 100 invisible controls
> > on my report. Too cumbersome.
> > It seems that there ought to be a fairly standard method to handle
> > this but I can't seem to hit on it.
> > Does anyone know of a method that achieves what I'm trying to describe?
>
> Have you investigated sub-reports?
> Fred Zuckerman
I do use them but it seems there should be a more straight forward way
to accomplish this.
Up till now I've used a listbox control that I provide with table data
and set the height property per number of list rows.
This works OK with a few things lacking.
The biggest problem is that I want the listbox border not to be
visible.
I set the border style property to "transparent" in design view as
well as make the border color white.
I also set these properties in the "on format" event.
In preview; fine, no listbox border. But when the report is sent to
the printer, the listbox border is printed out.
Maybe someone knows if this is common behavior for a list box or am I
missing a setting?