Hi
I use the Brian book at www.crystalreportsbook.com by
Brian Bischof, it is free and informative. Please take a
look, normally I use DataSet to create
Crystal Report after that populate another dataset and put the data in
the new instance of the Crystal report that I create. All
in that book.
Good Luck
Quote:
>-----Original Message-----
>Hello all,
>I am using Visual Studio .NET to create my reports. I am
connecting to the
>database through ODBC, but I am not able to execute the
SQL query and
>create report from that query. Here is the sample code I
have in my click
>event of a button:
>Private Sub btnCreateReport_Click(ByVal sender As
System.Object, ByVal e
Quote:
>As System.EventArgs) Handles btnCreateReport.Click
> Dim cn As OdbcConnection
> Dim mystring As String = "Select * from pc WHERE
priority_code =
>1"
> Dim cmd As OdbcCommand = New OdbcCommand(mystring)
> cn = New OdbcConnection
("dsn=DR_SYSTEM;uid=abc;pwd=xyz")
Quote:
> cn.Open()
> MsgBox("Connected")
> cn.Close()
> End Sub
>I don't know how to execute my query (mytstring) and
create a report from
Quote:
>there. How do I execute my queries, and bind it to the
report? What code
>do I need to put in between connection open and close?
(or anywhere else)
>Any help will be really appreciate,
>Aleem
>.