Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Tuesday, March 20, 2012

Crystal Reports 10 and VB6

I am new to using Crystal Reports with VB.
I am trying to call a crytsl reports reports from a vb program any ideas will help.
Thanks in advance.Here's one example. You create a recordset in VB. You need to have "Crystal Report Engine 8 Object Library" in order for this to work. This example is based off Crystal Reports 8.5, so you'll have to adjust it to your needs for version 10.

Dim CrApp1 As New CRPEAuto.Application
Dim CrRep As CRPEAuto.Report
Dim CrDB As CRPEAuto.Database
Dim CrTables As CRPEAuto.DatabaseTables
Dim CrTable As CRPEAuto.DatabaseTable

'open report
Set CrRep = CrApp1.OpenReport(strReportPath)

'set the database object to the reports database
Set CrDB = CrRep.Database

'Set the databasetables object
Set CrTables = CrDB.Tables

'set the databasetable object to the first table in the report
Set CrTable = CrTables(1)

'sets ADO recordset as the data for the first table
CrTable.SetPrivateData 3, rsData

'preview the report with the recordset as the data
CrRep.Preview

You can also use Report Designer Component (RDC). It's set up similar, but I just started playing around with it and can't get it to work yet. Do a search on Crystal's website. They have PLENTY of code examples for RDC.

http://support.businessobjects.com/search/advsearch.asp

Sunday, March 11, 2012

Crystal Report from Web in Dot Net

Hello,
Hello, How to call Crystal Report from Web?
the problem that i get is at the web, it asks about username and password? how to solve it. can u send me some code for it?Go to control panel and click Administrative tools-->Data Sources(odbc)-->Select user dsn tab and click add button-->Choose ur database driver click finish button and then u select database from there with ur database user name and password....

i hope this will help u ...