Preview Multiple Reports

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

Guest

I have a form with report parameters in combo boxes and a Print Preview
command button. I use DoCmd.OpenReport stDocName, acPreview to run the
report and open the preview window. Currently I can only open one preview
window. What I'd like to be able to do is have the User select different
report parameters and display those in seperate preview windows (have
mutliple preview windows open). Is there a trick for that?

Thanks, Mike
 
Mike,

I can open multiple previews with no problems.

Access 2002 SP3.

This is a sample of some code that opens up to four previews:

If Nz(Forms![import specs].[check17], 0) = True Then
DoCmd.OpenReport "store A5", acViewPreview
End If
If Nz(Forms![import specs].[check19], 0) = True Then
DoCmd.OpenReport "store A7", acViewPreview
End If
If Nz(Forms![import specs].[check21], 0) = True Then
DoCmd.OpenReport "adv A7", acViewPreview
End If
If Nz(Forms![import specs].[check22], 0) = True Then
DoCmd.OpenReport "adv A5", acViewPreview
End If

This does check to see if a checkbox is ticked before openning the report
....... shouldn't make any difference that I see.

HTH

Terry
 
Thanks Terry. That does pop multiple windows but assumes different report
names are being passed. In my particular case the report has the same name
(it is a master report that contains different data based on what is selected
in the combo boxes).

TerryC said:
Mike,

I can open multiple previews with no problems.

Access 2002 SP3.

This is a sample of some code that opens up to four previews:

If Nz(Forms![import specs].[check17], 0) = True Then
DoCmd.OpenReport "store A5", acViewPreview
End If
If Nz(Forms![import specs].[check19], 0) = True Then
DoCmd.OpenReport "store A7", acViewPreview
End If
If Nz(Forms![import specs].[check21], 0) = True Then
DoCmd.OpenReport "adv A7", acViewPreview
End If
If Nz(Forms![import specs].[check22], 0) = True Then
DoCmd.OpenReport "adv A5", acViewPreview
End If

This does check to see if a checkbox is ticked before openning the report
...... shouldn't make any difference that I see.

HTH

Terry


Mike said:
I have a form with report parameters in combo boxes and a Print Preview
command button. I use DoCmd.OpenReport stDocName, acPreview to run the
report and open the preview window. Currently I can only open one preview
window. What I'd like to be able to do is have the User select different
report parameters and display those in seperate preview windows (have
mutliple preview windows open). Is there a trick for that?

Thanks, Mike
 
Mike,

Mike,

I've never tried to do that and I suspect you can't have multiple instances
of the same report open. Anyone else got any ideas?

Terry

Mike said:
Thanks Terry. That does pop multiple windows but assumes different report
names are being passed. In my particular case the report has the same name
(it is a master report that contains different data based on what is selected
in the combo boxes).

TerryC said:
Mike,

I can open multiple previews with no problems.

Access 2002 SP3.

This is a sample of some code that opens up to four previews:

If Nz(Forms![import specs].[check17], 0) = True Then
DoCmd.OpenReport "store A5", acViewPreview
End If
If Nz(Forms![import specs].[check19], 0) = True Then
DoCmd.OpenReport "store A7", acViewPreview
End If
If Nz(Forms![import specs].[check21], 0) = True Then
DoCmd.OpenReport "adv A7", acViewPreview
End If
If Nz(Forms![import specs].[check22], 0) = True Then
DoCmd.OpenReport "adv A5", acViewPreview
End If

This does check to see if a checkbox is ticked before openning the report
...... shouldn't make any difference that I see.

HTH

Terry


Mike said:
I have a form with report parameters in combo boxes and a Print Preview
command button. I use DoCmd.OpenReport stDocName, acPreview to run the
report and open the preview window. Currently I can only open one preview
window. What I'd like to be able to do is have the User select different
report parameters and display those in seperate preview windows (have
mutliple preview windows open). Is there a trick for that?

Thanks, Mike
 
You can try send the report to the SnapShot viewer. The following code opens
one instance of the SnapShot viewer with two reports.

DoCmd.OutputTo acReport, "rptAuctionBidSheets", _
"SnapshotFormat(*.snp)", "C:\SnapAuction1.snp", True
DoCmd.OutputTo acReport, "rptAuctionBidSheets", _
"SnapshotFormat(*.snp)", "C:\SnapAuction2.snp", True

--
Duane Hookom
MS Access MVP
--

TerryC said:
Mike,

Mike,

I've never tried to do that and I suspect you can't have multiple
instances
of the same report open. Anyone else got any ideas?

Terry

Mike said:
Thanks Terry. That does pop multiple windows but assumes different
report
names are being passed. In my particular case the report has the same
name
(it is a master report that contains different data based on what is
selected
in the combo boxes).

TerryC said:
Mike,

I can open multiple previews with no problems.

Access 2002 SP3.

This is a sample of some code that opens up to four previews:

If Nz(Forms![import specs].[check17], 0) = True Then
DoCmd.OpenReport "store A5", acViewPreview
End If
If Nz(Forms![import specs].[check19], 0) = True Then
DoCmd.OpenReport "store A7", acViewPreview
End If
If Nz(Forms![import specs].[check21], 0) = True Then
DoCmd.OpenReport "adv A7", acViewPreview
End If
If Nz(Forms![import specs].[check22], 0) = True Then
DoCmd.OpenReport "adv A5", acViewPreview
End If

This does check to see if a checkbox is ticked before openning the
report
...... shouldn't make any difference that I see.

HTH

Terry


:

I have a form with report parameters in combo boxes and a Print
Preview
command button. I use DoCmd.OpenReport stDocName, acPreview to run
the
report and open the preview window. Currently I can only open one
preview
window. What I'd like to be able to do is have the User select
different
report parameters and display those in seperate preview windows (have
mutliple preview windows open). Is there a trick for that?

Thanks, Mike
 
I'll give it a shot...thanks!!

Duane Hookom said:
You can try send the report to the SnapShot viewer. The following code opens
one instance of the SnapShot viewer with two reports.

DoCmd.OutputTo acReport, "rptAuctionBidSheets", _
"SnapshotFormat(*.snp)", "C:\SnapAuction1.snp", True
DoCmd.OutputTo acReport, "rptAuctionBidSheets", _
"SnapshotFormat(*.snp)", "C:\SnapAuction2.snp", True

--
Duane Hookom
MS Access MVP
--

TerryC said:
Mike,

Mike,

I've never tried to do that and I suspect you can't have multiple
instances
of the same report open. Anyone else got any ideas?

Terry

Mike said:
Thanks Terry. That does pop multiple windows but assumes different
report
names are being passed. In my particular case the report has the same
name
(it is a master report that contains different data based on what is
selected
in the combo boxes).

:

Mike,

I can open multiple previews with no problems.

Access 2002 SP3.

This is a sample of some code that opens up to four previews:

If Nz(Forms![import specs].[check17], 0) = True Then
DoCmd.OpenReport "store A5", acViewPreview
End If
If Nz(Forms![import specs].[check19], 0) = True Then
DoCmd.OpenReport "store A7", acViewPreview
End If
If Nz(Forms![import specs].[check21], 0) = True Then
DoCmd.OpenReport "adv A7", acViewPreview
End If
If Nz(Forms![import specs].[check22], 0) = True Then
DoCmd.OpenReport "adv A5", acViewPreview
End If

This does check to see if a checkbox is ticked before openning the
report
...... shouldn't make any difference that I see.

HTH

Terry


:

I have a form with report parameters in combo boxes and a Print
Preview
command button. I use DoCmd.OpenReport stDocName, acPreview to run
the
report and open the preview window. Currently I can only open one
preview
window. What I'd like to be able to do is have the User select
different
report parameters and display those in seperate preview windows (have
mutliple preview windows open). Is there a trick for that?

Thanks, Mike
 
Back
Top