| | |
showing report groupwise in a data report
![]() |
•
•
Join Date: Dec 2008
Posts: 287
Reputation:
Solved Threads: 1
Can any one tell me how should i generate report on the basis of groupwise since right know i placed department,job centre,cost centre ,requested by, delivery point, delivery date req, suggested
vendor on the detail section1. but it is comming two times kindly
see the attachment if not understand.
here is the code what i written
vendor on the detail section1. but it is comming two times kindly
see the attachment if not understand.
here is the code what i written
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command4_Click() Set rs = New ADODB.Recordset RECORDSQL = "SELECT MR.dept_name,MR.job_no,MR.cost_centre, MR.emp_name,MR.del_point, MR.del_time,MR.sug_vendor,MR.mr_date,MR.manager,MR.item_code,MR.productname,MR.unit,MR.qty, Count(*) AS NoOfEntries From MR Group by MR.dept_name,MR.job_no,MR.cost_centre, MR.emp_name,MR.del_point, MR.del_time,MR.sug_vendor,MR.mr_date,MR.manager,MR.item_code,MR.productname,MR.unit,MR.qty,MR.req_no HAVING (((MR.Req_no)=" & Text12.Text & "));" rs.Open RECORDSQL, 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("sug_vendor").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
Last edited by firoz.raj; Jan 14th, 2009 at 2:39 am.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Check a file exists on a website
- Next Thread: Help required
| Thread Tools | Search this Thread |
* 6 2007 access activex add age basic beginner birth bmp calculator cd cells.find click client code college connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit excel excelmacro file filename form header iamthwee image inboxinvb internetfiledownload listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading remotesqlserverdatabase report save search sendbyte sites sql sql2008 sqlserver subroutine tags time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web windows





