Using Crystal Report 9 with VB.Net 
Author Message
 Using Crystal Report 9 with VB.Net

Hi,

I have used Crystal Reports 9(the full product), to design all my reports i
want my VB.net2003 app to use.

When using the CR9 design tool, you have to select the database connection.
When designing the reports against the test db, we use our connection.

However when the app is distributed that report files(with the saved
connection setting) will off course not work.

Is there away to have my Crystal reports 9 reports, use my vb.net2003
connection object ?

There are also some selection critiera required for some of the reports. How
do i define these. the vb.net03 product just has a input box for selection
criteria with no syntax help, and I have not been able to workout the
correct syntax for entering a criteria of 'company_id =109'.

Thanks



Mon, 07 Nov 2005 23:08:43 GMT  
 Using Crystal Report 9 with VB.Net
Hi,

Dont know how you access the report, I am using 8.5 but this will maybe give
you a hint atleast.

    For I = 1 To rpt.Database.Tables.Count

rpt.Database.Tables.Item(I).SetLogOnInfo(DatabaseConnection.sServer, "D" &
DatabaseConnection.nCompany_ID, DatabaseConnection.sUsername,
DatabaseConnection.sDatabasePassword)
    Next

            For Each Sect In rpt.Sections
                For Each rObj In Sect.ReportObjects
                    If rObj.Kind = CRAXDDRT.CRObjectKind.crSubreportObject
Then
                        rSub = rObj
                        For I = 1 To
rSub.OpenSubreport.Database.Tables.Count

rSub.OpenSubreport.Database.Tables(I).SetLogOnInfo(DatabaseConnection.sServe
r, "D" & DatabaseConnection.nCompany_ID, DatabaseConnection.sUsername,
DatabaseConnection.sDatabasePassword)
                        Next
                    End If
                Next
            Next

Regards
Fredrik Melin


Quote:
> Hi,

> I have used Crystal Reports 9(the full product), to design all my reports
i
> want my VB.net2003 app to use.

> When using the CR9 design tool, you have to select the database
connection.
> When designing the reports against the test db, we use our connection.

> However when the app is distributed that report files(with the saved
> connection setting) will off course not work.

> Is there away to have my Crystal reports 9 reports, use my vb.net2003
> connection object ?

> There are also some selection critiera required for some of the reports.
How
> do i define these. the vb.net03 product just has a input box for selection
> criteria with no syntax help, and I have not been able to workout the
> correct syntax for entering a criteria of 'company_id =109'.

> Thanks



Tue, 08 Nov 2005 01:21:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. i am using vb.net and crystal reports for visual studio.net

3. VB.net and crystal reports.net Multiple reports

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

5. Problem in Generating reports using Crystal in VB.Net

6. using crystal 9 Report in VB.net

7. Crystal Reports section using VB.NET

8. Problem in Generating reports using Crystal in VB.Net

9. Creating RCAPI calls from Crystal Reports and viewing the report using a web application in .net

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

11. Error in temp file in running crystal report for .net in vb.net

12. Crystal Reports from ASP.NET without compiling VB.NET on SQL/ADO changes

 

 
Powered by phpBB® Forum Software