Hi,
I'm using a data report. I'm retrieveing data from 2 to 3 tables, some fields just need to printed once. Like the Price Quote no, date etc
I tried to use distinct but it displays a error, "Undefined function distinct in expression.
The report is not bound to a dataenvironment.
I need to just group the price quote no and date on top of the page and let other displays in several rows.
But I'm not able to group it.
How to do it in the data report"
VB Code:
Private Sub print_Click() Dim select_statement select_statement = "select custname,dateofquote,custpqdetails.quoteid,product,qty,rateperlb from custpqdetails,custpq where custpqdetails.quoteid ='" & quoteid & "' and custpq.quoteid='" & quoteid & "' GROUP BY custname, dateofquote, custpqdetails.quoteid,product, qty, rateperlb;" qry (select_statement) count1 = rs.RecordCount If count1 <> 0 Then Set rptpricequote.DataSource = rs rptpricequote.Show vbModal Else MsgBox "There is no such Price Quote information" End If End Sub


Reply With Quote