hmm... how does this grouping works? will it handle to different queries?
such as select studentname from student where gender = 'Female' for one group then select studentname from student where gender = 'Male' for the other one? this is my idea on how to generate that report. please corrent me if im wrong.. @dee-u are u a filipino?
How are you setting the report datasource? If your using a DataEnvironment then there is a grouping tab in the command properties window. If your creating an ADO recordset then you have to use a DataShape.
whew! its quite complicated than i thought.. do u have some examples? using dataenvironment and ado.. ive used this two but in simple reporting and querying only..
________ Bmw V
Last edited by rothj0hn; Feb 15th, 2011 at 01:23 PM.
If your using a Dataenvironment then use the properties to set your grouping.
This is a DataShape example
Code:
Dim rsData As New ADODB.Recordset, cFinalCond$
Dim conReport As New ADODB.Connection
cFinalCond = "SHAPE {SELECT tags.*,us.*,iif(trim(tags.status)='I','Invoiced','Not Invoiced') as invstatus from tags inner join users us on us.userid=tags.userid" } AS Tag " & _
"APPEND ((SHAPE {SELECT * From tagsdetail order by line} As Command1) " & _
"RELATE tagnumber To tagnumber)"
'Open a DATA Shape Connection For Reports
With conReport
.Mode = adModeShareDenyNone
.Provider = "MSDataShape" 'Microsoft Provider for Data Shaping
.ConnectionString = "Data Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = c:\somefolder\yourdatabase"
.Open
End With
If (conReport.State And adStateOpen) > 0 Then
With rsData
.ActiveConnection = conReport
.LockType = adLockReadOnly
.CursorType = adOpenStatic
.Open cFinalCond
End With
End If
'Set the new Data source of Report
Set rptDataReport.DataSource = rsData
Yun...it's good to know that I'll be asking this to a kababayan. Is it possible that I can create a transaction receipt just by using data report? From the example that I've seen it seems that the report displays a list. I just need one row from the database (I'm using MS Access and SQL) containing the Payment No, Payment and payment type to create the receipt. Is it also possible that one report can use two different sets of table.