Appendix to a report

  • Thread starter Thread starter Kjell Harnesk
  • Start date Start date
K

Kjell Harnesk

I have a report that is used for submitting offers from a company. This is
normally a one page report based on data entered
in a couple of tables. Sometimes they want to create an appendix to the
offer wich will be on a page (the last) of it's own. This
page can contain a little more text and preferably be formatted like a
wordpad document or maybe MS Word.

Is this possible? If Yes, I would appreciate rather detailed description on
how to do it because I have never tried something
like this before. I guess that it could involve ActiveX of some kind but I
have no clue about that.
 
I have a report that is used for submitting offers from a company. This is
normally a one page report based on data entered
in a couple of tables. Sometimes they want to create an appendix to the
offer wich will be on a page (the last) of it's own. This
page can contain a little more text and preferably be formatted like a
wordpad document or maybe MS Word.

Is this possible? If Yes, I would appreciate rather detailed description on
how to do it because I have never tried something
like this before. I guess that it could involve ActiveX of some kind but I
have no clue about that.

Without knowing what you need to say in the appendix, it would seem to
me that the simplest method would be to simply create a new report,
either in Access or in Word.
Then, when you need it, print it and add it to the already printed
main report.
 
fredg said:
Without knowing what you need to say in the appendix, it would seem to
me that the simplest method would be to simply create a new report,
either in Access or in Word.
Then, when you need it, print it and add it to the already printed
main report.

Fair enough but can I store that appendix (ie a word-doc) somehow in the DB
so that I can
have a connection to the right record in the DB? I would also like to be
able to print
both the offer and the appendix to one single pdf-file but I realize that
that
may be asking too much.
 
Fair enough but can I store that appendix (ie a word-doc) somehow in the DB
so that I can
have a connection to the right record in the DB? I would also like to be
able to print
both the offer and the appendix to one single pdf-file but I realize that
that
may be asking too much.

I don't know what you mean by "a connection to the right record in the
Db".

You can create a one page Word document.
Then in your report, add an OLEUnbound control to the Report Footer.
When adding it select Link.
Size it to the full length and width of the paper you are using.
(minus the margins).
Set the Report's PageFooter property to Not with RptFtr.
It's on the Form property sheet's Format tab.
Set the Report Footer's ForceNewPage property to BeforeSection.
That's on the Report Footer property sheet's Format tab.

Edit the Word document as needed (using Word).
Any changes will automatically be reflected in the Access report.

Print the Access report. The Word document will print as the Report
Footer. The Page Footer will not appear on this page.

You can also use some criteria to not print the Word document by
coding the ReportFooter Format event:
Cancel = [SomeControl] = SomeValue
It will just throw out a blank page.
 
fredg said:
I don't know what you mean by "a connection to the right record in the
Db".

Thanks a lot for Your assistanse so far.

I have done all of the below but then the same appendix text appears on
every
Offer they print. That´s what I mean by "a connection to the record in the
Db". Diffrent offers have diffrent appendix so I need to have a way for the
users to
create a word document and link that document to a specific OfferID in the
database.

I guess that involves adding a field in the DB and some sort of control in
the form
where the offers are created. That control would contain a word object.

I hope You understand what I mean. Can it be done?

You can create a one page Word document.
Then in your report, add an OLEUnbound control to the Report Footer.
When adding it select Link.
Size it to the full length and width of the paper you are using.
(minus the margins).
Set the Report's PageFooter property to Not with RptFtr.
It's on the Form property sheet's Format tab.
Set the Report Footer's ForceNewPage property to BeforeSection.
That's on the Report Footer property sheet's Format tab.

Edit the Word document as needed (using Word).
Any changes will automatically be reflected in the Access report.

Print the Access report. The Word document will print as the Report
Footer. The Page Footer will not appear on this page.

You can also use some criteria to not print the Word document by
coding the ReportFooter Format event:
Cancel = [SomeControl] = SomeValue
It will just throw out a blank page.
 
fredg said:
I don't know what you mean by "a connection to the right record in the
Db".

Thanks a lot for Your assistanse so far.

I have done all of the below but then the same appendix text appears on
every
Offer they print. That´s what I mean by "a connection to the record in the
Db". Diffrent offers have diffrent appendix so I need to have a way for the
users to
create a word document and link that document to a specific OfferID in the
database.

I guess that involves adding a field in the DB and some sort of control in
the form
where the offers are created. That control would contain a word object.

I hope You understand what I mean. Can it be done?
You can create a one page Word document.
Then in your report, add an OLEUnbound control to the Report Footer.
When adding it select Link.
Size it to the full length and width of the paper you are using.
(minus the margins).
Set the Report's PageFooter property to Not with RptFtr.
It's on the Form property sheet's Format tab.
Set the Report Footer's ForceNewPage property to BeforeSection.
That's on the Report Footer property sheet's Format tab.

Edit the Word document as needed (using Word).
Any changes will automatically be reflected in the Access report.

Print the Access report. The Word document will print as the Report
Footer. The Page Footer will not appear on this page.

You can also use some criteria to not print the Word document by
coding the ReportFooter Format event:
Cancel = [SomeControl] = SomeValue
It will just throw out a blank page.

OK. If you only have a few different Appendix reports, here is how I
managed it.

Let's assume just as an example, you have a field in your report you
use to determine which document you wish to append.
We'll use your [OrderID].
And, we'll assume there is just one OrderID per report.
So if the Order ID in the report is 12345 we'll print word doc A.
If the Order ID is 98765 we'll print word doc B.
If its 55555 we'll print word doc C, etc.
If not a listed OrderID we'll not print anything (as an appendix).

1) Create the different word documents, A, B, and C.
2) Add an OLEUnbound control to the Report Footer for 'each' word doc.
In this case we'll add 3. One for DocA. One for DocB, one for DocC,
linked to their respective documents.
Set their SizeMode to Zoom.
Set their Visible property to No.
Size the controls to the same width and height, left and top, so they
overlap one another.

Code the Report Footer Format event:

If [OrderID] = 12345 then
Me.OLEUnbound1.Visible = True
Me.OLEUnbound2.Visible = False
Me.OLEUnbound3.Visible = False
ElseIf [OrderID] - 98765 Then
Me.OLEUnbound1.Visible = False
Me.OLEUnbound2.Visible = True
Me.OLEUnbound3.Visible = False
ElseIf [OrderID] = 55555 Then
Me.OLEUnbound3.Visible = True
Me.OLEUnbound1.Visible = False
Me.OLEUnbound2.Visible = False
Else
' Don't show any appendix. A blank page will go through the printer.
Cancel = True
End If

Change the Word doc names and the control and field names as needed.
To edit the documents, double click on the linked OLE control for that
document.
Make and save your changes.

The above seemed to work well for me.
 
fredg said:
OK. If you only have a few different Appendix reports, here is how I
managed it.

I will try to explain what I want in a diffrent way maybe it will be more
clear.
The appendixes are uniqe (but not mandatory) for each OfferID so the
approach You suggested is not a solution.

The ideal solution is to have a command button in the form where the offers
are created.
A button captioned "Create/view appendix". When clicking the button it opens
MS Word.
The appendix is written and saved. The database is in some way told
(manually by typing
in the path/filename or automatic if possible) that the appendix just
written is assosiated
to the OfferID it was called from. Preferably as a link but embedded can
also work.

If the command button is clicked when there already is an appendix for that
OfferID
created earlier it will call MS Word and load the correct appendix.

The part You wrote on how to print it is tested an I managed to get it to
work
as You described, thanks, hope You or someone else can tell me how to do
the above if it is doable.
 
Back
Top