Monthly report in VB6 using Crystal reports 9
Hello to all.. im wondering how can i generate a more accurate monthly report in VB6 using crystal reports 9, what i have done so far is a basic monthly report (which is sorted of course by months). however, what i want to do now is not only it is sorted by months but also by its status. here is my code so far, im using SQL Server 2000..
strsql = "{ADMmemodetails.memoappdate} in DateTime (" & yr & ", " & m & ", " & dey & ", 00, 00, 00) to DateTime (" & Trim(yr2) & ", " & Trim(m2) & ", " & Trim(dey2) & ",00, 00, 00)"
Set miReport = miCRApp.OpenReport(App.Path & "\reports\rptmonthlyADM.rpt")
Call GenMonthlyAnn
Sub GenMonthlyAnn()
With miReport
.RecordSelectionFormula = strsql
End With
With frmrptview.crviewer
.ReportSource = miReport
.ViewReport
.Zoom "90"
.Visible = True
End With
Set miCRApp = Nothing
Set miReport = Nothing
frmrptview.Show
End Sub
this is only sorted by months, how can i sort it also by status?
thanks in advance.. need your advices and tips here.. :cool:
Re: Monthly report in VB6 using Crystal reports 9
No idea, that strsql does not look like any sql statement I have ever saw but then Crystal has always been weird.
In the report engine I use it would be
Code:
Select * from Table Order By MemoAppDate, Status
Re: Monthly report in VB6 using Crystal reports 9
what engine are you using datamiser? yeah crystal is weird as for the code it uses,..
Re: Monthly report in VB6 using Crystal reports 9
I use Active Reports, it supports VB code, ADO DAO or RDO recordsets, pretty much works like a form object with the addition of settings for report headers, footers, groups and detail.
It is very easy to use if you know your way around VB. I started using it back in VB5 after struggling with Crystal for a while. Big improvement over Crystal but it carries a hefty price tag.