Converting Crystal Report embedded in VB 6 to a VB .NET Web Form 
Author Message
 Converting Crystal Report embedded in VB 6 to a VB .NET Web Form


I am having trouble converting reports into Visual Studio .NET

The original reports are embedded into a VB 6 project and run using the
Crystal Reports RDC.

I need to be able to pull these reports, connect it to a
CrystalDecisions.Web.CrystalReportViewer on a Web Form and run it against a
given data set.

The data set needs to be set at the code level since I do not know the data
source at design time.

I have tried going into VB 6, pulling up a report, Saving the report to a
Crystal Report file (.RPT), Going to my VS .NET VB Web App, importing it in.
No problem.  I can attach it to a CrystalDecisions.Web.CrystalReportViewer.
No problem.  When run the report does come up.  The problem is that the data
used to generate the report is not coming from the data set that I set using
the SetDataSource method of
CrystalDecisions.CrystalReports.Engine.ReportDocument.  Instead it's coming
from the original data source.  How do I reset this without losing my report
definition and basically having to recreate the whoe thing?!?!?

        Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument =
New rptCustSum()

        m_Connection = New
System.Data.OleDb.OleDbConnection("Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=SA;Initial Catalog=Service;Data Source=BOB;Use Procedure
for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=BOB;Use
Encryption for Data=False;Tag with column collation when possible=False")

        m_Adapter = New System.Data.OleDb.OleDbDataAdapter("SELECT 'SORT' as
SortKey, LastName, FirstName, Customer.Add1, Customer.Add2, Customer.City,
Customer.State, Customer.Zip, Customer.Phone1, Customer.Phone2,
Customer.Phone3, Customer.Phone4, Customer.lblPhone1, Customer.lblPhone2,
Customer.lblPhone3, Customer.lblPhone4, Location.CustNo, Location.LocNo,
Location.Add1 as LocAdd1, Location.Add2 as LocAdd2, Location.City as
LocCity, Location.State as LocState, Location.Zip as LocZip, Location.Phone1
as LocPhone1, Location.Phone2 as LocPhone2, Location.Phone3 as LocPhone3,
Location.Phone4 as LocPhone4, Location.lblPhone1 as LoclblPhone1,
Location.lblPhone2 as LoclblPhone2, Location.lblPhone3 as LoclblPhone3,
Location.lblPhone4 as LoclblPhone4 FROM Customer INNER JOIN Location ON
Customer.CustNo = Location.CustNo", m_Connection)

        m_DataSet = New System.Data.DataSet()
        m_Adapter.Fill(m_DataSet, "CustSum_TTX")


        ReportViewer.ReportSource = rpt


Thanks in advance,

Bob Trabucco
Coastal Computer Corporation

Tue, 14 Sep 2004 05:07:42 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Converting Crystal Report embedded in VB 6 to a VB .NET Web Form

2. Crystal Reports 8.5 (VB6) to Crystal Reports NET (VB.NET) conversion

3. Converting Embedded VB programs to VB.NET

4. VB.NET: Steps for Converting a Windows .NET Application to a Web .NET Application

5. Convert VB.Net to C#, convert C# to VB.Net

6. export crystal enterprise report in from web

7. vb .net crystal reports not compatible with Crystal Reports 8.5

8. and crystal Multiple reports

9. Web Reports (ASP.NET and Crystal Reports for .Net)

10. VB.NET with ASP.NET web forms

11. i am using and crystal reports for visual

12. SetDataSource not working with Crystal Reports .NET in VB.NET


Powered by phpBB® Forum Software