|
-
Aug 11th, 2003, 09:26 PM
#1
Thread Starter
Hyperactive Member
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.
-
Aug 12th, 2003, 05:16 AM
#2
Frenzied Member
See if this helps
VB Code:
Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
rpt = New CrystalReport1
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
-
Aug 14th, 2003, 05:13 PM
#3
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|