Hi,
How can i make my report show only one record? and how can i make it show only the records that have the same value in one particular field?
Im using vb6 with ms access.
thanks
Printable View
Hi,
How can i make my report show only one record? and how can i make it show only the records that have the same value in one particular field?
Im using vb6 with ms access.
thanks
Try parameters see a sample code below
In the above Iam using combobox to determine the selection criteria and pass it to the parameter created in the report. note the combo is in another form and I am capturing it by a public variable "comboText".VB Code:
Dim appln As New CRAXDDRT.Application Dim report As New CRAXDDRT.report Dim rep As New frmRptRegionIndividual Public comboText As String Public comboItemData As Integer Private Sub Form_Load() Me.MousePointer = vbHourglass Set report = appln.OpenReport(App.Path & "\ReportsManual\regionwiseIndividual.rpt") report.Database.Tables(1).Location = App.Path & "\Database\Cases.mdb" report.ParameterFields.GetItemByName("RgnID").AddCurrentValue (comboItemData) CRViewer91.ReportSource = report CRViewer91.ViewReport Me.MousePointer = vbDefault End Sub Private Sub Form_Resize() CRViewer91.Top = 0 CRViewer91.Left = 0 CRViewer91.Height = ScaleHeight CRViewer91.Width = ScaleWidth End Sub
Hope u find it useful.