12-20-2022 07:59 AM - last edited on 05-03-2023 09:12 AM by JackLacava
Hi Team,
I'm wondering if there's a parameter that can be used in OS for a new line?
I mean there's already a |SPACE|, which works perfectly, but I would need such parameter for new line (like \n in VB.NET), any ideas?
Thank you!
12-20-2022 09:26 AM - edited 12-20-2022 09:29 AM
Are you wanting to produce a multi-line text string?
Have you tried System.Environment.NewLine ? ( this would be the line separator as defined on the computer type , as opposed to a fixed constant)
( The legacy VB constant vbCrLf will also put a newline into a string, but that was more hard-fixed to a Windows mindset of CRLF, so should not be a problem on Windows , but then... )
12-20-2022 09:31 AM
Hi Chris,
Thanks for your reply. Actually I wanted to use it in Cube View to create a 2 lines with text in one cell.
Unfortunately I can use only parameters there, as System.Environment.NewLine seems not to be working.
Thank you!
12-20-2022 09:52 AM
The System.Environment.NewLine is for business rules of course, but you didn't say that this was something that you needed for CubeViews.
Where are you attempting to put multi-line text? Is it in a column header, row header, or in the data cells as part of a V#Annotation (cell detail) view? The Data Explorer view will not show multi-line text reliably on row/column headers (may have cropping issues) : you can use an XFBR expression to run an XFBR rule to return a multi-line string; just no guarantee how it will look in the Data Explorer view. This is how mine looks:
Row definition: A#16000:Name(XFBR(CubeViewLists,GetMultiLineText))
Cell detail text (such as V#Anotation view) Also won't display multi-line text in the Data Explorer view.
Even if you have a DynamicCalc that returns a successful multi-line string, the CubeView will show the text on one line.
For Report View output, the same limitation applies I believe ( it still displays multi-line text on a single line )
12-21-2022 04:08 AM
I'm trying to put multi-line in column header. I really like your solution with XFBR rule, can I see how you built it - (XFBR(CubeViewLists,GetMultiLineText)) ?
12-21-2022 08:05 AM
This is the source code used in my XFBR rule example:
If args.FunctionName.XFEqualsIgnoreCase("GetMultiLineText") Then
'-- XFBR(CubeViewLists,GetMultiLineText)
Dim str As String = "Line1" & System.Environment.NewLine & "Line2"
Return str
End If
12-22-2022 09:17 AM
Thank you for your time Chris, much appreciated!