去看看cashcho翻译的文章吧
很详细的
http://www.csdn.net/develop/read_article.asp?id=12291

解决方案 »

  1.   

    andhttp://www.csdn.net/develop/read_article.asp?id=12292
    http://www.csdn.net/develop/read_article.asp?id=12293
      

  2.   

    把程序发过来,马上给分[email protected]
      

  3.   

    现在问题是如何在报表runtime运行时执行自己的SQL语句还有,如何改变报表上字段显示的文本。谢谢,好累,一定会给分
      

  4.   

    这是我在asp.net下用vb.net写的。调试通过,如果你还需要实现一些统计的图示的话,那么你就必须在把报表先在设计器中做好你想要的是什么炳图,柱图,然后通过dataset来实现。希望对你有点帮助,如果有什么问题在发出来了
    Imports System.Drawing
    Public Class WebForm5
        Inherits System.Web.UI.Page
        Protected WithEvents Button1 As System.Web.UI.WebControls.Button
        Protected WithEvents Button2 As System.Web.UI.WebControls.Button
        Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer#Region " Web Form Designer Generated Code "    'This call is required by the Web Form Designer.
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()    End Sub    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
            'CODEGEN: This method call is required by the Web Form Designer
            'Do not modify it using the code editor.
            InitializeComponent()
        End Sub#End Region    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'Put user code to initialize the page here
            BindReport("Select * from test5")
        End Sub
        Sub BindReport(ByVal SQL As String)        Dim myConnection As New SqlClient.SqlConnection()        myConnection.ConnectionString = "Persist Security Info=False;User ID=sa;pwd=;Initial Catalog=test;Data Source=crm"        Dim MyCommand As New SqlClient.SqlCommand()        MyCommand.Connection = myConnection        MyCommand.CommandText = SQL        MyCommand.CommandType = CommandType.Text        Dim MyDA As New SqlClient.SqlDataAdapter()        MyDA.SelectCommand = MyCommand
            '已建好的DATASET的文件
            Dim myDS As New Dataset2()
            'This is our DataSet created at Design Time      
            MyDA.Fill(myDS, "test5")
            'You have to use the same name as that of your Dataset that you created during design time
            Dim oRpt As New crp3()
            ' This is the Crystal Report file created at Design Time
            oRpt.SetDataSource(myDS)
            ' Set the SetDataSource property of the Report to the Dataset
            CrystalReportViewer1.ReportSource = oRpt        ' Set the Crystal Report Viewer's property to the oRpt Report object that we created
        End Sub    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            BindReport("select * from test5 where sz<500")
        End Sub    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            BindReport("select * from test5")
        End Sub
    End Class
      

  5.   

    super_cha(chawj)朋友,尊重一下别人的劳动成果好不好,
      

  6.   

    其实VB.NET和C#也各有各的好处,没有必要为了一些细微的差别而排斥一种语言。
    C#能做到的,VB.NET基本上也能做到,反过来也一样。
    用什么语言写程序,一方面看个人的爱好,另一方面也看程序的需要。真正能做到兼收并蓄的,是人,而不是那一种语言。
      

  7.   

    哈哈,我也是这样认为,我喜欢VB,更喜欢C,所以我使用C#。
      

  8.   

    连VB和C++都能和平共处,更别说VB.NET和C#了。
      

  9.   

    现在问题是如何实现查询,在程序里控制查询,可以传递参数进去,再进行查询另外,水晶报表的打印是个大问题,不知那位大xia可以出此高招在下定有重赏。