Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8851

Re: Subreport problem at runtime

$
0
0

Hello Anne-Marie

 

 

Yuo will have to set the dasource for both the main report and the subreport. For the subreport you could obtain a SubreportObject through the ReportObjects collection. The following example shows you how to iterate through the sections of a report and change the background color of each subreport to magenta.

 

Dim Report As New CrystalReport1
Dim subReport As SubreportObject
Dim sect As Section
Dim rptObject As Object
For Each sect In Report.Sections
    For Each rptObject In sect.ReportObjects
        If rptObject.Kind = crSubreportObject Then
            Set subReport = rptObject
            subReport.BackColor = RGB(255, 0, 255) '''****replace with your pointer to the DS
            Set subReport = Nothing
        End If
    Next
Next

 

 

 

 

- Ludek


Viewing all articles
Browse latest Browse all 8851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>