You can use the report footer in the subreport with a
Name: txtOkNg
Control source:=Min(OkNg)
Then in the main report, you can reference this control with a control
source of
=srpRRBatchJobTimeTrackingP1.Report!txtOkNg
The other solution is adding another table to your main report record source
but grouping so you don't get extra detail records. Add a column to the main
report's record source query that returns Min(OkNg).
--
Duane Hookom
Microsoft Access MVP
Ron5440 said:
The OkNg field is in the subreport, it is a calculated field in the record
source. I want to see the new control on the main report. I added the
following to the 'Plant' footer (actually I tried it on all of the footers)
=Min([rptRRTimeStamp]![srpRRBatchJobTimeTrackingP1]![OkNg])
:
If you have a field/column in your report's record source named OkNg then you
won't get prompted for it in the report.
I wasn't aware there were subreports involved based on your original
question. Where is the OkNg field and where do you want to see the "new
control"?
--
Duane Hookom
Microsoft Access MVP
:
Duane,
Yes it is in the SQL statement which is the record source for the subreport.
The info that I am gathering is broken down into 3 different plants using
sorting and grouping on the main report. I want to display 'Ok' or 'Fail' in
a single field for each plant. I had a 'Plant' header, I added the 'Plant'
footer and dropped in a control with the =Min(OkNg) and when I open the
report I get a parameter box looking for a OkNg value.
:
This depends on the calculation of the OkNg field. Is it in the query or a
calculation in the control source? If it is in the query, you should be able
to use a control source in the Report Header or Footer section like:
=Min(OkNg)
--
Duane Hookom
Microsoft Access MVP
:
I have a report that shows whether of a bunch of batch jobs ran successfully
or failed. I have a calculated (OkNg) field that determines if the jobs ran
successfully and returns either "OK" or "Fail". I want a new control on the
report to look at all of the values in the 'OkNg' field and return 'Fail' if
any one of the jobs failed, or 'Ok' if they were all successfull.