Results 1 to 3 of 3

Thread: Crystal Report Select Expert to Run Time

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Crystal Report Select Expert to Run Time

    During design I do this:

    In my CrystalReport1.rpt, I right click on the detail section, I select "Select Expert" then I choose New tab, then dropdown(left),I choose "equal to"(right), I type "Programmer"

    But how about during run? How can I do this?

    Kindly help me to solve this? please.please.

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    See if this helps
    VB Code:
    1. Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
    2. rpt = New CrystalReport1
    3. rpt.DataDefinition.RecordSelectionFormula = "Your_Select_Criteria_Here"
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3
    New Member sphudson's Avatar
    Join Date
    Aug 2003
    Location
    Planet Earth - Lincoln Nebraska
    Posts
    5
    here is some more samples.

    Code:
     Private Sub GO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGO.Click
            Dim EngineerReport As New frmReport()
            Dim StartDate, Month, Day, Year As String
            EngineerReport.MdiParent = NewParent
            Month = Cal1.SelectionStart.Month
            Day = Cal1.SelectionStart.Day
            Year = Cal1.SelectionStart.Year
            StartDate = "{datab.datesent}>=DateTime(" & Year & "," & Month & "," & Day & ",00,00,00)"
    
            If CallingForm = "Engineer" Then
                EngineerReport.pReportName = "\Engineer.rpt"
                EngineerReport.crvReport.SelectionFormula = StartDate
                EngineerReport.crvReport.DisplayGroupTree = True
                EngineerReport.Show()
            ElseIf CallingForm = "Sales" Then
                EngineerReport.pReportName = "\Sales.rpt"
                StartDate = "{JOBRECORD.ORDERDATE}>=DateTime(" & Year & "," & Month & "," & Day & ",00,00,00)"
                EngineerReport.crvReport.SelectionFormula = StartDate
                EngineerReport.crvReport.DisplayGroupTree = True
                EngineerReport.Show()
            ElseIf CallingForm = "MFOrder" Then
                EngineerReport.pReportName = "\MarginForecastOrderDate.rpt"
                StartDate = "{JOBRECORD.Sale Price} < $1.00 and {JOBRECORD.ORDERDATE} >=DateTime(" & Year & "," & Month & "," & Day & ",00,00,00)"
                EngineerReport.crvReport.SelectionFormula = StartDate
                EngineerReport.crvReport.DisplayGroupTree = True
                EngineerReport.Show()
            ElseIf CallingForm = "MFShip" Then
                EngineerReport.pReportName = "\MarginForecastShipdate.rpt"
                StartDate = "{JOBRECORD.DateofShipment} >=DateTime(" & Year & "," & Month & "," & Day & ",00,00,00)"
                EngineerReport.crvReport.SelectionFormula = StartDate
                EngineerReport.crvReport.DisplayGroupTree = True
                EngineerReport.Show()
            ElseIf CallingForm = "SalesVSBudget" Then
                EngineerReport.pReportName = "\SalesVsBudget.rpt"
                StartDate = "{JOBRECORD.ORDERDATE}>=DateTime(" & Year & "," & Month & "," & Day & ",00,00,00)"
                EngineerReport.crvReport.SelectionFormula = StartDate
                EngineerReport.crvReport.DisplayGroupTree = True
                EngineerReport.Show()
            ElseIf CallingForm = "QuotesByMonth" Then
                EngineerReport.pReportName = "\QuotesByMonth.rpt"
                EngineerReport.crvReport.SelectionFormula = StartDate
                EngineerReport.crvReport.DisplayGroupTree = True
                EngineerReport.Show()
            End If
    
        End Sub
    In the land of the blind the one eyed man is king.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width