VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

VFP報表FRX文件的分析

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
Ruey



註冊時間: 2003-03-12
文章: 1698
來自: tunglo

第 1 樓

發表發表於: 星期五 三月 14, 2003 7:42 pm    文章主題: VFP報表FRX文件的分析 引言回覆

轉貼---- 狐寓主頁  小順子

  其實報表文件.FRX是一個表,其.FPT是一個備註庫,其庫結構和一般自由表沒什麽不同,都可以USE打開他的???.FRX,其欄位總共有74項,分別介紹如下,希能給大家有所幫助:
 欄位名稱 類型 長度 小數 說明  
1 PLATFORM C 8 操作平臺(_DOS或_WINDOWS)  
2 UNIQUEID C 10 唯一標識(當NAME合EXPR都爲空時以_RHE開頭, 否則以_RNR開頭)  
3 TIMESTAMP N 10 時間標簽(先後次序)  
4 OBJTYPE N 2 目標類型(1.環境; 2.資料庫; 5.文字; 8.變數;9.TIMESTAMP爲空; 23.TIMESTAMP爲空)
5 OBJCODE N 3 目標代碼(1.;4.;7.;53)  
6 NAME M 10 名稱(資料庫名稱)  
7 EXPR M 10 運算式  
8 VPOS N 9 3 行座標  
9 HPOS N 9 3 列座標  
10 HEIGHT N 9 3 高度  
11 WIDTH N 9 3 寬度  
12 STYLE M 10 風格(透明,不透明)  
13 PICTURE M 10 格式或OLE檔案名稱  
14 ORDER M 10 索引排序  
15 UNIQUE L 1 唯一資料庫(.F.,.T.,空)  
16 COMMENT M 10 注釋  
17 ENVIRON L 1 是否報表運行環境(.T.時)  
18 BOXCHAR C 1 畫框字元  
19 FILLCHAR C 1 運算式類型(C,N,D等,文字型的爲空)  
20 TAG M 10 (當該記錄爲記錄環境的記錄時,該欄位儲存列印資訊等;記錄資料庫時,儲存資料庫名稱)  
21 TAG2 M 10 當該記錄爲記錄環境的記錄時,該欄位元儲存列印控制等  
22 PENRED N 5 前景紅  
23 PENGREEN N 5 前景綠  
24 PENBLUE N 5 前景藍  
25 FILLRED N 5 填充紅  
26 FILLGREEN N 5 填充綠  
27 FILLBLUE N 5 填充藍  
28 PENSIZE N 5 劃線寬度  
29 PENPAT N 5 指定填充圖案(0.空;1.虛線;2.水平;3.垂線;4.左  斜;5右斜;6.交叉;7.斜交叉8.實體)  
30 FILLPAT N 5 劃線類型(0.無;1.點;2.虛線;3. 虛線-點;4. 虛線-點-點)  
31 FONTFACE M 10 字體類型(細明體)  
32 FONTSTYLE N 3 字體風格(0.正常1.粗)  
33 FONTSIZE N 3 字體大小  
34 MODE N 3 模式  
35 RULER N 1 尺規(2-預設值,3-象素)  
36 RULERLINES N 1 標線寬度  
37 GRID L 1 是否顯示格線  
38 GRIDV N 2 垂直格線刻度  
39 GRIDH N 2 水平格線刻度  
40 FLOAT L 1 浮動  
41 STRETCH L 1 溢出時伸展  
42 STRETCHTOP L 1 相對於頂端伸展  
43 TOP L 1 相對於頂端固定  
44 BOTTOM L 1 相對於底端固定  
45 SUPTYPE N 1 控制類型  
46 SUPREST N 1 控制設置  
47 NOREPEAT L 1 每頁都列印頁標題  
48 RESETRPT N 2 重置報表  
49 PAGEBREAK L 1 每組從新的一頁開始  
50 COLBREAK L 1 從新的一列開始  
51 RESETPAGE L 1 每組頁號重新從1開始  
52 GENERAL N 3 通用  
53 SPACING N 3 空格  
54 DOUBLE L 1 是否加倍  
55 SWAPHEADER L 1 頭互換  
56 SWAPFOOTER L 1 註腳互換  
57 EJECTBEFOR L 1 列印前送紙  
58 EJECTAFTER L 1 列印後送紙  
59 PLAIN L 1 指定只在報表開始位置出現頁標題  
60 SUMMARY L 1 是否僅列印總計和分類總計資訊  
61 ADDALIAS L 1 是否增加別名  
62 OFFSET N 3 偏移(0-左;1-右;2-居中)  
63 TOPMARGIN N 3 上邊界高度  
64 BOTMARGIN N 3 下邊界高度  
65 TOTALTYPE N 2 計算類型  
66 RESETTOTAL N 2 重置(1-表尾,2-頁尾)  
67 RESOID N 3 源標識  
68 CURPOS L 1 是否顯示當前位置  
69 SUPALWAYS L 1 是否列印重復值  
70 SUPOVFLOW L 1 當細節區資料溢出時到新頁或新列列印  
71 SUPRPCOL N 1 當此列改變時列印  
72 SUPGROUP N 2 當此組改變時列印  
73 SUPVALCHNG L 1 若空行則刪除  
74 SUPEXPR M 10 是否列印控制條件  
==============================  
Objtype Objcode Offset 含義  
5 0 文字  
8 0 運算式  
6 0 1 直線(水平線)  
6 0 0 直線(垂直線)  
7 4 矩形框(0~99橢圓)  
用於報表佈局的控制的特徵值列入下表:  
Objtype Objcode 含義  
9 0 頁頭高度  
9 1 頁細節高度  
9 3 組標頭高度  
9 4 組細節高度  
9 5 組註腳高度  
9 7 頁註腳高度  
9 8 頁尾備註
其他常用到的欄位有:
①水平座標(Hpos);
②寬度(Width);
③運算式類型(Fillchar);  
④字體(Fontface);
⑤對齊方式(Offset)。  


Ruey 在 星期日 八月 10, 2003 4:25 pm 作了第 1 次修改
回頂端
檢視會員個人資料 發送私人訊息
yctsai



註冊時間: 2003-04-11
文章: 179


第 2 樓

發表發表於: 星期五 四月 11, 2003 11:13 pm    文章主題: 引言回覆

非常感謝
回頂端
檢視會員個人資料 發送私人訊息
Ruey



註冊時間: 2003-03-12
文章: 1698
來自: tunglo

第 3 樓

發表發表於: 星期四 八月 14, 2003 1:56 am    文章主題: 引言回覆

Fieldname Description
------------------------------------------
PLATFORM Platform for which this record will be used.

UNIQUEID That's a unique ID for every record. It doesn't have a special meaning. Just make sure that this ID is really unique, if you want to add records on your own.

TIMESTAMP On this field you can see when the record was created. But it doesn't have any special additional meaning.

OBJTYPE The first really interesting field. It contains information about the kind of stored information. Here is a short description of the possible values:
1 = Definition-record. You can find this record in every report.
5 = Label
6 = Line
7 = Rectangular/ Shape
8 = Datafield
9 = This record contains information about a band, like the detail-band, headings, footer, and so forth
17 = Image or OLE-Object
18 = Report variable
23 = Default values for the report, like Fontshape and size.
25 = That's the data environment (VFP only)
26 = That's an object (cursor or relation) in the data environment. (VFP only)

OBJCODE The meaning of this field depends on the value in OBJTYPE. Mostly, this values are in combination with OBJTYPE = 4. In this case the values have the following meaning:
0 = Report title
1 = Pageheader
3 = Groupheader
4 = Detail
5 = Groupfooter
7 = Pagefooter
8 = Summary

NAME The information in this field depends on the actual object as well. If the actual record describes an Image or an OLE-object, this field contains the filename or fieldname. If the actual record describes the data environment (VFP only), the value in this field could be "DataEnvironment," "Cursor," or "Relation."

EXPR Also this field depends on the ObjectType. It stores the fieldname of a datafield, the displayed text of a label, or the properties of an object in the data environment.

VPOS This field stores information about the vertical position of the actual object. It's important to know that this position is the absolute object position as it appears on your screen. This means that the height of each band counts as well, even if this band is just a graphical help in design time. I'll give you a little example: If we have a report, which has a Pageheader with a height of 0 (that means completely on top) and a field about 1 inch below the pageheader, the stored position isn't 1 inch; it is 1 inch plus the graphical height of the band.
The stored values are one-thousandth of a cm.

HPOS The horizontal position of the object.

HEIGHT The height of the object.

WIDTH The width of the object.

PICTURE This field contains the style-information of a field. This information is compatible to the picture command of FoxPro.

COMMENT This is the comment snippet.

ENVIRON This field defines if you want to store the DataEnvironment. (FoxPro 2.x only)

FILLCHAR This field contains information about the fieldtype of the actual object. For example "C" for Chars, or "N" for numeric, and so forth.

TAG This field contains different data depending on the actual objectype. In the first record of each report, this field contains binary information about the used printer driver. This information is compatible to the C structure you need to pass to the printer driver if you want to print in C.

In all other records there is written information about the actual object. For example "PHEAD" if the actual record is a pageheader. If you clear this field in the first record, FoxPro forgets about the used printer driver and looks for the actual printer. This makes your reports more generic.

TAG2 In this field you have binary information about the printer driver as well. If you clear this field in the first record, FoxPro forgets about the used printer driver and looks for the actual printer. This makes your reports more generic.

PENRED, PENGREEN, PENBLUE In this field FoxPro stores information about the forecolor of the actual object. These are standard rgb-values. In FoxPro 2.x, the dialog only allows 16 colors, but you can define all possible values in this field, and FoxPro (2.x and 3.0) is able to print all of these values.

FILLRED, FILLGREEN, FILLBLUE These are the values for the backcolor.

PENSIZE This defines the pensize.

PENPAT The line pattern.

FILLPAT The fill pattern.

FONTFACE The font name of the actual object.

Note: Use only TrueType-fonts in your reports. All other fonts just ask for problems. And as Murphy want's it, these problems always occur when the first user tries to print. If you create reports only for yourself, or for a special user, you can also use printer fonts.

FONTSTYLE This field contains codes for fontstyles:
0 = Normal
1 = Bold
2 = Italic
3 = Bold and Italic
4 = Underlined
5 = Bold and underlined
6 = Italic and underlined
7 = Bold, Italic and Underlined
Note: In FoxPro 2.x you can't activate underlined attributes. However, they are already supported if you enter the underlined codes directly into the .FRX.

FONTSIZE The fontsize.

MODE This field defines if the actual object is transparent or not.
1= Transparent
2 = Opaque
In FoxPro 2.6 there are some problems with this field. Sometimes FoxPro just prints black blocks instead of fields. In this case, this field is set to 2. Just fix this problem manually.

RULER, RULERLINES, GRID, GRIDV, GRIDH In these fields, FoxPro stores information about the ruler and the grid. This information is only important at design time and doesn't have a meaning for the final printing.

FLOAT, STRETCH, STRETCHTOP, TOP, BOTTOM These fields define if the actual object floats in the actual band if the band grows (FLOAT = .T.), if the field should stretch if the data gets too long (STRETCH = .T.), if the field should stretch, but keep it's position (STRETCHTOP = .T.) and if the field is positioned relative to the top of the band (TOP = .T.) or to the bottom (BOTTOM = .T.).

NOREPEAT If this field is set to .T., the field is only printed once.

RESETRPT If this field is set to .T., the report will be reset after printing this object.

PAGEBREAK .T. means that there will be a pagebreak after printing this object.

COLBREAK .T. means that there will be a column break after printing this object.

RESETPAGE This field defines if there should be a page reset (_PAGENO = 1) after printing this object.

GENERAL This field defines if and how a graphic stretches:
0 = Cut Image
1 = Stretch proportional
2 = Stretch and fill the frame

SPACING Defines the line space in textfields:
0 = normal space (1 line)
1 = 1 _ lines
2 = 2 lines

DOUBLE Should a general-field be printed centered (.T. = Yes, .F. = No)

SWAPHEADER If this field is .T., the header is printed on a new page.

SWAPFOOTER If this field is .T., the footer is printed on a new page.

EJECTBEFOR This field defines if there is an eject before the report is printed.

EJECTAFTER This field defines if there is an eject after the report is printed.

PLAIN This field defines if the header will be printed only on page one or nor (DOS and UNIX only).

SUMMARY This field is used in DOS and UNIX and defines the kind of summaries.

ADDALIAS This field defines if there should be an alias added to the fieldnames, or not.

OFFSET This field is used for a lot of different functions. In DOS and UNIX it is used to store report and band information. The usage of this field depends on the actual objecttype:
Images: In this case, this field defines the kind of source (bitmap or general).
Labels: This field is used to store the alignment (I'm not talking about fields!).
Shapes: This field is used to store the curvature.
Lines: Is the line horizontal or vertical?

TOPMARGIN This field is used to store the top margin of the report.

BOTMARGIN This field is used to store the bottom margin (DOS and UNIX).

TOTALTYPE This field contains coded information about the kind of calculation:
0 = Nothing
1 = Count
2 = Sum
3 = Average
4 = Lowest
5 = Highest
6 = Std. Deviation
7 = Varianz

RESETTOTAL This field defines when the calculation should be reset.

CURPOS If this field set to .T. (in the first record) , the cursor position is displayed in the status bar (Windows and Mac only). This is only possible at design time.

SUPALWAYS If this field is set to .T., the line isn't printed if it is blank.

SUPOVFLOW If this is set to .T., the object is printed if the detail band changes to a new page.

SUPRPCOL If this field is not 0, the object is printed in the first whole band of a new page.

SUPGROUP If this field is not 0, the object is printed when the group changes. The group is defined by the number.

SUPVALCHNG If this field is set to .T., the field is printed only if it's value changes.

SUPEXPR This field contains the Print-When-statement.

USER This field is reserved for the user and it can be used for any reasons. It doesn't affect the report at all. (This field is new in VFP.)

_________________
#############################
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!

學會VFP使用者社區的搜尋,Code才會更有趣~
#############################
回頂端
檢視會員個人資料 發送私人訊息
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作