Hiiiiiiiiiii,:(

I got a serios problem this time..

I need to create report each field in the report has different condition so,

when i write the select statement I can't put all conditions in one where clause because

it will check all of them together!!!!

I used select union all select but the only one works is the first one

any help plz

:'(

Recommended Answers

All 2 Replies

can u post some of your code so i can understand what are u requesting??? :)

B3_Select = "select Ba1"+ _
"from (B) where " + _
" Ba1<3.9 or Ba1 > 6.1" + _
" Union All " + _
"select " Ba2 " + _
"from B where " + _
" Ba2 < 2.9 and Ba2 > 9.4"


Dim da As OleDbDataAdapter = New OleDbDataAdapter(B3_Select, System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ToString())

Dim ds3 As New System.Data.DataSet

da.Fill(ds3, "B")


Dim MyReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument

MyReport.Load(Server.MapPath("test.rpt"))


MyReport.SetDataSource(ds3)
Me.CrystalReportViewer1.ReportSource = MyReport


Me.CrystalReportViewer1.DataBind()
Me.CrystalReportViewer1.ShowFirstPage()

This is my code... it takes the first select only!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.