Results 1 to 2 of 2

Thread: [Resolved] Set text in text box at run time to Crystal Report in ASP .Net

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    [Resolved] Set text in text box at run time to Crystal Report in ASP .Net

    I have the following code but it gives me a stack error. I simply want to place some text in a blank text box on my Crystal report at run time. I'm using VB .Net 2003 with Crystal Reports 10. The following code is in my CRViewer.
    VB Code:
    1. crpt.DataDefinition.FormulaFields.Item("Text2").Text = Session("PayDateRange")
    Can anyone tell me why this line of code is not working?

    Thanks
    Last edited by indydavid32; Jul 19th, 2004 at 11:25 AM.
    David Wilhelm

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Nevermind, I finally found the solution to this problem. Here it is.
    VB Code:
    1. Dim crTextObject As TextObject
    2.         crTextObject = crpt.ReportDefinition.Sections(0).ReportObjects.Item("Text2")
    3.         crTextObject.Text = Session("PayDateRange")
    David Wilhelm

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