الف شكر لحضرتك على تعبك معايا
ليا طلب تانى لو ينفع تساعدى اكون شكر لحضرتك
عاوز اضيف combobox مع Textbox يكون بامكانى اختار الحقل التى اريد اجراء عملية الفلترة FilterString
الكود اللى استخدمته كالتالى ................هو محتاج بعض المساعدة
PHP كود :
Imports DevExpress.XtraReports.UI
Imports DevExpress.XtraReports.Parameters
Imports DevExpress.XtraEditors
Public Class BookingReportFor
Private Sub ButtonX1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
Dim report As New XtraReport1
Dim comboindex As Byte = ComboBoxEx1.SelectedIndex
Dim comboindex2 As Byte = ComboBoxEx2.SelectedIndex
Dim comboString As String
Dim comboString2 As String
Dim param1 As New Parameter()
param1.Name = "Total"
Select Case comboindex
Case 0
comboString = "[BookID]"
If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.Text) Then
MsgBox("القيمة التى قمت بادخالها غير صحيحة!")
Exit Sub
End If
param1.Type = GetType(System.Decimal)
Case 1
comboString = "[BookDay]"
If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsDate(TextBoxX1.Text) Then
MsgBox("القيمة التى قمت بادخالها غير صحيحة!")
Exit Sub
End If
param1.Type = GetType(System.DateTime)
Case 2
comboString = "[BookValue]"
If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.Text) Then
MsgBox("القيمة التى قمت بادخالها غير صحيحة!")
Exit Sub
End If
param1.Type = GetType(System.Decimal)
Case 3
comboString = "[SerValue]"
If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.Text) Then
MsgBox("القيمة التى قمت بادخالها غير صحيحة!")
Exit Sub
End If
param1.Type = GetType(System.Decimal)
Case 4
comboString = "[DownValue]"
If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.Text) Then
MsgBox("القيمة التى قمت بادخالها غير صحيحة!")
Exit Sub
End If
param1.Type = GetType(System.Decimal)
Case 5
comboString = "[Total]"
If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.Text) Then
MsgBox("القيمة التى قمت بادخالها غير صحيحة!")
Exit Sub
End If
param1.Type = GetType(System.Decimal)
End Select
param1.Value = TextBoxX1.Text
param1.Description = "Total: "
param1.Visible = True
Select Case comboindex2
Case 0
comboString2 = " > "
Case 1
comboString2 = " >= "
Case 2
comboString2 = " < "
Case 3
comboString2 = " <= "
Case 4
comboString2 = " = "
End Select
report.Parameters.Add(param1)
report.FilterString = comboString & comboString2 & "[Parameters.Total]"
report.RequestParameters = False
Dim pt As New ReportPrintTool(report)
pt.AutoShowParametersPanel = False
pt.ShowPreviewDialog()
End Sub
End Class
