Skip to Content
author's profile photo Former Member
Former Member

Passing a string with more than 255 characters to Smart form

Hi,

I need to pass a string with more than 255 characters to smart form. This string will be displayed in a table with a certain column size (say 80 characters) in the smart form. Smart form will automatically truncate and append to the next row if the length of the string exceeds the column size.

However, smart form seems to only accept strings equal or shorter than 255 characters. Any strings longer than 255 characters will have the extra characters removed in smart form.

An option I could take is to first break the string (eg 300 characters) into smaller lengths (80 characters, equal to column size) and pass these new strings to the smart form. I use the word wrap function module to break up the string. But, I faced quite a bit of issues with the way smart form calculates how many characters a column of size 80 can accommodate. A column of size 80 characters does not mean it can display 80 characters. It depends on the font type and font size. I am unable to get a precise measurement.

I discover that if I pass in a string longer than the column size to smart form, smart form is able to word wrap the string nicely. Therefore, I would like to let smart form handle the word wrapping. But my problem is how can I pass in a string of more than 255 characters?

I apologize for my long-winded story. Any advice is appreciated. Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jan 15, 2008 at 03:43 PM

    split it into two variables and pass it to smartform. or write your code using program lines.

    regards,

    Sairam

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      To split the original string into 2 or more variables, I need to define the number of characters for each variable. But I am unable to calculate how many characters smart form can display in a row. Even if I set the row size to 80, it does not mean that the row will display 80 characters. Capitalized characters takes different amount of space in smart form. I can play safe by setting each variable to contain only a small number of characters, but there will be a lot of empty spaces in the print out.

      May I know what you mean by writing my code using program lines?

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 11:04 PM

    Hi I am also facing the same problem with string in smartforms.

    I am trying to concatenate values into string and display in smartforms, but its truncating the value from string in output.

    Can you please help me to fix this, its really really urgengt

    Thanks

    Ramya

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ramya,

      My string is actually a long text. So instead of passing the string to smart form, I created an 'include text' in smart form to read the long text directly and let smartform do the wrapping.

      You might want to consider the use of FM save_text and read_text. See if it helps.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 09:36 AM

    Use include text.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.