As the title says, I would like to display an underline character _ in a dynpro field text. Is it possible? I have tried every possible option in the field text attributes.
PS: I know P_BUKRS is not the best name, it's just to show the issue.
Instead of text fields use an input field and set it to output only. Then you can set the text during PBO which will show underscores.
DATA: lbl_bukrs(7).
MODULE init.
lbl_bukrs = 'P_BUKRS'.
ENDMODULE.
Here is a quotation from SAP Help.
If the text consists of several words, they are joined together automatically by underscores, which are replaced by spaces at runtime.
Based on that the answer would be no, it is not possible for a text field to display underscores because they will be replaced by spaces at runtime anyway.
Related
I'm trying (and failing) to fill out a text box (TextFrame) in Publisher using a macro from content in a Word table. I'm trying to do something along the lines of:
With doc.Pages(1).shapes(1)
.GroupItems.Item(8).TextFrame.TextRange = table.Cell(2, 3).Range.FormattedText
End With
The source text from table has a bunch of font formatting that I need in the text box but it won't seem to be able to copy over the formatting and I just get the plain text. Any ideas on how to get this working properly?
Edit: It seems like TextFrame can't accept formatted text at all. Is there any way around this?
In Word TextFrame.TextRange returns a range which has a FormattedText property. The usage for that would be:
.GroupItems.Item(8).TextFrame.TextRange.FormattedText = table.Cell(2, 3).Range.FormattedText
In your code you haven't specified which property of the TextRange you want to assign the formatted text to. This means it will be assigned to the default property, Text, which is just a string and cannot contain any formatting.
Golden Rule: never rely on default properties, always specify the
property you want to use.
Given that you appear to be taking a value from Word into Publisher you should be looking at the documentation for VBA in Publisher which shows you that the TextRange object in Publisher does not have a FormattedText property, so you cannot take formatting across using this method.
Suppose we have following selection screen:
PARAMETERS: d_char OBLIGATORY.
WRITE d_char.
When the user enters ! in this field of selection-screen and runs the program, it still prompts for required entry in this field.
Why?
You can find the answer in the documentation for Dynpro Fields.
When dynpro fields are received from input fields on the screen, input fields are templates that expect a certain format depending on the data type of the underlying dynpro field. When passed to the dynpro field, the input is converted to a value of the appropriate type. This also means that some characters function as special characters by default.
The "!" character in the initial position of an input field on the screen deletes all characters in the field before the data transport.
The "=" character in the initial position of an input field on the screen initiates a search using search helps.
If an input field contains only blanks and "_" characters, the latter are transported as blanks.
To deactivate the template and also the modifying effect of special characters, the attribute Without Template can be activated in Screen Painter. However, the template cannot be deactivated for selection screens.
Define the parameter as TYPE STRING and you will receive the ! as well as the = or even a space.
I need to replace a specific string in a MS Word with text of Rich Text Box. I have achieved my that using the following code.
objDoc.Content.Find.Execute(FindText:="Comments1", _
ReplaceWith:=COMMENTS.Text, _
Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll)
But, What my actual requirement is.. I want to replace it by exact text of rich text box with alignment.
For example :
Kindly add the title to you article,
Kindly add the abstract to your article
the above text is the content of rich text box.
But, in my word document it replaced as
Kindly add the title to you article, 2. Kindly add the abstract to your article
Have you noticed that ? After the 1st point I have hit enter key and then only I have give 2nd point.
But, resultant text are concatenated with the 1st point.
So, what to do to get exact text with alignment of rich text box in my word document.
I seem to recall something about Rich Text Box using vbLf for line feeds instead of vbCrLf, which I believe is what MS Word would expect to be used for a line feed. You might try something like this (air code):
objDoc.Content.Find.Execute(FindText:="Comments1", _
ReplaceWith:=COMMENTS.Text.Replace(vbLf, vbCrLf), _
Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll)
Is there any way to force a data grid column's header label to be empty? So far I tried to leave the label property empty, enter a single space, both as fixed text and using ssjs code. But unless I assign some "real" character to the label property the header shows the column's name.
Right now I "resolved" this using css, but since there are only generic style classe for all the column headers I needed to "hack" this using
.dojoxGridMasterHeader th.dojoxGridCell[idx="0"] div.dojoxGridSortNode{display:none}...
So I need to address each column by itself just to accomplish the same thing. Not nice.
Anyone having a better idea?
Lothar
Use a non-breaking space '\u00A0' as data grid column's header label.
<xe:djxDataGridColumn
id=...
field=...
label="#{javascript:'\u00A0'}">
I am attempting to format an expression in SSRS with an HTML code and am getting #Error tossed upon report preview. My expression looks as follows:
="<b>Region: </b>" + Fields!RegionID.Value
I have also ensured that HTML - Interpret HTML tags as styles has been selected under Placeholder Properties. Has anyone experienced this behavior before?
Thanks!
In SSRS 2008 and above, you can use placeholders to achieve this.
See Formatting Text and Placeholders for more details.
To give a quick example, in a textbox, enter some text then right click on the empty space to the right of the text:
You can set the placeholder properties to display your required field in the Value property:
You now have two distinct text parts in the textbox that can be formatted independently, e.g. one bold and one normal: