Want to apply tab

Body3 = LOND
This is string variable.value of body3 are vary weekly.

Now I want the result like

Supplier: LOND
Distributor: NORW
Batch No: 9997
Total: 789.44

I used code
“Supplier:” + vbNewLine + “Distributor:” + vbNewLine + “Batch No:” + vbNewLine + “Total:” + vbtab + Body3

but this fails
Help me to get proper output.

Want result like this image

Use Environment.Newline for newline

after field title add the variable that contains the value.

"Supplier Name: " + strSupplierName + Environment.Newline


You are almost done
Just a small change is required

Hope the below expression would help you resolve this

“Supplier:” + strvariable_1 + Environment.Newline + “Distributor:” + strvariable_2 + Environment.Newline + “Batch No:” + strvariable_3 + Environment.Newline + “Total:” + strvariable_4 + Environment.Newline

But why you would like to have a tab here

Cheers @rutuja.y

Means I need to declare 4 separate variable to store value right?

1 Like

Fine in that case if the input string has the values with NewLine in between them like this

Strvariable_1 = Split(strinput.ToString,Environment.NewLine.ToArray())(0).ToString

similarly in other ways

Like this

Strvariable_2 = Split(strinput.ToString,Environment.NewLine.ToArray())(1).ToString

Strvariable_3 = Split(strinput.ToString,Environment.NewLine.ToArray())(2).ToString

Strvariable_4 = Split(strinput.ToString,Environment.NewLine.ToArray())(3).ToString

Cheers @rutuja.y

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.