Making form/report with a fixed no. of lines and variable no. or records

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I realy need your help for the following problem.
I need to display some data in a tabelar mode in a report or form, using the
data from a temporary table having at most 7 records. The printable
report(form) must have exactly 7 lines, leaving empty the ones for which
they are no records (Ex: if there are 3 records, the report must have 3
writen lines and 4 empty after them.)


Thank you in advance!
 
Chris,

I am sure there are more elegant ways of handling this. However, I had
to do something similar just recently, and I did it like this... In
your example, use an Append Query to add 4 (7 - count of actual records)
"blank" records to the table (not really blank, with data in a field
which is not included in the report, so that it is actually a record!)
 
What if, after viewing that report I see that I forgot to add a record and I
have to do it? I use a delete query to del. the "blank" lines, I add a
record from the front end form and than add again "blank"lines?

2. One more BIG PROBLEM !!! I need to make this report multipage, and a new
page for each new value for one of the parameters.(The database is for the
stockpile, and these reports must be exit tickets for the materials from the
storage.
For any product -having a code- i take from the storage some materials.When
that code is changed, it need to be generate a new page of the report, and
any af them with 2, 3, 4 (maximum 7) lines written (as many materials are
taken for that product code) and the rest of the lines, to 7, blanks.
 
Chris,

Yes, you would have to set up a procedure to remove the blank lines and
rewrite them to the table in response to changes in other data and
requirements. I don't really see this is too much of a problem that you
need to cater for this for each product. You will just have to work on
getting the relevant Delete and Append queries set up correctly, and the
procedures to run them. But in the end, you need 7 records in the table
for each product, so the requirement will be, whenever there is a
relevant change in the "real" data for one of the products:
- a delete query to remove the "blanks" for that ProductID
- obtain a count of the "real" records for that ProductID
- an append query to add the required number of blanks for that ProductID
 
Chris:

(HTML Deleted)

Add a Group (using the sorting and grouping dialog) for the Product code and
for the OrderID and be sure to set that each group has a group header. You
don't need to have any data in these groups, it can all be in the headers
and detail lines. Then click on the group header in design mode, bring up
its properties and for the Force New Page property. Set it to before
section.
--
Steve Arbaugh
MS Access MVP


Thank you very much. I inderstood this part.
But how about generating a new page for every new product code and eventualy
every order ? This code must appear in the header, not in the report body.
Like this (rich text-HTML):


HEADER:
Company .....................Order ...................
Exit document
Document
numberDate PRODUCT CODENo. of items

daymonthyear
............ ................. .......... .........
........................... ..........................
Crt.
no.
..
The name and the characteristics of the materialAccountThe Code of the
aterial Qt.Measurement unit
Unit
Price
Total Price
DebitorCreditor
BODY(the values)
1....
2....
3....
4.
5.
6.
7.

FOOTER:
Date: ........................
Department's chief signatureStock keeper signatureMaterial user's signature





The beneficiary of the database, the chief of mechanical deparment wants
even more repports on one A4 page, till fiting the dimension of the page (I
sugested to use A5 pages with one report centered)
Thank you,
Chris
 
How to do that? Caan tou be more specific?
SA said:
Chris:

(HTML Deleted)

Add a Group (using the sorting and grouping dialog) for the Product code and
for the OrderID and be sure to set that each group has a group header. You
don't need to have any data in these groups, it can all be in the headers
and detail lines. Then click on the group header in design mode, bring up
its properties and for the Force New Page property. Set it to before
section.
--
Steve Arbaugh
MS Access MVP


Thank you very much. I inderstood this part.
But how about generating a new page for every new product code and eventualy
every order ? This code must appear in the header, not in the report body.
Like this (rich text-HTML):


HEADER:
Company .....................Order ...................
Exit document
Document
numberDate PRODUCT CODENo. of items

daymonthyear
............ ................. .......... .........
.......................... ..........................
Crt.
no.
.
The name and the characteristics of the materialAccountThe Code of the
aterial Qt.Measurement unit
Unit
Price
Total Price
DebitorCreditor
BODY(the values)
1....
2....
3....
4.
5.
6.
7.

FOOTER:
Date: ........................
Department's chief signatureStock keeper signatureMaterial user's signature





The beneficiary of the database, the chief of mechanical deparment wants
even more repports on one A4 page, till fiting the dimension of the page (I
sugested to use A5 pages with one report centered)
Thank you,
Chris
 
I did how you sugested, but appeard a PROBLEM: if I add groups for the
Product code and for the OrderID, with headers and Force New Page Property,
and I put the tabelar header and footer in the pege header and page footer,
i wil have a new page for every cenge of these parameters, BUT IN THE REPORT
BODY I WILL HAVE ONLY A FEW LINES(OR ONLY ONE) WITH DATA HAVING GRID, AND
BELOW THEM WILL BE BLANK SPACE.
THIS SPACE NEED TO BE WITH GRID, BECAUSE THE HEADER AND THE FOOTER ARE
TABELAR (WITH GRID)
Can you please help me?
 
Back
Top