Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How can I use a VB.NET function in a crystal reports "Details" section?

How can I use a VB.NET function in a crystal reports "Details" section?

Scheduled Pinned Locked Moved Visual Basic
questioncsharpasp-netdatabase
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MAP Tiger
    wrote on last edited by
    #1

    Hi I am relatively new to Reporting in VB.NET. Actually I am asked to retrieve a report which would basically contain some items with extensive calculations which I already constructed for on-screen display, now while creating crystal reports I didnt find the way to refer to that function so that on each retrieval of the database value, report will pass it to a function of VB.NET and then the function will return the value to display in the report i.e.

    Private Function CAmt(ByVal Amt as integer) as String
    Select Case Amt
    Case 1
    Return "One"
    Case 2
    Return "Two"
    Case Else
    Return amt.tostring
    End Select
    End Function

    Hope you got what I mean to say. Please help me asap. Regards,

    MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

    R N S 3 Replies Last reply
    0
    • M MAP Tiger

      Hi I am relatively new to Reporting in VB.NET. Actually I am asked to retrieve a report which would basically contain some items with extensive calculations which I already constructed for on-screen display, now while creating crystal reports I didnt find the way to refer to that function so that on each retrieval of the database value, report will pass it to a function of VB.NET and then the function will return the value to display in the report i.e.

      Private Function CAmt(ByVal Amt as integer) as String
      Select Case Amt
      Case 1
      Return "One"
      Case 2
      Return "Two"
      Case Else
      Return amt.tostring
      End Select
      End Function

      Hope you got what I mean to say. Please help me asap. Regards,

      MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

      R Offline
      R Offline
      Rupesh Kumar Swami
      wrote on last edited by
      #2

      you can create formula(say Camt) in formula editor. Now within editor window choose database field and then use if else operator . See link Create formula in crystal report hope this helps

      Rupesh Kumar Swami Software Developer, Integrated Solution, Bikaner (India) My Company Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11

      1 Reply Last reply
      0
      • M MAP Tiger

        Hi I am relatively new to Reporting in VB.NET. Actually I am asked to retrieve a report which would basically contain some items with extensive calculations which I already constructed for on-screen display, now while creating crystal reports I didnt find the way to refer to that function so that on each retrieval of the database value, report will pass it to a function of VB.NET and then the function will return the value to display in the report i.e.

        Private Function CAmt(ByVal Amt as integer) as String
        Select Case Amt
        Case 1
        Return "One"
        Case 2
        Return "Two"
        Case Else
        Return amt.tostring
        End Select
        End Function

        Hope you got what I mean to say. Please help me asap. Regards,

        MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

        N Offline
        N Offline
        Nanda_MR
        wrote on last edited by
        #3

        If u want retrieval of the database value. U can use the SQL statement and assigned respected fields.

        1 Reply Last reply
        0
        • M MAP Tiger

          Hi I am relatively new to Reporting in VB.NET. Actually I am asked to retrieve a report which would basically contain some items with extensive calculations which I already constructed for on-screen display, now while creating crystal reports I didnt find the way to refer to that function so that on each retrieval of the database value, report will pass it to a function of VB.NET and then the function will return the value to display in the report i.e.

          Private Function CAmt(ByVal Amt as integer) as String
          Select Case Amt
          Case 1
          Return "One"
          Case 2
          Return "Two"
          Case Else
          Return amt.tostring
          End Select
          End Function

          Hope you got what I mean to say. Please help me asap. Regards,

          MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

          S Offline
          S Offline
          salaikumar
          wrote on last edited by
          #4

          If you can access the Amt field in crystal report, then create a formula with some name, and go to edit(formula editor). Write the logic there.. like if Amt = 1 then "One" else if Amt = 2 then "Two" else Cstr(Amt)

          Salai

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups