Report display method

Hi,

I have a problem with displaying a specific field in the report (body section). Let’s assume that I have the following records in the table:

String1

String2

String3

I would like to display instead of “String1” just 1. Could you give me an advice how should I do it?

Thank you.

Hi Paul ,

Can u pls elaborate your Question .

“I would like to display instead of “String1” just 1.” Pls give with one Example …

We have a field CollectionLetterCode in the CustCollectionLetterTrans table. For example we could have three transactions and each of them has a different CollectionLetterCode.

CollectionLetter1

CollectionLetter2

CollectionLetter3

What I would like to display on the report is just “1” not “CollectionLetter1”. So I can not use the field from the table. I want to create a method that will display it.

Hi Paul,

you can create a display method like this

display str yourmethod()

{

str yourStr;

yourStr = surSrt( CollectionLetter1, (strlen(CollectionLetter1) -1), 1); // will get only “1” from here

return yourStr;

thanks

Manish

Hi Paul,

Try this logic

/////////////

display str methodName()

{

str s, s1;
int len, i;

s = “CollectionLetter1”;

len = strlen(s);

for (i=1; i<=len; i++)
{
if (global::isInteger(substr(s,i,1)))
{
s1 = s1 + substr(s,i,1);
}
}

return s1;

}

//////////////////////////////