Printing File Path on Reports - Missing \ (backslash)

scheduschedu Member Posts: 12
Hi,

i want to print a file path on a report.

There is a text variable holding the path received from a record.
This variable is filled the path and text variables using strsubstno. The result looks like this "File: D:\Filename.pdf" .
The strange thin is that if i print this text in a section the report only shows "File: D:Filename.pdf" without \.

I used message('%1',Text) to see the text on the screen and \ is there.
I already tried to use strsubstno('%1',Text) in SourceExpr of the text box control with no success.

Does anyone have a hint for me, how i can show the path on the report correctly?

Thanks!

Best regards,

schedu

Answers

  • geordiegeordie Member Posts: 655
    Did you trying substituting "\" with "\\"?
  • scheduschedu Member Posts: 12
    Hi geordie,

    thanks, your solution is working :thumbsup: . Can you explain this to me why i need two "\\", so i can understand it?
    I did fill the variable manually so I will need to find a solution for changing "\" to "\\" in a function.

    Best regards,

    schedu
  • geordiegeordie Member Posts: 655
    Because "\" is the character for carriage return: is it possible to avoid it duplicating the character itself or, if you don't need it, switch to "No" MultiLine property of the TextBox. :wink:
  • scheduschedu Member Posts: 12
    Hi geordie,

    GREAT - that's the key!!! I was using the multi line option for this textbox on the report. After disabling this option everything is displayed correctly without changing the Path!
    I know this "carriage return" function from messages but not the impact on reports.

    Thank you very much!

    Best regards,

    schedu
Sign In or Register to comment.