Results 1 to 4 of 4

Thread: [RESOLVED] [2005] From DataReport to Crystal Reports

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Location
    Philippines
    Posts
    285

    Resolved [RESOLVED] [2005] From DataReport to Crystal Reports

    good day everyone.
    i've recently moved from VB6 to VB.NET. i have this application and it uses Crystal Reports for reporting. I have a control under the "Header" section and i want to set its value/text at run time. in VB6's datareport, i could just use the code below:
    Code:
        DataReport1.Sections(n).Controls(x).caption = "This is a test"
    How can i do this when using crystal reports? i have search the forum but i couldn't get the right solution. any help would be greatly appreciated.

    thanks.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Location
    Philippines
    Posts
    285

    Re: [2005] From DataReport to Crystal Reports

    never mind. i already found the solution.

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

    Re: [2005] From DataReport to Crystal Reports

    Moved to Reporting

    Post your solution as it might help others.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Location
    Philippines
    Posts
    285

    Re: [2005] From DataReport to Crystal Reports

    okay, here's how i did it.

    Code:
          Dim txtTemp As CrystalDecisions.CrystalReports.Engine.TextObject
          Dim xReceipt As New crReceipt
    
          With xReceipt
               txtTemp = .Section1.ReportObjects("txtTitle")
               txtTemp.Text = "This is a test."
          End With
    The crReceipt object is a crystal report document i made. under Section1 of the report, i have a TextObject named "txtTitle". using the code above, you can programmatically set the Text property of the TextObject before showing the report in the report viewer.

    Hope this helps.

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