I dont know if I explained correctly:
In this case the main report has no data, the subreport does have data. So I would like like to print the subreport without the main report.
Sarah
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Sarah-
Rajiv makes some excellent suggestions. I'm wondering why the data on the report and subreport aren't related.
Another trick with subreport controls: Make sure they have Can Grow set to True and design them on the report so that they have no border and are just 0.1" high. If there are no rows, the subreport won't expand beyond that. If there are rows, it'll expand to display them all.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Oct 22, 2014, at 8:03 AM, Rajiv torajiv@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:you can also tryPrivate Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.subrpt1.Report.HasData = True Then Me.subrpt1.Visible = False
Else Me.subrpt1.Visible =true
End If End SubOn Wed, Oct 22, 2014 at 11:25 AM, Rajiv <torajiv@...> wrote:SarahIf the report and subreport are not linked to each other why not have a report with two subreports instead of a report and subreport?In the onformat event on the parent report you can use a dcount function to determine the number of records of each report and then make the one with no records invisible.exampleif nz(dcount("[id]","qryOne"),0)=0 thenreport1.visible=falseelsereport1.visible=trueendifsimilarly for second report.RajivOn Wed, Oct 22, 2014 at 5:04 AM, sarahk@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:I have a report with a subreport. The data for the report and the subreport are coming from 2 different queries. If the report has no data, I would still like to print the subreport. But when I test for no data and cancel the report , it does not print the subreport. How do I do this?.
If I print the report with no data, it looks ugly, because there are '#error's printing on the report.
As always, thanks in advance for your help
Sarah
__._,_.___
Posted by: sarahk@schemesoftware.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar