View Single Post
  #8  
Old November 19th, 2009, 06:50 AM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Can it still be dynamic in choosing the year to be reported

You could probably just use the TahunPel in the detail report and set its
criteria to the last 5 years.

Then your txt0 - txt4 would have values like:
=Year(Date())
=Year(Date())-1
=Year(Date())-2

The link child properties would need to be the year field.


--
Duane Hookom
Microsoft Access MVP


"Frank Situmorang" wrote:


Thanks Duane for your response. I appreciate your help again. Can the year choosed in the combo will still give the last 4 years? for example if we chosed in combo year 2009, the 2008,2007,2006, 2005 will be shown in the column header?

Also my proglems, because I have distributed the database to my other churches, only when I found it later for more persons per group ( like deacons) some/the very bottom rows do not show up or like truncated, So there is no more other ways to follow the pivot one?

OK I will try your suggestion too, but since my expertice Duane is acccounting, only because I like to give something to my churches, I make this as hobbies, so I appreciate like before you give a link so that I can download your sample using your proposal, because I am not expert in this Access.

Thanks very much,

Frank



Duane Hookom wrote:

I would create a main report based on a query grouped by Nurut
18-Nov-09

I would create a main report based on a query grouped by Nurut and
BedangPelayanan:

SELECT PelayanJemaat.Nurut, PelayanJemaat.BidangPelayanan
FROM PelayanJemaat
GROUP BY PelayanJemaat.Nurut, PelayanJemaat.BidangPelayanan

Create a subreport based on a query like:
SELECT PelayanJemaat.Nurut, PelayanJemaat.BidangPelayanan, NamaPel,
TahunPel, Forms!frmTahundipilih!cboEndYear-[TahunPel] as Yr
FROM PelayanJemaat
WHERE Forms!frmTahundipilih!cboEndYear-[TahunPel] In (0,1,2,3,4);

In the subreport display only the NamaPel field.

Add 5 text boxes across the Report Header section of the main report and set
the control sources and names like:

Name: txt0
Control Source: =0

Name: txt1
Control Source: =1

Name: txt2
Control Source: =2

Name: txt3
Control Source: =3

Name: txt4
Control Source: =4

Display the Nurut and BidangPelayanan fields in the detail section of the
main report.
Add 5 copies of the subreport across the main report detail section under
the 5 text boxes.
Set the Link Master/Child properties to match this pattern:

1st subreport
Link Master: Nurut, BidangPelayanan, txt0
Link Child: Nurut, BidangPelayanan, Yr


2nd subreport
Link Master: Nurut, BidangPelayanan, txt1
Link Child: Nurut, BidangPelayanan, Yr

3rd subreport
Link Master: Nurut, BidangPelayanan, txt2
Link Child: Nurut, BidangPelayanan, Yr

Make sure the main report detail section and the subreport can grow.
--
Duane Hookom
Microsoft Access MVP


"Frank Situmorang" wrote:

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
How to Get Your Silverlight Pages Indexed By Search Engines
http://www.eggheadcafe.com/tutorials...silverlig.aspx
.