Main Report and Subreport from different datasources in ASP 
Author Message
 Main Report and Subreport from different datasources in ASP

Is it possible to call through an ASP a report where main report uses
SQL server and subreport uses Oracle view.
I use the SetLogonInfo .

Below is a code that I use
        Set CrystalApp=Server.CreateObject("CrystalRuntime.Application")
        Set Report = CrystalApp.OpenReport(sFullPath, 1)
        Report.MorePrintEngineErrorMessages = False
        Report.EnableParameterPrompting = False
        Set RptDatabase = Report.Database

For Each Table in RptDatabase.Tables

Table.SetLogonInfo Table.LogOnServerName, Table.LogOnDatabaseName,

For Each Section in Report.Sections
        For Each Obj in Section.ReportObjects
                IF Obj.Kind = 5 Then 'SubReport
                        set SubObj=Report.OpenSubReport(obj.SubreportName)
                        For Each Table in SubObj.Database.Tables
Table.SetLogonInfo Table.LogOnServerName, Table.LogOnDatabaseName,
Table.LogOnUserID, CStr(SQLPasswordName)
                                End if

And I have an error msg:
Error Occurred Exporting Report: Server has not yet been opened.

Please help.

Sun, 02 Oct 2005 02:42:50 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Crystal Reports bug when connecting via ODBC to 2 different datasources

2. filtering subreports based on main report fields

3. main report with subreport in columns

4. Accessing Subreport field from main report in Crystal

5. Summaries of SubReports in the main report

6. Get subreport's summary from main report

7. add subreport(s) to main report

8. Subreport does not show when main report is blank

9. Subreport is not showing when main Report does not have records

10. problem linking a main report to a subreport

11. Displaying Subreport Totals Fields in Main Report

12. Linking subreport to main report using multiple-value or range parameters


Powered by phpBB® Forum Software