Minying's Blog

Just another WordPress.com weblog

Archive for 2009 年 01 月

定義RDLC報表資料來源

Posted by minying 於 22 一月, 2009

ReportViewer支援的資料包含物件(Object)及資料表(DataTable),我想資料表的方式應是比較常用的方式吧!在設計RDLC報表時,需要有資料來源,加入資料來源有兩個步驟。

繼續閱讀文章 »

Posted in RDLC報表 | 已加上的標籤: | 7 Comments »

免費的圖表元件 Microsoft Chart Controls for .NET Framwork 3.5

Posted by minying 於 20 一月, 2009

微軟終於有免費的圖表元件讓開發者使用了,Microsoft Chart Controls for .NET Framwork 3.5。

看它的名稱也就知道,.NET Framwork 3.5是必須安裝的。使用前當然是要檢查一下自己的開發環境是否OK囉!

繼續閱讀文章 »

Posted in Microsoft Chart Controls | 已加上的標籤: | Leave a Comment »

第一支RDLC的報表

Posted by minying 於 16 一月, 2009

第一次實作RDLC的報表,連結資料庫並連結至ReportViewer做資料報表的展現。實作的步驟如下:

繼續閱讀文章 »

Posted in RDLC報表 | 已加上的標籤: | Leave a Comment »

e.Cancel = True 取消事件的執行

Posted by minying 於 16 一月, 2009

在每一個事件處理函式中都會帶有[e]參數,e.Cancel=True時,可以取消執行的動作。

    Private Sub TextBox1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating
        If IsNumeric(TextBox1.Text) = False Then
            MsgBox(“輸入的不是數值!!")
            TextBox1.Text = “"
            TextBox1.Focus()
        End If
    End Sub

這樣TextBox1必須是輸入,且是數值資料才可以離開其TextBox,否則連其他按鈕都無法使用。

Posted in VB.NET | Leave a Comment »

RDLC如何設定列印紙張為橫式?

Posted by minying 於 16 一月, 2009

一開始接觸RDLC時,還真不知道要到哪裡去設定報表為橫式列印!總不能在列印時再去改紙張為橫式,這樣太不方便了。在RDLC設計中,並沒有指定紙張格式的選項,它是可以很自由地去定義紙張的大小。 繼續閱讀文章 »

Posted in RDLC報表 | 已加上的標籤: | Leave a Comment »