I am new to vb.net crystal report. I have created a dataset,a report and a vb page. I am running a view for the month of jan. so my report looks like

project name jan
aaa 01
bbb 20
ccc 30

but i want a report like the below

project name jan feb march april ..... dec
aaa 01 25 .. ...
bbb 20 25
ccc 30 15

ie the query has to run for all months and it must display the values...how do i run the same query for all the months


hope i am clear please help me out

HOW DO DATA BIND IN CRYSTAL REPORT IN VB.NET


Dim rpt As New CrystalReport1() 'The report you created.
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand()
Dim myDA As New SqlDataAdapter()
Dim myDS As New sampleDataSet() 'The DataSet you created.

Try

myConnection = New SqlConnection("server=localhost;uid=selvam1;pwd=bss;database=sample")
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT * FROM Sample1"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand

myDA.Fill(myDS, "Sample1")
rpt.SetDataSource(myDS)
crv1.ReportSource = rpt

Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try

This article has been dead for over six months. Start a new discussion instead.