Viewing/Printing a CR XI Report from VB6 with filters



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

.



Relevant Pages

  • Re: Parameters Dialog Box
    ... EnableParameterPrompting property in the viewer object. ... > This should go before you set the report source. ... > Robert Schuldenfrei ... >>> I have a vb.net app using crystal reports. ...
    (microsoft.public.vb.crystal)
  • Re: Parameters Dialog Box
    ... This is not for the viewer, but for the report. ... EnableParameterPrompting property in the viewer object. ... > Robert Schuldenfrei ... >>> I have a vb.net app using crystal reports. ...
    (microsoft.public.vb.crystal)
  • Re: Parameters Dialog Box
    ... Bob, ... The report is what needs the parameter prompting turned off. ... ReportSource in the viewer to myReport ... >> Dedham, MA 02026 ...
    (microsoft.public.vb.crystal)
  • Re: SpecialVarFieldDefinition
    ... Brian Bischof ... >> the report in the viewer, calling ShowLastPage() and then calling ... >> the viewer or see the pages bouncing around, ...
    (microsoft.public.vb.crystal)
  • Landscape orientation Crystal Viewer
    ... I thought I could adjust the viewer properties without any further aid from ... When I send the report to the viewer, using the statements listed below, the ... > place a crystal report viewer on the form, ...
    (microsoft.public.dotnet.languages.csharp)