Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 2 Monaten
Letzter Beitrag:
vor 3 Jahren, 2 Monaten
Beteiligte Autoren:
Stefan Bentvelsen, Alexandre Leclerc

[WD19] Watermark with text in printing language

Startbeitrag von Stefan Bentvelsen am 01.04.2015 14:38

Hi all,

I use a Watermark variable to print a watermark on an invoice. The invoice language is set before by iPrintingNation() to German or English depending on the language set in the customer record. Is it possible to make the watermark text (i.e. 'Confidential') also in the printing language ?

In fact, you have to create the watermark variable before printing the report and also his text content. So if my Nation() is Dutch, I want to set the watermark text in a specific (iPrintingNation) language. Is this possible ? How ?


Hi Stefan,

In such a case you are responsible to send the good string-language to use to the report. The other solution is to use Nation() but this is result in visual undesired results.

The other solution is to have your watermark strings in the report, or at least in global multilangual strings. Then you pass to the report the watermark "id" you want to use in the report. At that point the report will get the watermark multilangual string from it's ID in an array, whatever, and it will display in the good language.

gtabWM is an array of strings ["Multi-lingual Watermark 1","Multi-lingual Watermark 2"]


// In your report
PROCEDURE MyReport(nWM is int=0)
let sWatermark = nWM > 0 ? gtabWM[nWM] ELSE ""

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 01.04.2015 15:28
Hi Alexandre,

Thanks for your response, but I don't really understand the last step of your work-around. Indeed, I can use global multilingual messages. But in my report I cannot change the text of my Watermark variable anymore. It is not a simple string sWatermark, it is a special variable type in WinDev and I would not know how to chache the value from within my report.

I have tested it with a global Watermark variable, but without result. Ones set before the call of my report, changing the text in my report doesn't change the end result. It stays the same value, set before the call of my report.

As another work around I have set the value (before calling my report) in a simple SWITCH statement with a case for each possible printing-language en simple literals as values.

Thanks anyway for your help.

von Stefan Bentvelsen - am 01.04.2015 19:28
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.