PDA

Click to See Complete Forum and Search --> : Crystal


Jan 26th, 2000, 09:18 PM
I have created my first crystal report and now want to access it through VB.

I have added the Crystal Reports component

I have dimmed as a Crystal Report

Do I now use the set command to point the program to my report?


Dim NameGraph As CrystalReport
Set NameGraph = "c:\reports\eventnamegraph.rpt"


This gives me a type mismatch error.

Thanks in advance


------------------
Boothman
There is a war out there and it is about who controls the information, it's all about the information.

WadeD
Jan 26th, 2000, 09:25 PM
Boothman,
Here's an example. The printreport method generates a print preview by default. The formula examples aren't needed unless you want to dynamically pass formula values.


With crystlrpt1
.ReportFileName = App.Path & "/rptMain.rpt"
.Formulas(0) = "fTitle= 'Computer Service/Request Management'"
.Formulas(1) = "fSortBy= '" & sSortMsg & "'"
.Formulas(2) = "fFilterBy= '" & sFilterMsg & "'"
.PrintReport
End With

Regards,
Wade

Jan 26th, 2000, 09:37 PM
What I would like to do is pass a date range for my report. The dates are @FromDate and @ToDate (self-explanitory).
Then I would like to generate the report based on that information.
Thanks.

------------------
Boothman
There is a war out there and it is about who controls the information, it's all about the information.