Adding variable blank lines to a report.

  • Thread starter Thread starter barbara
  • Start date Start date
B

barbara

I have a table that has all the line info from invoices
with the blank lines removed. There is a code at the
beginning of each line describing how many blank lines to
print before each record. It will either be 1,2 or 3
lines. How do I print a blank line before a detail line?
 
This is such an unusual request that it might help to provide some sample
data as well as a reason for blank lines prior to a detail section.
 
I have a table that has all the line info from invoices
with the blank lines removed. There is a code at the
beginning of each line describing how many blank lines to
print before each record. It will either be 1,2 or 3
lines. How do I print a blank line before a detail line?


One way would be to add three text boxes above the data
controls in the detail section and set their Height to
however much space you want for a blank line. Set the text
boxes' control source expression to =" ". Then set both
the text boxes' and the section's CanShrink property to Yes
so they will be squeezed up if you decide to make them
invisible.

With all that in place, use code in the section's Format
event procedure to make the them visible or not as the code
number specifies:

Me.txtblank1.Visible = (Me.txtCode >0)
Me.txtblank2.Visible = (Me.txtCode >1)
Me.txtblank3.Visible = (Me.txtCode >2)
 
-----Original Message-----
I have a table that has all the line info from invoices
with the blank lines removed. There is a code at the
beginning of each line describing how many blank lines to
print before each record. It will either be 1,2 or 3
lines. How do I print a blank line before a detail line?
.
Our Invoices print on from ISeries on preprinted forms
and then for archive purposes we copy the spool file to a
file to send out for micro fiche. That file contains
each line of the invoice. The conversion automatically
removes blank lines and codes the file so it is a simple
process on our ISeries to write a program to reprint the
invoice. The first character of each line contains the
key to how many lines are printed. It is " ", "0", "-",
or "1" for 1, 2, 3, or new page respectively.

I have a sample table I could show you but didn't see
anyway to attach a file. The table has essentially two
fields. The first is the code field and the next is 85
character text field. If the code is "-" I want to space
down three blank lines and then print the other field.
 
Our Invoices print on from ISeries on preprinted forms
and then for archive purposes we copy the spool file to a
file to send out for micro fiche. That file contains
each line of the invoice. The conversion automatically
removes blank lines and codes the file so it is a simple
process on our ISeries to write a program to reprint the
invoice. The first character of each line contains the
key to how many lines are printed. It is " ", "0", "-",
or "1" for 1, 2, 3, or new page respectively.

I have a sample table I could show you but didn't see
anyway to attach a file. The table has essentially two
fields. The first is the code field and the next is 85
character text field. If the code is "-" I want to space
down three blank lines and then print the other field.


You can use the same concept I posted before, but with a
little different code:
Dim c As String
c = Me.txtCode
Me.txtblank1.Visible = (c=" " OR c="0" OR c="-")
Me.txtblank2.Visible = (c="0" OR c="-")
Me.txtblank3.Visible = (c="-")
Me.pgBreak.Visible = (c="1")
 
Back
Top