Hello to all
i have a grid with a tooltip. this tooltip is defined as graphic Field with 15000 and ccsid(1200)
i must print this. i have the following Javascript:
printSelectedReports();
function printSelectedReports() {
alert('start');
var griddata = getObj("Grid01").grid.getAllDataValues(true);
var printWindow = window.open("", "", 'left=50,top=50,width=1200,height=800');
printWindow.document.write("<h1> <p>BOHLE Report</p> </h1>");
printWindow.document.write( '<font size="8" face="Courier" >');
// Grid lesen und drucken
for (var i=0; i<griddata.length; i++) {
//******************************************************************
// print if checkbox on
//******************************************************************
if (griddata.CHECKBOX == '1' )
{
var aHeader = griddata.FLD001 + ' ' + griddata.FLD002 + '<br><br>';
printWindow.document.write(aHeader);
//******************************************************************
// print Text ( Textarea / variable Tooltip )
//******************************************************************
var atextvalue = griddata.IMGTOOLTIP + '<br> <br>' ;
printWindow.document.write(atextvalue);
//var atextvalue2 = griddata.FLD003 + '<br> <br>' ;
//printWindow.document.write(atextvalue2);
//******************************************************************
// Ende Kennzeichen
//******************************************************************
var aEndText = '---------------------------------------------------------------<br>';
printWindow.document.write(aEndText);
}
}
//printWindow.document.write( '</font');
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
The variable atextvalue shows this characters
Does anyone have an idea how to print via Javascript graphic variables?
print out from grid array with graphic and ccsid(1200)
-
- New User
- Posts: 13
- Joined: Wed Nov 19, 2014 3:39 am
- First Name: Michael
- Last Name: Krautscheid
- Company Name: asMika
- Contact:
- matt.denninghoff
- Profound Logic Staff Member
- Posts: 115
- Joined: Wed Feb 10, 2016 3:53 pm
- First Name: Matthew
- Last Name: Denninghoff
- Company Name: Profound Logic Software
- State / Province: Ohio
- Country: United States
- Contact:
Re: print out from grid array with graphic and ccsid(1200)
Data from graphic fields are encoded in Base64 strings to prevent the HTTP server from trans-coding the original character's incorrectly. When Profound UI JavaScript reads the Base64-encoded graphic field data, then Profound UI decodes the Base64 string into a Unicode character string.
To read the raw grid data as you are attempting, you must decode the Base64 string. You can use the Base64-decoding function on the open-source version of the Profound UI framework, found here:
https://github.com/ProfoundLogic/profou ... pi.js#L915
To read the raw grid data as you are attempting, you must decode the Base64 string. You can use the Base64-decoding function on the open-source version of the Profound UI framework, found here:
https://github.com/ProfoundLogic/profou ... pi.js#L915
Who is online
Users browsing this forum: No registered users and 7 guests