Print report in color

tompynation
Member Posts: 398
Hi,
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...
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...
0
Answers
-
ok, solved saved the report to html and then print this html file and delete it...
So colours are nor working fine inside report when you place the source expressions between html tags0 -
tompynation wrote:Hi,
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.Tomas,
Dynamics NAV Enthusiast0 -
well, i print the reports as well in color... without any external tool. Just using NAV.0
-
tompynation wrote:well, i print the reports as well in color... without any external tool. Just using NAV.
What's your solution then?Tomas,
Dynamics NAV Enthusiast0 -
Like i said... al my source expressions are build like the following:
'<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>0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions