would it be possible that when you press print the report gets copied to word doc. And then print that word document?
The purpose of doing this would be that the report would come out in colors...
Hmnz, I guess it would be possible to print reports in colors using Zetadocs or some tools similar to that. You can print reports in color, because you define theme/templates outside of Navision, and take only data from navision.
Now your reports looks pretty stupid when you press Preview cause the html tags are just displayed as text...
So i got 2 version of each report that needs to get printed out in color. One with the html tags in the source expression and the other version is the normal report.
When you want to keep your page breaks... just loop through the html file and replace every blanco line with following tag:
Answers
So colours are nor working fine inside report when you place the source expressions between html tags
Hmnz, I guess it would be possible to print reports in colors using Zetadocs or some tools similar to that. You can print reports in color, because you define theme/templates outside of Navision, and take only data from navision.
Dynamics NAV Enthusiast
What's your solution then?
Dynamics NAV Enthusiast
'<font color="red">' + CompanyAddr[1] + '</font>'
Then i just have a button Print report.
Which executes the following:
lv_PurchHeader.RESET;
lv_PurchHeader.SETFILTER("No.",'6002..6004');
lv_FileName := 'C:\Report405.html';
REPORT.SAVEASHTML(405,lv_FileName,FALSE,lv_PurchHeader);
PrintFile(lv_FileName);
SplitDirFile(FullString : Text[250];VAR JustDir : Text[250];VAR JustFileName : Text[250])
ExitLoop := FALSE;
PointBreak := STRLEN(FullString);
WHILE (NOT ExitLoop) OR (PointBreak <= 1) DO
IF COPYSTR(FullString,PointBreak,1) = '\' THEN BEGIN
JustFileName := COPYSTR(FullString,PointBreak + 1);
ExitLoop := TRUE;
END ELSE
PointBreak -= 1;
JustDir := COPYSTR(FullString,1,PointBreak);
PrintFile(PrintThisFile : Text[250])
IF ISCLEAR(objShell) THEN
CREATE(objShell);
SplitDirFile(PrintThisFile,Dir,FileName);
objFolder := objShell.NameSpace(Dir);
objFolderItems := objFolder.Items;
objFolderItem := objFolderItems.Item(FileName);
objFolderItem.InvokeVerb('PRINT');
objVerbs := objFolderItem.Verbs;
Now your reports looks pretty stupid when you press Preview cause the html tags are just displayed as text...
So i got 2 version of each report that needs to get printed out in color. One with the html tags in the source expression and the other version is the normal report.
When you want to keep your page breaks... just loop through the html file and replace every blanco line with following tag:
<div style="page-break-after: always; line-height: 0; height: 0px"></div>