{"id":2168,"date":"2015-03-19T21:45:01","date_gmt":"2015-03-19T13:45:01","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2168"},"modified":"2015-03-19T21:45:01","modified_gmt":"2015-03-19T13:45:01","slug":"qdataset-%e7%94%9f%e6%88%90%e4%ba%a4%e5%8f%89%e6%95%b0%e6%8d%ae%e5%87%bd%e6%95%b0-cross-%e8%af%b4%e6%98%8e","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2168","title":{"rendered":"QDataSet \u751f\u6210\u4ea4\u53c9\u6570\u636e\u51fd\u6570 Cross \u8bf4\u660e"},"content":{"rendered":"<p>\u6211\u4eec\u5728\u8bb8\u591a\u65f6\u5019\uff0c\u901a\u8fc7\u811a\u672c\u4ece\u6570\u636e\u5e93\u67e5\u8be2\u51fa\u6765\u7684\u7edf\u8ba1\u7ed3\u679c\u96c6\u662f\u9762\u5411\u884c\u7684\uff0c\u800c\u5b9e\u9645\u62a5\u8868\u5374\u662f\u9762\u5411\u5217\u3002\u6211\u4eec\u4e0d\u5f97\u4e0d\u81ea\u5df1\u5b9e\u73b0\u5b83\u7684\u884c\u5217\u7f6e\u6362\u64cd\u4f5c\u3002<\/p>\n<p>QDataSet \u63d0\u4f9b\u4e86\u4e00\u4e2a\u5168\u65b0\u7684 Cross \u51fd\u6570\u6765\u5b8c\u6210\u8fd9\u4e00\u529f\u80fd\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">procedure Cross(AColField, AKeyField, AValueField, AKeyName: QStringW);<\/pre>\n<p>\u6211\u4eec\u5bf9\u51fd\u6570\u7684\u51e0\u4e2a\u53c2\u6570\u505a\u4e2a\u7b80\u5355\u7684\u8bf4\u660e\uff1a<\/p>\n<ul>\n<li>AColField : \u5b9a\u4e49\u4e86\u7528\u4e8e\u4f5c\u4e3a\u5b57\u6bb5\u540d\u5217\u8868\u7684\u5b57\u6bb5<\/li>\n<li>AKeyField : \u5b9a\u4e49\u4e86\u7528\u4e8e\u4f5c\u4e3a\u884c\u5173\u952e\u5b57\u7684\u5b57\u6bb5<\/li>\n<li>AValueField : \u5b9a\u4e49\u4e86\u7528\u4e8e\u4f5c\u4e3a\u4ea4\u53c9\u503c\u7684\u5b57\u6bb5<\/li>\n<li>AKeyName : \u5b9a\u4e49\u4e86\u7528\u4e8e\u505a\u4e3a\u884c\u5173\u952e\u5b57\u5b57\u6bb5\u7684\u5b57\u6bb5\u540d\uff0c\u5982\u679c\u4e0d\u6307\u5b9a\uff0c\u5219\u4e3a AKeyField<\/li>\n<\/ul>\n<p>\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u4f8b\u5b50\u6548\u679c\uff0c\u5de6\u4fa7\u4e3a\u539f\u59cb\u7ed3\u679c\u96c6\u5185\u5bb9\uff0c\u53f3\u4fa7\u662f\u590d\u5236\u5de6\u4fa7\u7684\u7ed3\u679c\u96c6\u540e\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u4ee3\u7801\u8f6c\u6362\u7684\u7ed3\u679c\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">FDest.Cross('Year','Animal','Total','Animal');<\/pre>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/03\/dscross.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2169\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/03\/dscross-1024x552.jpg\" alt=\"dscross\" width=\"1024\" height=\"552\" srcset=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/03\/dscross-1024x552.jpg 1024w, https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/03\/dscross-300x162.jpg 300w, https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/03\/dscross.jpg 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u5728\u8bb8\u591a\u65f6\u5019\uff0c\u901a\u8fc7\u811a\u672c\u4ece\u6570\u636e\u5e93\u67e5\u8be2\u51fa\u6765 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,9,66],"tags":[362],"class_list":["post-2168","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","category-qdb","tag-362"],"views":3001,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2168"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2168\/revisions"}],"predecessor-version":[{"id":2170,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2168\/revisions\/2170"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}