Possible/recommended to use a report "template"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I'm creating an app in access 2000 that will run 30 reports from the same 3
tables Most of the reports will only have 3 or 4 fields. I'm wondering if it
is possible to only create 1 (or a few) report templates, instead of 30 and
pass field informtation from queries to unbound controls in the reports. I'm
not very familiar with the posssibilities in access.
Thanks
 
Yes, but you would have to give us much more detail. Give us some examples
of a few of these reports and the various fields, queries, and tables you
are using.
 
The tables are not joined (at least so far) and this is to run a series of
tests -- query results will goup records into subtotals and give % of total
for each line item in that group.

e.g. the xx below will be generated by the query and I will have to rollup
everthing but these obligors into "other" in a separate query and append it.

Obligor CP Portfolio % Limit Result
LBHI/Affiliates xx.x 100.00 Pass/Fail
Lloyds/Affiliates xx.xx% 100.00% Pass/Fail
Lloyds Liquidity Supported ABCP Programs xx.xx% 100.00%
Other xx.xx% 0.00% Pass/Fail

The real problem is that on the specs they call for subtotals and
subheadings in some of the queries --

TRV Collateral Total Principal Balance ($m) Limit ($m) Result
All Ratings Treasury Bills, Notes, Bonds
CUSIP1 xx.xx No Limit Pass / Fail
CUSIP2 xx.xx No Limit Pass / Fail
AAA/Aaa United States Agency Paper
CUSIP3 xx.xx No Limit Pass / Fail
CUSIP4 xx.xx No Limit Pass / Fail
CUSIP5 xx.xx No Limit Pass / Fail

(below - each line is a total from another query)
Investment Amount ($m) Portfolio % Limit - % Result
Commercial Paper xx.xx xx.xx% 100.00% Pass / Fail
Reverse Repo xx.xx xx.xx% 100.00% Pass / Fail
MoMarket xx.xx xx.xx% 100.00% Pass / Fail
Other xx.xx xx.xx% 0.00% Pass / Fail
Total xx.xx 100.00%
 
You could change the query of the report using a form which let the user
choose the possibilities.

Probably this code gives an idea (just posted it somewhere else).

Private Sub cmdChangeQuery_Click()
Static intAction As Integer
Dim stgSQL As String

intAction = intAction + 1

If intAction = 2 Then intAction = 0

Select Case intAction
Case 0
stgSQL = "SELECT tblData.fID AS One, tblData.fName AS Two FROM tblData
ORDER BY tblData.fName;"
Me.Label0.Caption = "Rec ID"
Me.Label1.Caption = "Name"
Case 1
stgSQL = "SELECT tblData.fName AS One, tblData.fCity AS Two FROM tblData
ORDER BY tblData.fName;"
Me.Label0.Caption = "Name"
Me.Label1.Caption = "City"
Case Else
Stop
End Select

Forms!frmTest.RecordSource = stgSQL

End Sub

Change to the rquired fields and use reports instead of forms. Have the
report open or open from the form the usual way.

Vsn
 
Back
Top