How to send Multiple values for one formula field in crystal reports through vb.net?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhappy
    New Member
    • Jul 2007
    • 139

    How to send Multiple values for one formula field in crystal reports through vb.net?

    Hai All,

    Im creating 2 formula fields in my crystal reports for displaying empname and salary like this,

    abc 100
    xyz 200
    pqr 300
    in code behind im passing values to crystal report like this,
    vb.net code
    j=0
    for i=0 to noof emps
    rptDocument.Dat aDefinition.For mulaFields(j).T ext = ds.Tables(0).Ro ws(i).Item(i)
    j=j+1
    next
    It is printing only

    pqr 300
    ie, last record how to get all emp records at a time..?

    Thanks,
    Aswath.
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by bhappy
    Hai All,

    Im creating 2 formula fields in my crystal reports for displaying empname and salary like this,

    abc 100
    xyz 200
    pqr 300
    in code behind im passing values to crystal report like this,
    vb.net code
    j=0
    for i=0 to noof emps
    rptDocument.Dat aDefinition.For mulaFields(j).T ext = ds.Tables(0).Ro ws(i).Item(i)
    j=j+1
    next
    It is printing only

    pqr 300
    ie, last record how to get all emp records at a time..?

    Thanks,
    Aswath.
    why are you using Formula fields...?? Use dataset to populate records....and bind your report accordingly.... .One formula field can display one record at a time.....

    Comment

    • bhappy
      New Member
      • Jul 2007
      • 139

      #3
      Hai,
      Thanks for replay,
      Im displaying all fields like earnings and deductions and empname and salary,here no.of earnings and no.of deductions will increase or decrease depending on emp,so im not populating directly from dataset, Any other idea plz............ ....

      Thanks,
      Aswath.

      Comment

      • bhappy
        New Member
        • Jul 2007
        • 139

        #4
        Hai All,

        plz any one help me its urgent......... .....

        Thanks,
        Aswath.

        Comment

        • bhappy
          New Member
          • Jul 2007
          • 139

          #5
          Hai All,

          i tried like this

          for i=0 to noof emps
          rptDocument.Dat aDefinition.For mulaFields(j).T ext += ds.Tables(0).Ro ws(en).Item(i) + ";"
          next

          now im getting only last record, but it is assigning all values to formula field like 100;200;300.
          while displaying it is displaying only

          pqr 300,
          pqr 300
          pqr 300

          i think some property will be there to allow multiple values for formula field

          If anybody have any idea plz revert me back........... .....

          Thanks,
          Aswath.

          Comment

          Working...