I am trying to display .jpg files in the details
section of a sub-report.
The parent report is named Quinqenall.rpt, the subreports are sub5YearTempo and Quinqenall_images.rpt. It's this last which should display the images.
I've done a test run, using the techniques in "Load a picture in a section event", pp 19 ff. in "Migrating from the OCX to the Report Designer Component(RDC)" (PDF file). In the small test program & report, I was able to use Section 3 as described therein.
Now I want to display the photos in the second subreport of a main report. The tricky part is the code which executes in the, what do I call it, the Section Event?
I have two questions:
1. How do I determine which section I should refer to:
a. I'm pretty certain it's not section 3
b. If I open the Section Expert, and count down the sections, from the Report Header of the main report to the section containing Quinqenall_Images.rpt, it is at the 7 th level.
Here is what is displayed in Report Explorer, for the main report:
PlanQuinquenall.rpt
Report Header
Page Header
Group Header#1:Sites.ProfacNumber-A
Details
Group Footer #1
Group Footer #1a: Sites.ProfacNumber-A
Subreport1:sub5YearTempo
Group Footer #1b: Sites.ProfacNumber-A
Subreport3:Quinqenall_Images.rpt
Report footer
Report Footer
c. There are a further two sections in the sub-report.
Report explorer for Quinqenall_Images.rpt shows this:
Quinqenall_Images.rpt
Report Header
Report Header a
Report Header b
Details
Report Footer
d. So do I refer to and write code for:
Section 2 -- of the sub report
Section 7 -- counting down through the main report
Section 9 -- the sum of these two
or
Something else altogether?
2. Where do I locate the "Dim WithEvents Section<#> As CRAXDRT.Section"
and the associated "Set Section<#> = crxReport.Sections(<#>)? The <#> represents the to-be-determined section number.
Does it go in the form which calls the report, or in the form containing the CR9 viewer?
section of a sub-report.
The parent report is named Quinqenall.rpt, the subreports are sub5YearTempo and Quinqenall_images.rpt. It's this last which should display the images.
I've done a test run, using the techniques in "Load a picture in a section event", pp 19 ff. in "Migrating from the OCX to the Report Designer Component(RDC)" (PDF file). In the small test program & report, I was able to use Section 3 as described therein.
Now I want to display the photos in the second subreport of a main report. The tricky part is the code which executes in the, what do I call it, the Section Event?
I have two questions:
1. How do I determine which section I should refer to:
a. I'm pretty certain it's not section 3
b. If I open the Section Expert, and count down the sections, from the Report Header of the main report to the section containing Quinqenall_Images.rpt, it is at the 7 th level.
Here is what is displayed in Report Explorer, for the main report:
PlanQuinquenall.rpt
Report Header
Page Header
Group Header#1:Sites.ProfacNumber-A
Details
Group Footer #1
Group Footer #1a: Sites.ProfacNumber-A
Subreport1:sub5YearTempo
Group Footer #1b: Sites.ProfacNumber-A
Subreport3:Quinqenall_Images.rpt
Report footer
Report Footer
c. There are a further two sections in the sub-report.
Report explorer for Quinqenall_Images.rpt shows this:
Quinqenall_Images.rpt
Report Header
Report Header a
Report Header b
Details
Report Footer
d. So do I refer to and write code for:
Section 2 -- of the sub report
Section 7 -- counting down through the main report
Section 9 -- the sum of these two
or
Something else altogether?
2. Where do I locate the "Dim WithEvents Section<#> As CRAXDRT.Section"
and the associated "Set Section<#> = crxReport.Sections(<#>)? The <#> represents the to-be-determined section number.
Does it go in the form which calls the report, or in the form containing the CR9 viewer?