Welcome! Log In Create A New Profile

Advanced

Report with Break

Posted by rdj 
rdj
Report with Break
December 19, 2023 06:29PM
I have a report based on a query. This Report need to print graphs in 3 Columns
These graphs are grouped in sections
After a section change the break will start on a new page
I want to show the section title (after the break) centered at the top of the page in the page header.
I have the break as not displayed because of the 3 columns in the body section
the first section is correct
then the second section gets the name of the first section
the third section gets the name of the second section
etc.
in the query the values are correct so f.e.
filename 1, section 1
filename 2, section 1
filename 3, section 1
filename 4, section 1
filename 5, section 2
filename 6, section 3
filename 7, section 3
etc.

what I try to achieve is:

page 1
Section 1

filename 1 filename 2 filename 3
filename 4

page 2
Section 2

filename 5

page 3

Section 3

filename 6 filename 7


The output I get is


page 1
Section 1

filename 1 filename 2 filename 3
filename 4

page 2
Section 1

filename 5

page 3

Section 2

filename 6 filename 7


why is it not using the new name on the break?
Where (and how) can I correct this

any ideas?

kind regards,

RdJ
Windev 2024/Webdev 2024
Re: Report with Break
December 19, 2023 07:50PM
Do you have a frontpage defined ?

Can you add a picture ?
rdj
Re: Report with Break
December 20, 2023 09:42AM
I have added the PDFs
This is now printed as single part normally this will be in a larger rtf doc the result is the same
the executed query is in the RPT File

Page 1 this Up is correct
Page 2 this Up should be C (see next page)
Page 3 this C should be Dow (see next page)
Page 4 this Dow should be Other

kind regards,

RdJ
Windev 2024/Webdev 2024
Attachments:
open | download - page1-2.pdf (134.2 KB)
open | download - page3-4.pdf (121.8 KB)
rdj
Re: Report with Break
December 20, 2023 10:31AM
I have also tried with adding a page for each break by parsing the image-links with an array
so

for each tmpSection in ARR_Section
tmp_SectionTxt=tmpSection.Description
tmp_SectionID=tmpSection.SectionID
Tmp_ARR_PrintCharts=Tmp_ARR_ExportCharts.Filter(x=> x.sectionID=Tmp_SectionID)
iSequencingAdd(RPT_V2,Tmp_ARR_PrintCharts,"Report name",Tmp_SectionTxt)

I get then the pages only with the last array passed (so 4x the same images)
the headers are correctly printed (so those vars seem not affected from this strange behavior)
that is also mentioned in the documentation
Quote
If the value of a global variable changes between the call to iSequencingAdd and iSequencingPrint, its value in the report will be the last value assigned to it.
although the parsed value is locally defined in the (global) Procedure

I use this
 iSequencingAdd 
also to add pages with non array parameters and then this always works correctly (use the same RPT File to add about 50 pages, with 10 (non array) Parameters)

the only difference is that these RPT Files are 'Static Pages' and not 'Repeating/Looping'
Before I added the 'Break' all the Charts where printed correctly

kind regards,

RdJ
Windev 2024/Webdev 2024
rdj
Re: Report with Break
December 20, 2023 11:59AM
my current solution
I created a copy of the RPT and changed the query so it selects only 1 section
I parse the parameters "section" and "Title" to the report
During initialization the query is executed

In my normal 'print routine' I have now
for each tmpSection in ARR_Section
tmp_SectionTxt=tmpSection.Description
tmp_SectionID=tmpSection.SectionID
iSequencingAdd(RPT_V3,tmp_SectionID,"Report name",Tmp_SectionTxt)
end

When I print it now I get the separate pages with the right Section Title and the correct number of charts
So parsing with an array is not working if the same RPT is added multiple times

kind regards,

RdJ
Windev 2024/Webdev 2024
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: