extending inner border lines for report that displays an invoice

A

a

Hello,

I've got a real annoying problem at the minute, I have a subreport within a
report. the subreport displays the individual lines within the invoice. A
line for example would be 1 |* |Book |@ £10| . each field is seperated by a
"line", demonstrated here using the pipe | . There could be any number of
"invoice lines" within an invoice.

What we are aiming for is that the subreport which contains the "invoice
lines" to stay the same height, no matter how many invoices lines are used,
which we can achieve by expanding the supreport to the desired height and
setting "Can Shrink" to No, around the subreport we have placed a border so
as it looks a bit like a square:
_________________
| qty | product | price |
----------------------

however the internal "lines",which separate the fields are only every as
tall as the amount of "invoice lines" that are displayed. We are trying
desperately to display the internal "lines" with the same height as the
subreport no matter how many invoice lines there are such as this
_________________
| qty | product | price |
| 1 | book | 10 |
| | | |
| | | |
----------------------

At the moment we are only getting something like this, which looks awful!

_________________
| qty | product | price |
| 1 | book | 10 |
| |
| |
----------------------

I hope that makes sense and that the diagrams above are being displayed
correctly, and someone can help with this issue!!!!

All the best

Graham
 
M

Marshall Barton

a said:
I've got a real annoying problem at the minute, I have a subreport within a
report. the subreport displays the individual lines within the invoice. A
line for example would be 1 |* |Book |@ £10| . each field is seperated by a
"line", demonstrated here using the pipe | . There could be any number of
"invoice lines" within an invoice.

What we are aiming for is that the subreport which contains the "invoice
lines" to stay the same height, no matter how many invoices lines are used,
which we can achieve by expanding the supreport to the desired height and
setting "Can Shrink" to No, around the subreport we have placed a border so
as it looks a bit like a square:
_________________
| qty | product | price |
----------------------

however the internal "lines",which separate the fields are only every as
tall as the amount of "invoice lines" that are displayed. We are trying
desperately to display the internal "lines" with the same height as the
subreport no matter how many invoice lines there are such as this
_________________
| qty | product | price |
| 1 | book | 10 |
| | | |
| | | |
----------------------

At the moment we are only getting something like this, which looks awful!

_________________
| qty | product | price |
| 1 | book | 10 |
| |
| |
----------------------


This kind of thing is not just annoying, it's downright
complicated. In a main report, this kind of thing is best
dealt with by using the Line method in the Page event.
Unfortunately, subreports don't recognize the Page event so
that won't work. I think there might be a way since you do
not allow the subreport to span a page boundary.

First, add an invisible text box named txtTotLines to the
subreport's Report Header section and set its ControlSource
expression to =Count(*)

Next add an invisible text box named txtCntLines to the
detail section. Set its ControlSource expression to =1 and
RunningSum property to OverAll.

Now add code to the Detail section's Format event procedure
so that it looks something like this air code:

Static intBlanks As Integer
Select Case intBlanks
Case 0
If txtCntLines = txtTotLines Then
intBlanks = 1 'Last detail
Me.NextRecord = False
End If
Case 1 'First blank line
intBlanks = intBlanks + 1
Me.txtQty.Visible = False
Me.txtproduct .Visible = False
Me.txtprice.Visible = False
Me.NextRecord = False
Case < 12 'other blank lines
intBlanks = intBlanks + 1
Me.NextRecord = False
End Select

where the 12 is the number of blank lines that would be
needed if there were only one detail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top