| | |
getting condtional report on the basis of field
![]() |
•
•
Join Date: Dec 2008
Posts: 5
Reputation:
Solved Threads: 0
sir
i want if user click on product id all the detail should come on the data report it should come itemwise all the required field is com.
but problem is that all the records is comming more that one time
kindly help me i have written a code in command1_click it is working fine but need is that when user put item code in form those records which is similar it should come group wise here is the
When report is comming department , cost centre, Cost Centre manager(fields) ,requested by ..
are comming two times why according to Iso certified report it should come one time here is the code.
code
i want if user click on product id all the detail should come on the data report it should come itemwise all the required field is com.
but problem is that all the records is comming more that one time
kindly help me i have written a code in command1_click it is working fine but need is that when user put item code in form those records which is similar it should come group wise here is the
When report is comming department , cost centre, Cost Centre manager(fields) ,requested by ..
are comming two times why according to Iso certified report it should come one time here is the code.
code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command4_Click() Dim mr As Integer mr = InputBox("enter a mr no") Set rs = New ADODB.Recordset rs.Open "select * from MR where req_no = " & CStr(mr), con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then With DataReport2.Sections("section1").Controls .Item("text1").DataField = rs.Fields("productname").Name .Item("text2").DataField = rs.Fields("qty").Name .Item("text3").DataField = rs.Fields("unit").Name .Item("text4").DataField = rs.Fields("dept_name").Name .Item("text5").DataField = rs.Fields("job_no").Name .Item("text6").DataField = rs.Fields("cost_centre").Name .Item("Text7").DataField = rs.Fields("Emp_name").Name .Item("text8").DataField = rs.Fields("mr_date").Name .Item("text9").DataField = rs.Fields("del_point").Name .Item("TEXT10").DataField = rs.Fields("MANAGER").Name .Item("TEXT11").DataField = rs.Fields("REQ_NO").Name End With Set DataReport2.DataSource = rs DataReport2.Orientation = rptOrientLandscape DataReport2.Refresh DataReport2.Show vbModeless End If End Sub[ATTACH]8800
Last edited by Ancient Dragon; Jan 9th, 2009 at 7:22 pm. Reason: add code tags
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Save in MS Word
- Next Thread: VB6 complier
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





