fastreport´òÓ¡´úÂë¼°SQLºÏ²¢×ֶεÄÓï¾ä
procedure Tform1.Button5Click(Sender: TObject);
var
p:pointer;
FrfStr:string;
begin
inherited;
Screen.Cursor:=MYCURSORWAITHAND;
with cdsPrint do
begin
Active:=false;
//Õâ¸öSQLÓÃÓÚ½«remarkÖеļǼºÏ²¢µ½Ò»Æð!
CommandText:='select a.ITEM_ID, a.ITEM_NAME,count(a.Coll_ID) as num,ltrim(max(sys_connect_by_path(a.remark, '';'')), '';'') remark '
+' from (select /*+index(b,TAB_ORDER_I)*/ b.ITEM_ID,b.Coll_ID,b.ITEM_NAME,b.remark,row_number() over(partition by b.ITEM_ID order by b.ITEM_ID)'
+' ITEM_ID1,row_number() over(order by b.ITEM_ID) + dense_rank() over(order by b.ITEM_ID) ITEM_ID2 '
+' from TAB_ORDER b where b.Coll_ID ='''+DBComboBoxEh1.Text+''''
+' ) a'
+' start with ITEM_ID1 = 1 connect by prior ITEM_ID2 = ITEM_ID2-1 group by a.ITEM_ID,'
+' a.ITEM_NAME order by a.ITEM_ID ';
Active:=true ;
end;
cds_Print.DisableControls;
p:=cdsPrint.GetBookmark;
FrfStr:='report1l.frf';
try
if cdsPrint.Active and (cdsPrint.RecordCount<>0) then
begin
frReport1.LoadfromFile(ExtractFilePath(ParamStr(0))+'Report\'+FrfStr);
PrintSet;
frReport1.ShowReport;
end
else
begin
Screen.Cursor:=crDefault;
Application.MessageBox(pchar(STR_MESSAGEBOX_HEADER+'ûÓÐÊý¾Ý¿É´òÓ¡'),pchar(self.Caption),MB_OK or MB_ICONEXCLAMATION);
end;
finally
cdsPrint.GotoBookmark(p);
cdsPrint.EnableControls;
&nb
Ïà¹ØÎĵµ£º
1.ÀûÓÃÏÂÃæµÄ½Å±¾´´½¨BOOK£¬READER ºÍ BORROW ±í£¬²¢Íê³ÉºóÃæµÄÁªÏµ¡£
CREATE TABLE BOOK(
NO CHAR(8) PRIMARY KEY,
TITLE VARCHAR2(50) NOT NULL,
AUTHOR VARCHAR2(20) ,
PUBLISH VARCHAR2(20),
PUB_DA ......
(1)char¡¢varchar¡¢textºÍnchar¡¢nvarchar¡¢ntext
charºÍvarcharµÄ³¤¶È¶¼ÔÚ1µ½8000Ö®¼ä£¬ËüÃǵÄÇø±ðÔÚÓÚcharÊǶ¨³¤×Ö·ûÊý¾Ý£¬¶øvarcharÊDZ䳤×Ö·ûÊý¾Ý¡£Ëùν¶¨³¤¾ÍÊdz¤¶È¹Ì¶¨ µÄ£¬µ±ÊäÈëµÄÊý¾Ý³¤¶ÈûÓдﵽָ¶¨µÄ³¤¶Èʱ½«×Ô¶¯ÒÔÓ¢ÎĿոñÔÚÆäºóÃæÌî³ä£¬Ê¹³¤¶È´ïµ½ÏàÓ¦µÄ³¤¶È£»¶ø±ä³¤×Ö·ûÊý¾ÝÔò²»»áÒÔ¿Õ¸ñÌî³ä¡£ text´ ......
MS-SQLÖÐsaµÇ¼ʧ°Ü:
¸Ã´íÎó²úÉúµÄÔÒòÊÇÓÉÓÚSQL ServerʹÓÃÁË"½ö Windows"µÄÉí·ÝÑéÖ¤·½Ê½,
Òò´ËÓû§ÎÞ·¨Ê¹ÓÃSQL ServerµÄµÇ¼ÕÊ»§£¨Èç sa £©½øÐÐÁ¬½Ó.½â¾ö·½·¨ÈçÏÂËùʾ:
1.ÔÚ·þÎñÆ÷¶ËʹÓÃÆóÒµ¹ÜÀíÆ÷,²¢ÇÒÑ¡Ôñ"ʹÓà Windows Éí·ÝÑéÖ¤"Á¬½ÓÉÏ SQL Server
²Ù×÷²½Öè:
ÔÚÆóÒµ¹ÜÀíÆ÷ÖÐ
--ÓÒ¼üÄãµÄ·þÎñÆ÷ʵÀý(¾ÍÊÇÄÇ ......
Êý¾Ý¿âÉè¼Æ¾Ñé̸
Ò»¸ö³É¹¦µÄ¹ÜÀíϵͳ£¬ÊÇÓÉ£º[50% µÄÒµÎñ + 50% µÄÈí¼þ] Ëù×é³É£¬¶ø 50% µÄ³É¹¦Èí¼þÓÖÓÐ [25% µÄÊý¾Ý¿â + 25% µÄ³ÌÐò] Ëù×é³É£¬Êý¾Ý¿âÉè¼ÆµÄºÃ»µÊÇÒ»¸ö¹Ø¼ü¡£Èç¹û°ÑÆóÒµµÄÊý¾Ý±È×öÉúÃüËù±ØÐèµÄѪҺ£¬ÄÇôÊý¾Ý¿âµÄÉè¼Æ¾ÍÊÇÓ¦ÓÃÖÐ×îÖØÒªµÄÒ»²¿·Ö¡£ÓйØÊý¾Ý¿âÉè¼ÆµÄ²ÄÁϺ¹Å£³ä¶°£¬´óѧѧλ¿Î³ÌÀïÒ²ÓÐ ......
Êý¾ÝÀàÐÍ
ÀàÐÍ
Ãè Êö
bit
ÕûÐÍ
bit Êý¾ÝÀàÐÍÊÇÕûÐÍ£¬ÆäÖµÖ»ÄÜÊÇ0¡¢1»ò¿ÕÖµ¡£ÕâÖÖÊý¾ÝÀàÐÍÓÃÓÚ´æ´¢Ö»ÓÐÁ½ÖÖ¿ÉÄÜÖµµÄÊý¾Ý£¬ÈçYes »òNo¡¢True »òFa lse ¡¢On »òOff
int
ÕûÐÍ
int Êý¾ÝÀàÐÍ¿ÉÒÔ´æ´¢´Ó- 231(-2147483648)µ½231 (21 ......