Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

您可以使用 SortOrder 屬性,為報表中的欄位和運算式指定排序順序。 例如,如果您要列印供應商清單,可以依公司名稱的字母順序排序記錄。 讀/寫布林值

expression.SortOrder

運算式 必要。 傳回 [套用至] 清單中其中一個對象的表達式。

備註

SortOrder 屬性使用以下設定。

設定

Visual Basic

描述

遞增

False

(預設) 以遞增順序 (A 到 Z、0 到 9) 排序值。

遞減

True

(預設) 以遞減順序 (Z 到 A、9 到 0) 排序值。


附註: 您可以使用 [群組、排序與合計] 窗格、巨集或 Visual Basic for Applications (VBA) 程式碼來設定 SortOrder 屬性。

在 Visual Basic 中,您可以在 [設計] 檢視、[版面配置] 檢視中,或使用 GroupLevel 屬性在報表的 Open 事件程序中,設定 SortOrder 屬性。

範例

下列範例會針對「產品摘要」報表中的第一個群組層級,將排序順序設定為遞增。

Reports("Product Summary").GroupLevel(0).SortOrder = False  

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×