Results 1 to 3 of 3

Thread: Datareport question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Medford,MA,USA
    Posts
    23
    Can you programatically change the caption property of a label in a data report? Looks like the caption property of a label in a Data Report designer is available only during design time.
    rptlabel1.Caption = "Microsoft" does not work!!
    Any thoughts
    Zack

  2. #2
    New Member
    Join Date
    Apr 2000
    Posts
    1

    Dynamically change DataReport labels at run-time

    In order for you to dynamically change VB DataReport labels, you have to use the Sections/Controls properties of the DataReport.

    Code ex.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rpt01.Sections("sctRptHdr").Controls("lblBeginDate").Caption = "11/01/1998"
    rpt01.Sections("sctRptHdr").Controls("lblEndDate").Caption = "11/30/1998"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    The above code will change the label caption of the "lblBeginDate" label in the "sctRptHdr" section of the report to "11/01/1998" and change the label caption of the "lblEndDate" label in the "sctRptHdr" section of the report to "11/30/1998".

    You just have to change the names in parenthesies to the names associated with the Section and Control that you want changed at run-time.

  3. #3
    Member
    Join Date
    Nov 1999
    Location
    Manila, Philippines
    Posts
    59
    Wow, that's really cool. But i have a question.....

    How can i show in my reports multiple children commands with same level.

    thanks

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