Results 1 to 6 of 6

Thread: Dynamically Changing Report's Label Caption

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Raleigh, NC
    Posts
    4

    Unhappy Dynamically Changing Report's Label Caption

    Does anyone know how to dynamically change a label caption from within a VB report? Doing this in Powerbuilder is really easy, but I found nothing regarding this on VB Reports. HELP!!!

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Something like this:

    Code:
    Me.Sections("Section4").Controls("Label1").Caption = "This is a new caption"
    Hope this helps,

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Raleigh, NC
    Posts
    4
    Thanks Negative0... You're certainly a Positive dude!

    Q2: Is it possible to load a report without having to create a DataEnvironment - I mean to create a report with dumb values - with no DB connection or query, just to see a couple of labels and print it?

    Thanks again!

    Juba

  4. #4
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Nope, The data report requires some sort of database link. You do not have to create a dataenviroment for it though. You can set the database through code.

    Dim rs as new ADODB.Recordset
    rs.open "SELECT * FROM TABLE",objConn,adOpenForwardOnly, adLockReadOnly
    set Me.DataSource = RS

    Hope this helps,

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Raleigh, NC
    Posts
    4
    Thanks man, It really helps!!!

    Best regards,

    Juba

  6. #6
    Registered User
    Join Date
    May 2013
    Posts
    2

    Re: Dynamically Changing Report's Label Caption

    is this also applicable to data report textboxes?

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