SubReport Designer Component (ActiveX Designer) 
Author Message
 SubReport Designer Component (ActiveX Designer)

Hi,

How can is set the database.Location for subreports with
a report which is used in then Designer Component (ActiveX Designer)  ?
I try this, but this will only work in the main report:

Set crDBase = Report.Database
For Each crDBTbl In crDBase.Tables
      If crDBTbl.Location <> strDB_AUFTRAG Then _
         crDBTbl.Location = strDB_AUFTRAG
Next

Set crSections = Report.Sections
For Each crSection In crSections
     Set crReportObjs = crSection.ReportObjects
         For nCounter = 1 To crReportObjs.Count
             If crReportObjs.Item(nCounter).Kind = crSubreportObject Then
                 Set crSubRepObj = crReportObjs.Item(nCounter)
                 Set crSubReport
=crSubRepObj.OpenSubreport(crSubRepObj.Name)
                 Set crDBase = crSubReport.Database
                 For Each crDBTbl In crDBase.Tables
                      If crDBTbl.Location <> strDB_AUFTRAG Then _
                        crDBTbl.Location = strDB_AUFTRAG
                  Next
              End If
         Next
Next

PLEASE HELP!!!
Thanks in advance!
Peter



Mon, 09 Jul 2001 03:00:00 GMT  
 SubReport Designer Component (ActiveX Designer)
You can use the following method:

Report.Database.Tables(0).SetDataSource rs1
Report.Database.Tables(1).SetDataSource rs2
Report.Database.Tables(2).SetDataSource rs3
....
....

where rs1, rs2, rs3... are the neccesary recordsets.

HTH

 +++++++++++++++++++++++++
|  Robert Rybaric
|  PRO-INFO system, s.r.o.
|  Nitra, Slovakia

|  PRO-FIT for Windows
|  http://www.pro-fit.sk
+++++++++++++++++++++++++

Peter Siebler p?e ve zprv

Quote:
>Hi,

>How can is set the database.Location for subreports with
>a report which is used in then Designer Component (ActiveX Designer)  ?
>I try this, but this will only work in the main report:

>Set crDBase = Report.Database
>For Each crDBTbl In crDBase.Tables
>      If crDBTbl.Location <> strDB_AUFTRAG Then _
>         crDBTbl.Location = strDB_AUFTRAG
>Next

>Set crSections = Report.Sections
>For Each crSection In crSections
>     Set crReportObjs = crSection.ReportObjects
>         For nCounter = 1 To crReportObjs.Count
>             If crReportObjs.Item(nCounter).Kind = crSubreportObject Then
>                 Set crSubRepObj = crReportObjs.Item(nCounter)
>                 Set crSubReport
>=crSubRepObj.OpenSubreport(crSubRepObj.Name)
>                 Set crDBase = crSubReport.Database
>                 For Each crDBTbl In crDBase.Tables
>                      If crDBTbl.Location <> strDB_AUFTRAG Then _
>                        crDBTbl.Location = strDB_AUFTRAG
>                  Next
>              End If
>         Next
>Next

>PLEASE HELP!!!
>Thanks in advance!
>Peter



Tue, 10 Jul 2001 03:00:00 GMT  
 SubReport Designer Component (ActiveX Designer)
Hi Robert

Quote:
>You can use the following method:
>Report.Database.Tables(0).SetDataSource rs1
>Report.Database.Tables(1).SetDataSource rs2
>Report.Database.Tables(2).SetDataSource rs3

Yes i see, but this will only set the DataSource in the
main section and not in the subReports.

Searching.......
Peter



Tue, 10 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Main report value<-pass/return->subReport values (ActiveX Designer Component 6.0)

2. Accessing textobject in subreport in crystal reports 6.0 ActiveX designer

3. Accessing a textobject in a subreport using crytal report 6.0 activeX designer

4. HELP: looking 4 report designer user interface, other than Crystal Designer

5. Data Designer and a Report Designer.

6. Missing Database Designer and Query Designer in VB 6.0 Enterprise edition

7. Where are Database Designer and Query Designer, REPOSTED

8. Where are Database Designer and Query Designer

9. Where are Database Designer and Query Designer, REPOSTED

10. Where are Database Designer and Query Designer?

11. How many items in Component Designer

12. Designer Binding to Dataset Contained in Component

 

 
Powered by phpBB® Forum Software