Put graphics behind the text in the same window of SapScript - forms

I need to put a .bmp of a stamp behind some text in a sapscript form - in one window.
I've uploaded the bitmap of the stamp by using the se78, I uploaded it as standard text.
I'm already done some testing. This is what I got so far:
/: INCLUDE Z_ADRS_SIGN_CN30 OBJECT TEXT ID ADRS LANGUAGE EN
/: INCLUDE 'Z_SIGN_STAMP_CN30' OBJECT TEXT ID ST LANGUAGE EN
This is working, but the stamp gets printed under the text.
If I switch the code-lines, the stamp gets printed above the text.
Now to my question: Is there a way to print the stamp behind the text in one window ? And if yes, how?

It can be done, but it's better to use SmartForms for this, because it can print watermarks natively.
For SapScript:
Create SO10 text element and insert graphics object there
Put this statement into your text element
BITMAP 'YOURBMP' OBJECT GRAPHICS ID BMAP TYPE BCOL.
In the MAIN window of your form put these statements
INCLUDE BMP OBJECT TEXT ID ST.
NEW-WINDOW.
The key point here is NEW-WINDOW statement. It opens new window oon the page explicitly and prints all consecutive SapScript statements in the new window.

Related

How to autoupdate an MS word field based on typed text?

Is there a way to automatically update the content of a word field based on a text I type?
i.e. I have a table with two cells. The left cell contains a QR Code generated by
{ Displaybarcode "Just a Text " QR \s 40 \t }
The rigtht cell contains "Just a text"
Is there a way to update the QR code (actually a word field) based on what I type in the right cell?
So, if I change the text to "I just changed that text!"
I would get this:
I do not mind pressing Ctrl-F9, but I would not want to edit the field itself.
Is that possible?
Dan
I would put the area for the text in a mapped Content Control and use a copy of that control in the DisplayBarCode field as the text portion. The field would need to be updated.
Here is another Add-In to produce Mapped Content Controls by MVP Graham Mayor.
Here is a video by Laura Townsend on how to do it yourself.
Here is the Walkthrough page on mapping to an XML part from Microsoft.

JTextArea appending and deleting problems

I have a jTextArea that displays the clicked item from a jTable. I have a running code already and I am able to display the strings into my jTextArea. However, I have an issue whenever I try to remove a string.
So far, below is my code for getting the string value from the clicked item in jTable:
c = jTable2.getModel().getValueAt(jTable2.convertRowIndexToModel(selectedRow), 1).toString(); // this will get the name of product from a table and store it into C variable
The string from above code will be displayed on my jTextArea, as shown below:
jTextArea1.append(c + "\n");
Now, whenever I click an item to my jTable this will be stored into c variable, and the new item will be appended on my jTextArea with next line.
My sample output in jTextArea of this will be:
Apple
Mango
Now, I want to delete a specific string from that jTextArea, which I am able to do so in my current code. I am using this line of code to do that:
jTextArea1.setText(jTextArea1.getText().replaceAll(c, ""));
But then, whenever I clicked my jTable once again to append a new item, it will be appended next to the empty string, sample output is like this:
// from here is the beginning of the jTextArea
Mango
Apple
Now, I got empty strings before the new text is displayed.
In conclusion, I have understood that I never deleted an item from my jTextArea, but what it did was only to replace the string into an empty one. My problem is that I want to be able to append a string, then delete it whenever I need to do so without affecting the other appended strings, and without having an empty string.
Is there any other way to achieve this in replacement of my "replaceAll" line of code?
What you are asking for is analogous to editing a line of text to delete something in the middle. Naturally, you usually do not want a gap. One way to do this would be to copy the line over character by character but with a rule that if a space was preceded by a space it will not be copied (or, if a space comes up and is copied, then only characters will be copied that are not a space in that instance).
You could copy a series of records by reading each string, checking whether it had only spaces in it, and adding that string to the second screen only if it was other than white space.

How can i create a textarea that has read and write lines using gtk

Any one know how i can create a text area which displays lines of text which can not be edited but allows you to edit the bottom most line for text.
basically in a similar fashion to embedded consoles inside applications that allow you to run code direct on the application.
currently using a textview i can go and edit the code above and the output response are also editable.
It's possible using a GtkTextView, but not trivial. You have to create a tag that makes the text uneditable, and apply it from the beginning of the buffer to just before the end position. Then when you receive and process input, extend or re-apply the tag to cover that line of input and your program's response to it.
Here's an example of it being done:
creating the tag
applying the tag

Insert a table in an unalterable format into a Word 2010 file while retaining font size and sharpness

I am trying to insert a table in an unalterable format into a Word 2010 file while retaining font size and sharpness.
So far, I have tried preparing the table as a pdf, then using Insert -> Object -> Adobe Acrobat File to get it into Word. Unfortunately, this inserts the table within margins automatically created on the Word page, and distorts lines and font size within the table.
Here are some things I've tried:
- Setting the margins of the page in the recipient Word file to 0" before importing the pdf.
- Printing the pdf on on a smaller page (7" x 9") then importing onto a page 8.5" x 11".
Neither worked; the imported pages were resized and the table printed badly.
The pdf I used was prepared from Word using PrimoPDF.
Please feel free to suggest formats other than pdf for the transfer if they can be more easily incorporated into the final Word document.
Your help will be appreciated.
First, prepare the table as a Word document. Go to the Review tab, and select Restrict Editing. Set Editing Restrictions to allow No changes (Read only). Press Yes, Start Enforcing Protection. Save file.
Next prepare the recipient document in Word. Go to the Insert tab, select Object, Create from File, and browse to find and insert the file.
The table will be inserted into the recipient Word file as a document within a document, and its 'Read Only' protection is maintained. All fonts and line styles remain as originally set.

How to handle variable width FieldObjects in Crystal Reports

I have a Crystal Report which is viewed via a CrystalReportViewer control on an .aspx page (using VS2008).
The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same line beside each other.
Problem is when the text in the first FieldObject is too long it overlaps the text in the second FieldObject.
I have tried setting the 'CanGrow=True' and 'MaxNumberOfLines=1' on the first FieldObject to 'push' the second FieldObject further to the right, but this didn't work.
How do I get the second FieldObject to always display immediately after the first FieldObject regardless of the length of the text in the first?
Cheers in advance of any knowledge you can drop.
you can add a text object to the report. And while editing the text of the text object, drag the field you want to show from the object explorer into the text box. Then hit space, then drag the second field in to the same text box. Your two fields will always be one space a part. You could, of course, add more spaces or any other text you want.
Or you can create a function which returns field1 + " " + field2 and add the function to the report.