CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2000
    Posts
    1

    how to change content of page header setion in datareport

    I use datareport in vb6.0. I want to change the text of label or textbox on page header section at run time,how to do it?


  2. #2
    Join Date
    Jun 1999
    Posts
    32

    Re: how to change content of page header setion in datareport

    I have a very similar situation on an app I am developing now. I am using ADO without a Data Environment - just the Data Report. rsPrint is a recordset of a table in my dB. The way I modify a header label is with this sample code:

    With rptDataReport
    set .DataSource = rsPrint
    .Sections.Item(1).Controls.Item(1).Caption = "This is a caption"
    end with



    Make sure the left hand side points to the label you want to change (controls.item(x) and (sections.item(x) is the header section). Also be very careful if you remove any controls from that section - the numbers will then point to different controls.

    HTH,
    Ken


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

Featured