Hi,
I am making an application in VB6 with SQL SERVER and reports in Crystal Reports 8.0
When I modify some information in database and want to call new report to visualize the information, occurs error OUT OF MEMORY, why?
Is necessary to filter the information for months.
Already I worked with Crystal and VB 6, but it is the first time that I call reports from a database in SQL SERVER.
One of the problems with that I come across myself is that report always does not make refresh that is acceded. How to make autorefresh always that report is called?
Thanks, for any tip.
This is the code that I am to use:
Dim CrystalApp As CRAXDRT.Application
Dim CrystalReport As CRAXDRT.Report
Dim CrystalTable As CRAXDRT.DatabaseTable
Private Sub Form_Load()
On Error GoTo Erro
Dim intMes As Integer
Set CrystalApp = CreateObject("CrystalRuntime.application"
Set CrystalReport = CrystalApp.OpenReport(App.Path & "\rptOrdemPagamento.rpt"
For Each CrystalTable In CrystalReport.Database.Tables
CrystalTable.SetLogOnInfo "box.link.pt", "gap", "gap", "siggap"
Next
intMes = Month(Date)
CrystalReport.RecordSelectionFormula = "{Despesas_Empregado.Mes} =" & intMes & ""
'Atribuição ao CRViewer a source do Report
CRViewer1.ReportSource = CrystalReport
'Mostra Report
CRViewer1.ViewReport
Exit Sub
Erro:
MsgBox Err.Description
I am making an application in VB6 with SQL SERVER and reports in Crystal Reports 8.0
When I modify some information in database and want to call new report to visualize the information, occurs error OUT OF MEMORY, why?
Is necessary to filter the information for months.
Already I worked with Crystal and VB 6, but it is the first time that I call reports from a database in SQL SERVER.
One of the problems with that I come across myself is that report always does not make refresh that is acceded. How to make autorefresh always that report is called?
Thanks, for any tip.
This is the code that I am to use:
Dim CrystalApp As CRAXDRT.Application
Dim CrystalReport As CRAXDRT.Report
Dim CrystalTable As CRAXDRT.DatabaseTable
Private Sub Form_Load()
On Error GoTo Erro
Dim intMes As Integer
Set CrystalApp = CreateObject("CrystalRuntime.application"
Set CrystalReport = CrystalApp.OpenReport(App.Path & "\rptOrdemPagamento.rpt"
For Each CrystalTable In CrystalReport.Database.Tables
CrystalTable.SetLogOnInfo "box.link.pt", "gap", "gap", "siggap"
Next
intMes = Month(Date)
CrystalReport.RecordSelectionFormula = "{Despesas_Empregado.Mes} =" & intMes & ""
'Atribuição ao CRViewer a source do Report
CRViewer1.ReportSource = CrystalReport
'Mostra Report
CRViewer1.ViewReport
Exit Sub
Erro:
MsgBox Err.Description