Selasa, 25 Maret 2014

Re: [MS_AccessPros] Re: SubReports Help

 

Duane and all Others
My thankfulness & appreciation
Ahmed



On Monday, March 24, 2014 11:21 PM, Duane Hookom <duanehookom@hotmail.com> wrote:
 
I just uploaded a file "subreportheaders.zip" to the samples folder https://groups.yahoo.com/neo/groups/MS_Access_Professionals/files/1_Samples/.
 
Duane
 

To: MS_Access_Professionals@yahoogroups.com
From: a1_beshari@yahoo.com
Date: Mon, 24 Mar 2014 10:49:46 -0700
Subject: Re: [MS_AccessPros] Re: SubReports Help



Dear Crystal
Please if you can send me a file with your solution
Thanks
Ahmed



On Saturday, March 22, 2014 5:11 PM, Crystal <strive4peace2008@yahoo.com> wrote:
 
Hi Ahmed,

in the Page Header format code, assign the caption of a label control to the value in a module level variable variable.  Change the value of the variable in each

for example, I just tried this with my current database.  Here is code behind the main report:

'~~~~~~~~~~~~~~~~~~~~~~~~
'
 Dim msPageTitle As String 'module level string variable for Page Title
'

'~~~~~~~~~~~~~~~~~~~~~~~~
' function to set page title variable -- is called from subreport(s)
'
Public Function SetPageTitle(psTitleExtra As String)
'140322 strive4peace
   msPageTitle = "Set " & Me.SetID & IIf(psTitleExtra <> "", ", " & psTitleExtra, "")
End Function

'~~~~~~~~~~~~~~~~~~~~~~~~
'
'this is the section right after the section with subreports - just needs to be there, not contain anything
'
Private Sub GroupFooter0_Print(Cancel As Integer, PrintCount As Integer)
'140322 strive4peace

   'CALL SetPageTitle
   Call SetPageTitle("")
End Sub

'~~~~~~~~~~~~~~~~~~~~~~~~
' set the title on the page to be whatever is in the module level variable
'
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
'140322 strive4peace
   Me.Label_PageTitle.Caption = msPageTitle
End sub
'~~~~~~~~~~~~~~~~~~~~~~~~

here is code behind (each) subreport:
'~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
'140322 strive4peace
   'CALLs
   '   SetPageTitle from code behind parent report

   Dim sTitle As String
   sTitle = "Web Search Parameters" ' or whatever you want
   Call Me.Parent.SetPageTitle(sTitle)
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal

ChannelTracker
free Access database to scrape web pages
customized for YouTube videos and views
www.AccessMVP.com/strive4peace/ChannelTracker.htm

 *
   (: have an awesome day :)
 *




On Saturday, March 22, 2014 7:31 AM, ahmad beshari <a1_beshari@yahoo.com> wrote:


Duane
I done this but the group header will repeat for each record but i want it to be repeated only for the head of each page
Ahmed 


On Friday, March 21, 2014 2:29 AM, Duane Hookom <duanehookom@hotmail.com> wrote:
 
Ahmed,
 
As suggested, you need to replace Page Headers with Group Headers and set the Repeat Section to Yes.
 
If you don't have an appropriate field to use for grouping, you can use an expression like =1.
 
Duane Hookom MVP
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: a1_beshari@yahoo.com
Date: Thu, 20 Mar 2014 09:28:10 -0700
Subject: Re: [MS_AccessPros] Re: SubReports Help



OK
Let us took about only one subreport it will skip to the next page how can i repeat the subreport page header each page
Thanks
Ahmed


On Wednesday, March 19, 2014 8:22 PM, Duane Hookom <duanehookom@hotmail.com> wrote:
 
Place a group header as needed in your subreports and set it's Repeat Section to Yes. Use this as a pseudo Page Header.
 
Duane Hookom MVP
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: a1_beshari@yahoo.com
Date: Wed, 19 Mar 2014 11:07:08 -0700
Subject: Re: [MS_AccessPros] Re: SubReports Help



Bill
This is not the point i need
I have 2 subreports according to the amount of data maybe subreport1 or subreport2 will continue to the second page so i have to repeat the subreport header in the second page so first if have to check if any of my subreports will continue to the second page.
Notes(Both of my subreports maybe will be printed in the same page no extra pages)
            Maybe subreport1  will have no data but subreport2 will have data
Maybe subreport2 will have no data but subreport1 will have data
Thanks
Ahmed



On Wednesday, March 19, 2014 7:21 PM, "wrmosca@comcast.net" <wrmosca@comcast.net> wrote:
 
Ahmed
Put your header on the main page with the subreport in it. Set the header property to repeat on all pages.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <a1_beshari@yahoo.com> wrote :

Dear All
I have a report with 2 subreports,each subreport may continue to the second page i want to know which subreport will continue to the second page and if it will continue to the second page how to add a subreport header in the second page
Thanks in advance
Ahmed




















__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (12)
.

__,_._,___

Tidak ada komentar:

Posting Komentar