locked
How to remove blank fields RRS feed

  • Question

  • User-2064811253 posted

    I am creating report in ASP.NET using crystal report, could you please help me out to remove the blank field between two columns data.ut

    I am getting data like below:

    Machine ID Machine Name Left Position Machine ID Machine Name Right Position
    TL1-SNL-0001 Single Needle Lock Stitch L-1 TL1-SNL-0101 Single Needle Lock Stitch R-1
    TL1-SNL-0002 Single Needle Lock Stitch L-2 TL1-SNL-0102 Single Needle Lock Stitch R-2
    TL1-SNL-0003 Single Needle Lock Stitch L-3 TL1-SNL-0103 Single Needle Lock Stitch R-3
    TL1-SNL-0104 Single Needle Lock Stitch R-4
    TL1-SNL-0005 Single Needle Lock Stitch L-4
    TL1-SNL-0006 Single Needle Lock Stitch L-5 TL1-SNL-0106 Single Needle Lock Stitch R-5
    TL1-SNL-0107 Single Needle Lock Stitch R-6
    TL1-SNL-0008 Single Needle Lock Stitch L-6 TL1-SNL-0108 Single Needle Lock Stitch R-7
    TL1-SNL-0009 Single Needle Lock Stitch L-7 TL1-SNL-0109 Single Needle Lock Stitch R-8
    TL1-SNL-0010 Single Needle Lock Stitch L-8
    TL1-SNL-0111 Single Needle Lock Stitch R-9
    TL1-SNL-0012 Single Needle Lock Stitch L-9
    TL1-SNL-0112 Single Needle Lock Stitch R-10
    TL1-SNL-0113 Single Needle Lock Stitch R-11

    But I need to get this data like below:

    Machine ID Machine Name Left Position Machine ID Machine Name Right Position
    TL1-SNL-0001 Single Needle Lock Stitch L-1 TL1-SNL-0101 Single Needle Lock Stitch R-1
    TL1-SNL-0002 Single Needle Lock Stitch L-2 TL1-SNL-0102 Single Needle Lock Stitch R-2
    TL1-SNL-0003 Single Needle Lock Stitch L-3 TL1-SNL-0103 Single Needle Lock Stitch R-3
    TL1-SNL-0005 Single Needle Lock Stitch L-4 TL1-SNL-0104 Single Needle Lock Stitch R-4
    TL1-SNL-0006 Single Needle Lock Stitch L-5 TL1-SNL-0106 Single Needle Lock Stitch R-5
    TL1-SNL-0008 Single Needle Lock Stitch L-6 TL1-SNL-0107 Single Needle Lock Stitch R-6
    TL1-SNL-0009 Single Needle Lock Stitch L-7 TL1-SNL-0108 Single Needle Lock Stitch R-7
    TL1-SNL-0010 Single Needle Lock Stitch L-8 TL1-SNL-0109 Single Needle Lock Stitch R-8
    TL1-SNL-0012 Single Needle Lock Stitch L-9 TL1-SNL-0111 Single Needle Lock Stitch R-9
    TL1-SNL-0112 Single Needle Lock Stitch R-10
    TL1-SNL-0113 Single Needle Lock Stitch R-11
    Sunday, March 15, 2015 10:23 AM

All replies

  • User1711366110 posted

    Hi shabuj,
      As per your case, I have shared my ideas below :

    1.Replace the blank space like below :

    replace({table.LeftPosition}, chr(10), "")
    
    replace({table.RightPosition}, chr(10), "")
    

    2.right click on the formula and go to format field and enable the option can grow

    3.Otherwise Manually shrink the those text field size.

    4.If you retrieve the data from sqlserver database then you can trim there itself like below

    Select
    MachineID,MachineName,
    REplace(LeftPosition,' ','')[LeftPosition],
    REplace(RightPosition,' ','')[RightPosition]
    from
    tableName
    

    Hopefully this will be helpful for you.
    -
    with regards,
    Edwin

    Friday, March 27, 2015 5:12 AM