This topic is locked

Truncating Text fields

3/16/2006 10:10:06 AM
ASPRunnerPro General questions
M
mriley2728 author

I have 2 large text fields that I need to have truncated on the list page but I would like to have the full view on the printer friendly page. How can I accomplish this?

Sergey Kornilov admin 3/17/2006

Hi,
go to the Miscellaneous Tab, check off Truncate large text fields and set Characters to display.

M
mriley2728 author 3/17/2006

That changes it in both the list view and the printer friendly version. I was hoping I could have it trucate in the list view but have all the content on the printer friendly version.

Sergey Kornilov admin 3/17/2006

Please open include/..._aspfunctions.asp, find ProcessLargeText function and make following changes:

if vNumberOfChars>0 and mode=MODE_PRINT then

' ProcessLargeText = Left(ProcessLargeText, vNumberOfChars )

' if len(strValue)>vNumberOfChars then

' ProcessLargeText = ProcessLargeText & " ..."

' end if

exit function

end if

M
mriley2728 author 3/20/2006

THANK YOU THANK YOU THANK YOU!!!

N
netpoint 2/22/2008

Hi _ I am using ASPrunner 5.2 (build 391) and want to do the same, however I cannot find a ..._aspfunctions.asp file in the include folder (where ... is presumably the name of the page/table, in my case this would be 1g_Sp2Y11FR_aspfunctions.asp), please could you let me know how to do this?

Sergey Kornilov admin 2/22/2008

In the latest version check include/commonfunctions.asp file.

N
netpoint 2/22/2008

Hi - I also got a reply by email from Jane that worked very well without having to delve into the depths of asp programming, as follows...

____
you can do the following:

  1. edit SQL query on the "Edit SQL query" tab.

    Here is a sample:

    -------------------------------------------

    select FieldName1,

    FieldName2,

    FieldName2 as FieldName2View

    from TableName

    -------------------------------------------
  2. check off FieldName2View on the view page only on the "Choose fields" tab and setup it as HTML on the "View as settings" dialog on the "Visual Editor" tab.

    To open "View as settings" dialog double click on the field.