
how do I gather report information in .Net?
Hi Bob,
You can still use the COM objects with .NET and use pretty much the same
code that you have in VB6 (of course the properties and methods stay the
same). The other alternative is to go 100% .NET. But I don't recommend this.
.NET is lacking many features that you get with the developer version of
CR8.5/9.0 and if you are a sophisticated developer then you will really be
upset by this missing functionality.
If you want to see how to use CR.NET, I wrote a free ebook about it. Lots of
good stuff I know you will like.
A Crystal Reports.NET book for programmers? Its free!
* Covers ASP.NET and Windows Forms
* Teaches all phases of report development
* Alerts you to the bugs and how to get around them
* Maps out the complex ReportDocument object model
* Shows how to perform runtime customization
* Demonstrates all options of connecting with ADO.NET
* Gives complete code listings for every concept presented
www.CrystalReportsBook.com?cpgn=ngcr_031203
HTH,
Brian Bischof
Quote:
> I'm updating a crystal report information gatherer from VB6 to VB.Net. The
> old gatherer accessed and recorded cetrain report properties:
> Dim crapplication As New CRAXDRT.Application
> Dim report As CRAXDRT.report
> Set report = crapplication.OpenReport(path & subdir & "\" & filename)
> loc = report.Database.Tables.item(1).Location
> dll = report.Database.Tables.item(1).DllName
> server = report.Database.Tables.item(1).LogOnServerName
> dbdesc = report.Database.Tables.item(1).DecriptiveName
> Now I'm trying to use the crystal report viewer object to gather this
> information but I'm having a hard time finding the correct properties. In
> addition, I try to get parameter default values with
> .ParameterFieldInfo(0).CurrentValues.Item(0), only the ParamaterValue
class
> cannot be converted to string and has no property to give it!
> So my questions are these:
> 1. Should I be using a different Crystal object for report
> information-gathering?
> 2. If not, how do I access the information I need and how do I supress the
> viewer from running the report (and throwing up a connection and parameter
> dialogue) when I set the .ReportSource property?
> Bob