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:
  1. Private Sub print_Click()
  2. Dim select_statement
  3. 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;"
  4. qry (select_statement)
  5. count1 = rs.RecordCount
  6.    
  7.     If count1 <> 0 Then  
  8.        
  9.     Set rptpricequote.DataSource = rs    
  10.      
  11.      rptpricequote.Show vbModal
  12.      Else
  13.          
  14.      MsgBox "There is no such Price Quote information"
  15.      End If
  16. End Sub