Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 4 Jahren, 1 Monat
Letzter Beitrag:
vor 4 Jahren, 1 Monat
Beteiligte Autoren:
DW, Stefan Bentvelsen, DerekT, Paul Turner

Composite Report

Startbeitrag von DW am 07.05.2014 16:54

Hello All,

I trying out the composite report for the first time. I have 3 reports that where already created and are using them as sub-reports.

My questions is where do put the code "iInitSubReport"

If I put it in the Opening of the Composite report I get an error:

This function can only be called in the printout of a composite report.

????

DW

Antworten:

Dennis

Cannot help you with the composite reports - I did look at this some time back but as each of the sub reports starts a new page I decided to continue using the 'iSequencingAdd()' and 'iSequencingRun()'

Also I was not sure if composite supported different orientations which 'iSequencingxxx' does.

Possibly of no help whatsoever - just my two penneth.

von DerekT - am 07.05.2014 17:22
Hi
I use sub-reports all the time, however I use iinitreportquery to pass the required query parameters. Regardless the init calls work for me in the 'Before printing....' code for the subreport control within the composite report.

HTH
Paul

von Paul Turner - am 07.05.2014 23:03
Hi DW,

I use some composite reports (in WD17).
I have the iInitSubReport() statements in the Opening-of-MyCompositeReport and it works fine for me.

von Stefan Bentvelsen - am 08.05.2014 08:24
Thanks You,

I figured out what I was doing wrong. I had the iInitReportQuery() called in front of the iInitSubReport() which caused the error.

Example:
//3 sub reports linked (Old reports with different parameters)
iInitSubReport(SRP_ContractMain,P1,P2,P3,P4)
iInitReportQuery(QRY_Main,P1)

iInitSubReport(SRP_ContractTerms,P1)
iInitReportQuery(QRY_Terms,P1,P2)

iInitSubReport(SRP_ContractPricing,P1,P2)
iInitReportQuery(QRY_Price,P1)

After changing it to: It worked kind of.
iInitSubReport(SRP_ContractMain,P1,P2,P3,P4)
iInitSubReport(SRP_ContractTerms,P1,P2)
iInitSubReport(SRP_ContractPricing,P1)

iInitReportQuery(QRY_Main,P1)
iInitReportQuery(QRY_Terms,P1,P2)
iInitReportQuery(QRY_Price,P1)

A new issued arouse the third report had an error that I was trying to pass 4 parameters when it only needed 1.

I started from scratch and remade the reports (New not linked) in the composite report 1 by 1. They share the same parameters and it works well just took all day :(

I also noticed that data binding does not work in the composite report. I have a header on all 3 reports that are the same I created a class to use the data binding and it will not work I have to load every control manually from the class. Strange enough when I had the linked reports the data binding did work.

Thanks for the help

DW

von DW - am 08.05.2014 13:23
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.