Viewing/Printing a CR XI Report from VB6 with filters
- From: rsolano@xxxxxxxxxxxxxxxxxxxxxxx
- Date: 17 Jan 2007 07:59:32 -0800
First time developing with Crystal XI R2, use to work with Crystal 8.5
Ok, having a lot of fun running a report into a viewer with some
filters. I created a report, then just filter by a string and view it.
This should be so easy and I am having so much trouble. Please help.
enviroment: VB6 using Crystal XI R2
This is the code I have.
Dim Appl As CRAXDRT.Application
Dim xReport As CRAXDRT.Report
Set xReport = Appl.OpenReport("P:\VBReports\TTDaily.rpt",
crOpenReportByTempCopy)
xReport.RecordSelectionFormula = "{QReport.EnterDate} = #" &
CDate(txtDate1) & "#"
CRviewer1.ReportSource = xReport
CRviewer1.ViewReport
When I executed this code, the reports print on the viewer with no
data, I only see my headings. If I removed the .RecordSelectionFormula
the entire reports prints fine, except that it prints all dates. I try
using a .sortbyFormula on the viewer but that crashes at runtime.
Any idea what is wrong, or if you have another way, can you help.
Ray
.
- Prev by Date: Re: VS 2005 and Crystal XI
- Next by Date: Thanks
- Previous by thread: OT: Using Crystal Reports XI with ACT! 2007
- Next by thread: Re: Current Date -1
- Index(es):
Relevant Pages
|