¡¾Delphi報±í開發¡¿FastReport
½ñÌ쿪ʼÑо¿FastReport¡£
ÒÔÏÂÊǶ¯Ì¬´´½¨FASTREPORTµÄDEMO
var
Page: TfrxReportPage;
Band: TfrxBand;
DataBand: TfrxMasterData;
Memo: TfrxMemoView;
begin
{ clear a report }
frxReport1.Clear;
{ add a dataset to the list of ones accessible for a report }
frxReport1.DataSets.Add(frxDBDataSet1);
{ add a page }
Page := TfrxReportPage.Create(frxReport1);
{ create a unique name }
Page.CreateUniqueName;
{ set sizes of fields, paper and orientation by default }
Page.SetDefaults;
{ modify paper's orientation }
Page.Orientation := poLandscape;
{ add a report title band}
Band := TfrxReportTitle.Create(Page);
Band.CreateUniqueName;
{ it is sufficient to set the «Top» coordinate and height for a band }
{ both coordinates are in pixels }
Band.Top := 0;
Band.Height := 20;
{ add an object to the report title band }
Memo := TfrxMemoView.Create(Band);
Memo.CreateUniqueName;
Memo.Text := 'Hello FastReport!';
Memo.Height := 20;
{ this object will be stretched according to band's width }
Memo.Align := baWidth;
{ add the masterdata band }
DataBand := TfrxMasterData.Create(Page);
DataBand.CreateUniqueName;
DataBand.DataSet := frxDBDataSet1;
{ the Top coordinate should be greater than the previously added band's
top + height}
DataBand.Top := 100;
DataBand.Height := 20;
{ add an object on master data }
Memo := TfrxMemoView.Create(DataBand);
Memo.CreateUniqueName;
{ connect to data }
Memo.DataSet := frxDBDataSet1;
Memo.DataField := 'xm';
Memo.SetBounds(0, 0, 100, 20);
{ adjust the text to the right object's margin }
Memo.HAlign := haRight;
{ show the report }
frxReport1.ShowReport;
FastReportÎÊÌâÕûÀí
http://blog.163.com/ex_plus/blog/static/1795953220090811151264/
FastReport ³ÌÐòÔ±ÊÖ²á
http://www.evget.com/zh-CN/Info/ReadInfo.aspx?id=9451
ͨÓôòÓ¡Ä£¿é¡£
ÔÚϵͳÖо³£ÐèÒªÓõ½¶ÔÒѾµÃµ½µÄÊý¾Ý¼¯£¬½øÐдòÓ¡¡£Îª´ËÌØÒâÖ
Ïà¹ØÎĵµ£º
ʹÓÃdelphi¶àÄê,ǰЩÌìºöÈ»Óöµ½²»»ástringתpbyte,ºÜÊÇʧÂä,´Ëʱ¶ÔÓÚ±à³Ì»ù±¾¹¦µÄÖØÒªÐÔÉîÓÐÌå»á.ÕâÆäÖÐÓõ½MOVEº¯Êý.
¸ãÁ˺ÃÒ»»á²Å¸ãÃ÷°×ÆäÓ÷¨.ËùÒÔÏëÌù³öÀ´°ïÖúÐèÒª°ïÖúµÄÈË.
var
s:string;
ps:Pchar;
b:pbyte;
len:integer;
begin
&nb ......
delphiÖйú¼Ê»¯µÄ¼¸ÖÖ·½°¸¼°±È½Ï(ת)
Ëæ×ÅÈ«Çò»¯³Ì¶È¼ÓÉÈí¼þÔ½À´Ô½ÏñÆÑ¹«Ó¢£¬µ½´¦Æ®É¢¡¢Ôú¸ù¡£ÕâÆäÖÐÒª½â¾öµÄÊDz»Í¬ÓïÑÔµÄÏÔʾÎÊÌâ¡£ÎÒÃǵ±È»Ï£ÍûÒ»Ì׳ÌÐò£¬¿ÉÒÔ²»Ð޸ĴúÂë¾Í¿ÉÒÔÖ§³Ö²»Í¬µÄÓïÑÔ£¬²»ÒªÈ¥Î¬»¤ºÜ¶àµÄ°æ±¾¡£
Ê×ÏÈҪ̸µ½µÄÒ»¸öÎÊÌâÊÇÂÒÂëÎÊÌ⣬ÒòΪdelphi
wi ......
Delphi ´´½¨Ä¿Â¼¼°Ð´ÈÕÖ¾Îļþ
var
TF: TextFile;
LogFile: string;
txt :string;
sysDir:string;
//´´½¨°´Å¥
procedure TForm1.Button1Click(Sender: TObject);
begin
sysDir:=extractfilepath(application.ExeName );
if not directoryexists(sysdir+'log\') then
createdir(sysdir+'log ......
ÔÚDelphiÖÐ,Inifilesµ¥ÔªÖÐÓÐÒ»¸öTStringHashµÄÀ࣬²»¹ýËüµÄValue½öÖ§³ÖInteger(ÆäʵҲ²»ÊÇÎÊÌ⣬ÓÐÆäËüÀàÐÍ¿ÉÒÔ½«±äÁ¿±äΪPointer)£¬ÓÐµã²»Êæ·þ£¬½ñÌìûÊÂ×ö¾Í°ÑËüÌæ»»ÎªvariantÁË£¬ÆäÖÐKeyµÄÃû³Æ´óСдÎ޹أ¬¾ÍÊÇΪÁ˼ӿ쿪·¢ËÙ¶È£¡
ʹÓÃHashtable,²éÕÒºÍɾ³ý¸´ÔӶȶ¼Êdz£Êý¼¶±ðµÄ!
type
PPHashItem = ^PHashItem;
......
¡¡¡¡DelphiÓïÑÔ£¬ÎÞÂÛÊÇ´Ó¿ª·¢ËÙ¶È¡¢»¹ÊÇÔËÐÐËÙ¶È¡¢»¹ÊDZàÒëËÙ¶È¡¢»¹ÊDZàÒëÖ®ºóµÄÖ´ÐÐÎļþÌå»ý£¬¶¼ÊÇÊýÒ»Êý¶þµÄ¡£Òò´Ë±»×÷Ϊ¹²ÏíÈí¼þ¡¢¿ª·¢²úÆ·¡¢ÖÆ×÷“ÂÌÉ«Èí¼þ”µÄÊ×Ñ¡¡£µ«ÊÇ£¬ÓÉÓÚÖî¶àÔÒò£¬DelphiÖУ¬ÓÐһЩ¿Ø¼þ£¬´æÔÚһЩbug¡£²»ÂÛ¹ã´ó¼¼ÊõÈËÔ±ÈçºÎ·´Ó¦£¬Delphi¹Ù·½¾ÍÊÇ“ÊÓ¶ø²»¼û”¡£ÓÐÎÊÌ⣬È˼ ......