人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統(tǒng)下載站 > 技術(shù)開發(fā)教程 > 詳細頁面

經(jīng)典水晶報表設計—單擊表頭排序表格

經(jīng)典水晶報表設計—單擊表頭排序表格

更新時間:2022-10-10 文章作者:未知 信息來源:網(wǎng)絡 閱讀次數(shù):

1. 新建一個字符串類型的參數(shù)字段,名稱為 URL,用于傳遞 ASP.NET 程序的網(wǎng)址和網(wǎng)址的部分參數(shù)。比如:"http://www.nt.cn/cr.aspx?sort_field="。

2. 右擊作為表頭的文本字段,選擇"設置文本格式",進入"格式化編輯器"對話框。

3. 選擇"超級鏈接"選項卡,并設置超級鏈接類型為"Internet 上的網(wǎng)址"。

4. 單擊超級鏈接信息的網(wǎng)站地址后面的公式的鈕,輸入公式 {?URL} + "name"。

5. 這樣表頭就變成了超級鏈接,而且指向 http://www.nt.cn/cr.aspx?sort_field=name。

6. ASP.NET 程序在 Page_Load 事件里讀取要排序的字段 sort_field,然后對水晶報表進行排序。

7. 水晶報表排序編程實例

Dim crReportDocument As ReportDocument

Public Sub changeSortField(mySortFld As String, mySortDir As String)

Dim crSortField As SortField
Dim crSortDirection As SortDirection
Dim crDatabaseFieldDefinition As DatabaseFieldDefinition

For Each crSortField In crReportDocument.DataDefinition.SortFields
If crSortField.Field.Name.ToString = mySortFld Then
crDatabaseFieldDefinition = crReportDocument.Database.Tables(0).Fields(mySortFld.ToString)
crSortField = crReportDocument.DataDefinition.SortFields(0)
crSortField.Field = crDatabaseFieldDefinition

If mySortDir = "Ascending" Then
crSortField.SortDirection = SortDirection.AscendingOrder
Else
crSortField.SortDirection = SortDirection.DescendingOrder
End If
End If
Next

CrystalReportViewer1.ReportSource = crReportDocument
End Sub

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

網(wǎng)站地圖xml | 網(wǎng)站地圖html
主站蜘蛛池模板: 大田县| 习水县| 乳源| 桂林市| 牙克石市| 天等县| 永寿县| 莱西市| 孟村| 于都县| 汝城县| 阳原县| 安多县| 双峰县| 延吉市| 哈巴河县| 普兰店市| 资源县| 郴州市| 本溪| 尼玛县| 偃师市| 繁峙县| 南阳市| 汽车| 梨树县| 陕西省| 东丽区| 莱州市| 郑州市| 云和县| 吴川市| 蒙城县| 临海市| 嫩江县| 织金县| 威远县| 古田县| 逊克县| 盖州市| 南召县|