Sign in Join
Wiki copytemporary

FPReport FAQ: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-## Contents
2-
3- * 1 General
4- * 1.1 Read the README.txt file
5- * 1.2 FPReport <> LazReport
6- * 1.3 Papermanager must registered
7- * 1.4 Fontmanager
8- * 2 FPC FPReport
9- * 2.1 I did not find FPReport in my FPC dir
10- * 2.2 What is the minimum requirement
11- * 2.3 Expression and Variables
12- * 3 Lazarus FPReport
13- * 3.1 I did not find FPReport in my Lazarus directory
14- * 3.2 I cannot compile the FPReport packages
15- * 3.3 Lazarus does not start anymore in Windows
16- * 3.4 My Report does not run/start in Windows
17- * 3.5 My Font is not found in windows
18-
191## General
202
213### Read the README.txt file
224
23-Before you compile the FPReport, have a look at the README.txt
5+Before you compile the FPReport, have a look at the README.txt
246
25-### FPReport <> LazReport
7+### FPReport \<\> LazReport
268
27-FPReport is not LazReport! These are two different reporting systems.
9+FPReport is not LazReport! These are two different reporting systems.
2810
29- * LazReport is based on FreeReport 2.32, see [[LazReport Documentation]].
30- * FPReport is written from scratch, see [[FPReport]] documentation.
11+- LazReport is based on FreeReport 2.32, see [[LazReport Documentation]].
12+- FPReport is written from scratch, see [[FPReport]] documentation.
3113
3214### Papermanager must registered
3315
34-You never registered the standard page sizes with:
35-```
36-if PaperManager.PaperCount=0 then
37-   PaperManager.RegisterStandardSi
16+You never registered the standard page sizes with:
17+
18+``` pascal
19+ if PaperManager.PaperCount=0 then
20+   PaperManager.RegisterStandardSi
3821```
3922
4023### Fontmanager
4124
42-Your report used LiberationSans font. Make sure you added the search paths to the font cache. eg:
43-```
44-{$IFDEF UNIX}
45- gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
46- gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/');
47-  gTTFontCache.BuildFontCache;
48- {$ENDIF}
49-```
25+Your report used LiberationSans font. Make sure you added the search paths to the font cache. eg:
5026
51-In windows this is usable:
27+``` pascal
28+ {$IFDEF UNIX}
29+ gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
30+ gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/');
31+  gTTFontCache.BuildFontCache;
32+ {$ENDIF}
5233```
53-gTTFontCache.ReadStandardFonts;
54-  gTTFontCache.BuildFontCache;
34+
35+In windows this is usable:
36+
37+``` pascal
38+ gTTFontCache.ReadStandardFonts;
39+  gTTFontCache.BuildFontCache;
5540```
5641
57-Default Fonts (cDefaultFont and ReportDefaultFont) on
42+Default Fonts (cDefaultFont and ReportDefaultFont) on
5843
59- * **Unix** LiberationSans
60- * **Windows** Arial
61- * **Not Unix and not windows** Helvetica
44+- **Unix** LiberationSans
45+- **Windows** Arial
46+- **Not Unix and not windows** Helvetica
6247
63-In some environments like Raspbian you may have trouble with the defaults! You may see a message that the font is not found and the report is not generated.
48+In some environments like Raspbian you may have trouble with the defaults! You may see a message that the font is not found and the report is not generated.
6449
6550## FPC FPReport
6651
6752### I did not find FPReport in my FPC dir
6853
69-It is located in the FPC\packages\fcl-report dir, but only in FPC trunk (=3.1.1) since rev. 36962 (20 Aug 2017).
54+It is located in the FPC\packages\fcl-report dir, but only in FPC trunk (=3.1.1) since rev. 36962 (20 Aug 2017).
7055
7156### What is the minimum requirement
7257
73-Info from the mailing list - FPC 2.6.4 (and Lazarus 1.6.2), but you will need to copy some additional units from the trunk version of the FPC source repo (in particular, fpexprpars, and fcl-pdf) and the Lazarus trunk repo too.
58+Info from the mailing list - FPC 2.6.4 (and Lazarus 1.6.2), but you will need to copy some additional units from the trunk version of the FPC source repo (in particular, fpexprpars, and fcl-pdf) and the Lazarus trunk repo too.
7459
7560### Expression and Variables
7661
77-If you use float variables and string values on a non-English configured system you will have problems with the comma as a decimal separator (eg German configured computer). All results will have a dot instead of the the configured value in format setting. This is by design (see Bug report 0036545 and 0036525)!
62+If you use float variables and string values on a non-English configured system you will have problems with the comma as a decimal separator (eg German configured computer). All results will have a dot instead of the the configured value in format setting. This is by design (see Bug report 0036545 and 0036525)!
7863
79-_Explanation:_ The Value property of a variable is written to the JSON or XML when saving/loading the report: see ReadElement/WriteElement. So it must be in a transportable, locale-neutral format.
64+*Explanation:* The Value property of a variable is written to the JSON or XML when saving/loading the report: see ReadElement/WriteElement. So it must be in a transportable, locale-neutral format.
8065
81-Imagine saving the report to stream and in a File or DB Blob field, then loading it on another PC with different locale settings. If the stream is written with decimal separator, and read with decimal separator there will be an error on load.
66+Imagine saving the report to stream and in a File or DB Blob field, then loading it on another PC with different locale settings. If the stream is written with decimal separator, and read with decimal separator there will be an error on load.
8267
83-See also SetValue() where Val() is used to create the value from a string.
68+See also SetValue() where Val() is used to create the value from a string.
8469
8570## Lazarus FPReport
8671
8772### I did not find FPReport in my Lazarus directory
8873
89-Only in Lazarus trunk since rev. 55719 (20 Aug 2017). Look in LAZARUSDIR\components\fpreport there is a runtimepackage lclfpreport.lpk.
74+Only in Lazarus trunk since rev. 55719 (20 Aug 2017). Look in LAZARUSDIR\components\fpreport there is a runtimepackage lclfpreport.lpk.
9075
9176### I cannot compile the FPReport packages
9277
93-As of 20th January 2019 FPReport does not compile out of the box in 64 bit Lazarus (Windows version at least). It should compile flawlessly in 32 bit Lazarus, though (see also "I did not find FPReport in my Lazarus directory" above).
78+As of 20th January 2019 FPReport does not compile out of the box in 64 bit Lazarus (Windows version at least). It should compile flawlessly in 32 bit Lazarus, though (see also "I did not find FPReport in my Lazarus directory" above).
9479
9580### Lazarus does not start anymore in Windows
9681
97-You need to copy freetype-6.dll and zlib1.dll to your LAZARUSDIR (the folder where lazarus.exe resides). Make sure you use 32 bit DLLs with 32 bit Lazarus and 64 bit DLLs with 64 bit Lazarus. These DLLs are not included. Please see the FreeType [[1]](<https://www.freetype.org/>) and Zlib [[2]](<https://www.zlib.net/>) project pages for details on how to get them. _Please note that FPReport expects a "freetype**-6**.dll" whereas the install package from freetype.org includes a "freetype6.dll" (without the dash) or a "freetype.dll", so you have to rename the file to "freetype-6.dll" before starting Lazarus._
82+You need to copy freetype-6.dll and zlib1.dll to your LAZARUSDIR (the folder where lazarus.exe resides). Make sure you use 32 bit DLLs with 32 bit Lazarus and 64 bit DLLs with 64 bit Lazarus. These DLLs are not included. Please see the FreeType [1](https://www.freetype.org/) and Zlib [2](https://www.zlib.net/) project pages for details on how to get them. *Please note that FPReport expects a "freetype**-6**.dll" whereas the install package from freetype.org includes a "freetype6.dll" (without the dash) or a "freetype.dll", so you have to rename the file to "freetype-6.dll" before starting Lazarus.*
9883
99-There is a breaking change, the library must be "freetype.dll" in newer versions of fpc (actual fixes32 and trunk)
84+There is a breaking change, the library must be "freetype.dll" in newer versions of fpc (actual fixes32 and trunk)
10085
10186### My Report does not run/start in Windows
10287
103-Start the application from the console, so you can see if some dll's are missing. Normally freetype-6.dll and zlib1.dll are missing. For more information read the README.txt. On FPC 3.3.1 it is freetype.dll instead of freetype-6.dll. Use the correct version for your bitness (32 or 64 Bit)
88+Start the application from the console, so you can see if some dll's are missing. Normally freetype-6.dll and zlib1.dll are missing. For more information read the README.txt. On FPC 3.3.1 it is freetype.dll instead of freetype-6.dll. Use the correct version for your bitness (32 or 64 Bit)
10489
10590### My Font is not found in windows
10691
107-You have to use the Postscript name of the font. For example, under Windows you have the font 'Arial' - this is one of the standard fonts - but you have to write Memo.Font.Name := 'ArialMT' because ArialMT is the correct Postscript name.
108-```
109-for i:= 0 to gTTFontCache.Count-1 do begin
110- try
111- Memo1.Append(TFPFontCacheItem(gTTFontCache.Items[i]).HumanFriendlyName +'...'+ TFPFontCacheItem(gTTFontCache.Items[i]).PostScriptName);
112- except
113- Memo1.Append('ERROR in...'+ TFPFontCacheItem(gTTFontCache.Items[i]).FileName)
114- end;
115- end;
92+You have to use the Postscript name of the font. For example, under Windows you have the font 'Arial' - this is one of the standard fonts - but you have to write Memo.Font.Name := 'ArialMT' because ArialMT is the correct Postscript name.
93+
94+``` pascal
95+ for i:= 0 to gTTFontCache.Count-1 do begin
96+ try
97+ Memo1.Append(TFPFontCacheItem(gTTFontCache.Items[i]).HumanFriendlyName +'...'+ TFPFontCacheItem(gTTFontCache.Items[i]).PostScriptName);
98+ except
99+ Memo1.Append('ERROR in...'+ TFPFontCacheItem(gTTFontCache.Items[i]).FileName)
100+ end;
101+ end;
116102```
117103
118104---
119-*From the Free Pascal wiki, page "FPReport FAQ", as the Internet Archive kept it on 2023-05-28. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
105+*From the Free Pascal wiki, page "FPReport FAQ", as it stood on 2020-01-10 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history