Sign in Join
Wiki copytemporary

FPReport FAQ: what changed

Revision 1 to 2. 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+
119## General
220
321### Read the README.txt file
422
5-Before you compile the FPReport, have a look at the README.txt
23+Before you compile the FPReport, have a look at the README.txt
624
7-### FPReport \<\> LazReport
25+### FPReport <> LazReport
826
9-FPReport is not LazReport! These are two different reporting systems.
27+FPReport is not LazReport! These are two different reporting systems.
1028
11-- LazReport is based on FreeReport 2.32, see [[LazReport Documentation]].
12-- FPReport is written from scratch, see [[FPReport]] documentation.
29+ * LazReport is based on FreeReport 2.32, see [[LazReport Documentation]].
30+ * FPReport is written from scratch, see [[FPReport]] documentation.
1331
1432### Papermanager must registered
1533
16-You never registered the standard page sizes with:
17-
18-``` pascal
19- if PaperManager.PaperCount=0 then
20-   PaperManager.RegisterStandardSi
34+You never registered the standard page sizes with:
2135```
36+if PaperManager.PaperCount=0 then
37+   PaperManager.RegisterStandardSi
38+```
2239
2340### Fontmanager
2441
25-Your report used LiberationSans font. Make sure you added the search paths to the font cache. eg:
26-
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}
42+Your report used LiberationSans font. Make sure you added the search paths to the font cache. eg:
3343```
34-
35-In windows this is usable:
44+{$IFDEF UNIX}
45+ gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
46+ gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/');
47+  gTTFontCache.BuildFontCache;
48+ {$ENDIF}
49+```
3650
37-``` pascal
38- gTTFontCache.ReadStandardFonts;
39-  gTTFontCache.BuildFontCache;
51+In windows this is usable:
4052```
53+gTTFontCache.ReadStandardFonts;
54+  gTTFontCache.BuildFontCache;
55+```
4156
42-Default Fonts (cDefaultFont and ReportDefaultFont) on
57+Default Fonts (cDefaultFont and ReportDefaultFont) on
4358
44-- **Unix** LiberationSans
45-- **Windows** Arial
46-- **Not Unix and not windows** Helvetica
59+ * **Unix** LiberationSans
60+ * **Windows** Arial
61+ * **Not Unix and not windows** Helvetica
4762
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.
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.
4964
5065## FPC FPReport
5166
5267### I did not find FPReport in my FPC dir
5368
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).
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).
5570
5671### What is the minimum requirement
5772
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.
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.
5974
6075### Expression and Variables
6176
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)!
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)!
6378
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.
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.
6580
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.
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.
6782
68-See also SetValue() where Val() is used to create the value from a string.
83+See also SetValue() where Val() is used to create the value from a string.
6984
7085## Lazarus FPReport
7186
7287### I did not find FPReport in my Lazarus directory
7388
74-Only in Lazarus trunk since rev. 55719 (20 Aug 2017). Look in LAZARUSDIR\components\fpreport there is a runtimepackage lclfpreport.lpk.
89+Only in Lazarus trunk since rev. 55719 (20 Aug 2017). Look in LAZARUSDIR\components\fpreport there is a runtimepackage lclfpreport.lpk.
7590
7691### I cannot compile the FPReport packages
7792
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).
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).
7994
8095### Lazarus does not start anymore in Windows
8196
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.*
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._
8398
84-There is a breaking change, the library must be "freetype.dll" in newer versions of fpc (actual fixes32 and trunk)
99+There is a breaking change, the library must be "freetype.dll" in newer versions of fpc (actual fixes32 and trunk)
85100
86101### My Report does not run/start in Windows
87102
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)
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)
89104
90105### My Font is not found in windows
91106
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;
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.
102108```
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;
116+```
103117
104118---
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).*
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).*

Back to history