Results 1 to 7 of 7

Thread: data report of vb6 - page header problem...

  1. #1

    Thread Starter
    Addicted Member jeanette_db's Avatar
    Join Date
    Oct 2005
    Location
    DC, Phil
    Posts
    215

    Unhappy data report of vb6 - page header problem...

    i have a report wherein some data in the page header section change everytime the value of a certain field changes...

    example:
    the data is grouped by batch#....

    if batch# field's value = 001
    the header becomes = 'RECEIPTS REGISTER'
    if the value = 002
    the header becomes = 'INVENTORY SUMMARY'
    ... AND so on....

    the batch# is in the details section...
    the header is in the page header section....

    then, after every changes in batch# field, there is a page break...

    how will i manipulate it? i am using vb6's data report... anybody help me out? i really need it badly....
    I learnt to plant my own garden instead of
    waiting for someone to bring me flowers
    visit my blog...

  2. #2
    Addicted Member
    Join Date
    Jun 2006
    Location
    Virac
    Posts
    129

    Re: data report of vb6 - page header problem...

    Try this!

    VB Code:
    1. Dim rptDataReport As DataReport1
    2.     Dim strHeader As String
    3.    
    4.     Set rptDataReport = New DataReport1
    5.    
    6.     If BatchNo = "001" Then
    7.         strHeader = "RECEIPT REGISTER"
    8.     Else
    9.         strHeader = "INVENTORY SUMMARY"
    10.     End If
    11.    
    12.     rptDataReport.Sections("Section4").Controls.Item("lblHeader").Caption = strHeader
    13.     rptDataReport.Show

  3. #3
    Addicted Member
    Join Date
    Jun 2006
    Location
    Virac
    Posts
    129

    Re: data report of vb6 - page header problem...

    BTW, you should have a rptLable in the header section (Section4) of the datareport and name it "lblHeader". Or whatever you call it....

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: data report of vb6 - page header problem...

    Moved to reporting section

  5. #5

    Thread Starter
    Addicted Member jeanette_db's Avatar
    Join Date
    Oct 2005
    Location
    DC, Phil
    Posts
    215

    Unhappy Re: data report of vb6 - page header problem...

    Quote Originally Posted by boyet0911
    BTW, you should have a rptLable in the header section (Section4) of the datareport and name it "lblHeader". Or whatever you call it....
    thanks for that but i dont think it will work the way i want it.
    i want a report wherein everytime the batch# changes,
    it will print to the next page and its header changes too....

    how can i do this?
    I learnt to plant my own garden instead of
    waiting for someone to bring me flowers
    visit my blog...

  6. #6

    Thread Starter
    Addicted Member jeanette_db's Avatar
    Join Date
    Oct 2005
    Location
    DC, Phil
    Posts
    215

    Re: data report of vb6 - page header problem...

    anybody please help. i really need this badly... how can i manipulate the header... any suggestions? except for the "caption" method suggested above.... i already tried it... and it doesn't work the way i want it.... help...
    I learnt to plant my own garden instead of
    waiting for someone to bring me flowers
    visit my blog...

  7. #7

    Thread Starter
    Addicted Member jeanette_db's Avatar
    Join Date
    Oct 2005
    Location
    DC, Phil
    Posts
    215

    Re: data report of vb6 - page header problem...

    anybody please help...
    I learnt to plant my own garden instead of
    waiting for someone to bring me flowers
    visit my blog...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width