تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
FilterString فى تقرير DevExpress
#3
   
الف شكر لحضرتك على تعبك معايا
ليا طلب تانى لو ينفع تساعدى اكون شكر لحضرتك
عاوز اضيف   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 ObjectByVal e As System.EventArgsHandles 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.TextThen
                    MsgBox
("القيمة التى قمت بادخالها غير صحيحة!")
 
                   Exit Sub
                End 
If
 
               param1.Type GetType(System.Decimal)
 
           Case 1
                comboString 
"[BookDay]"
 
               If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsDate(TextBoxX1.TextThen
                    MsgBox
("القيمة التى قمت بادخالها غير صحيحة!")
 
                   Exit Sub
                End 
If
 
               param1.Type GetType(System.DateTime)
 
           Case 2
                comboString 
"[BookValue]"
 
               If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.TextThen
                    MsgBox
("القيمة التى قمت بادخالها غير صحيحة!")
 
                   Exit Sub
                End 
If
 
               param1.Type GetType(System.Decimal)
 
           Case 3
                comboString 
"[SerValue]"
 
               If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.TextThen
                    MsgBox
("القيمة التى قمت بادخالها غير صحيحة!")
 
                   Exit Sub
                End 
If
 
               param1.Type GetType(System.Decimal)
 
           Case 4
                comboString 
"[DownValue]"
 
               If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.TextThen
                    MsgBox
("القيمة التى قمت بادخالها غير صحيحة!")
 
                   Exit Sub
                End 
If
 
               param1.Type GetType(System.Decimal)
 
           Case 5
                comboString 
"[Total]"
 
               If String.IsNullOrWhiteSpace(TextBoxX1.Text) Or Not IsNumeric(TextBoxX1.TextThen
                    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 
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
FilterString فى تقرير DevExpress - بواسطة noway - 17-01-17, 07:56 PM
RE: FilterString فى تقرير DevExpress - بواسطة Atef Bidier - 19-01-17, 08:33 PM
RE: FilterString فى تقرير DevExpress - بواسطة noway - 20-01-17, 11:42 AM
RE: FilterString فى تقرير DevExpress - بواسطة Atef Bidier - 20-01-17, 10:31 PM
RE: FilterString فى تقرير DevExpress - بواسطة noway - 21-01-17, 10:37 AM


التنقل السريع :


يقوم بقرائة الموضوع: