none
Split String Different Problem() RRS feed

  • Question

  • Hi Iam using VS2010. While generating rdlc report, Iam facing very different problem, really it's very very different.
     
    My requirement is once the field pty_name is having "," comma then I wish to make it as double line other wise single line.
     
    The below command works good, when my field pty_name is having comma.
    But suppose if there is no comma, then its giving error...
    IIf((InStr(1,First(Fields!pty_name.Value, "DataSet1"),",")=0),First(Fields!pty_name.Value, "DataSet1"),Split(Fields!pty_name.Value, ",")(0) & vbcrlf & Split(Fields!pty_name.Value, ",")(1))

    The below command works good, when my field pty_name is not having comma. But it's not
    adding the second part of string array

    IIf((InStr(1,First(Fields!pty_name.Value, "DataSet1"),",")=0),First(Fields!pty_name.Value, "DataSet1"),Split(Fields!pty_name.Value, ",")(0) & vbcrlf )

    So how to solve this? And guidances will be helpful..
    Thanks
    Thanks Again


    U.PARANTHAMAN

    Tuesday, June 3, 2014 1:11 AM