Different title on the first page of the Birt report

So, there is this thread here , in which there is an example that creates a different title for the first page than the rest of the pages. I can download this example and run it in order.

When I tried to imitate this example, I could not do it (Clarification: after changing the source to the database of my source, the header would not change correctly). In the end, I started copying parts of my report to a sample to see what caused the problem (Clarification: I removed the differences between my report and the example one by one to determine the exact difference that caused the problem). It turned out to be my desk.

For some reason, I can’t explain if I am adding a new dataset myself, deleting a table using an example database and adding a table using my dataset, this will not work. When I say that this will not work, I mean that each heading is the same on every page and will not change for subsequent pages as expected.

If I run the debugger and set a breakpoint on a script that forces a different first and different page content (shown below) than what seems to be happening is that the onRender event is fired on each page in the database example table. .. but with my table it only gets called once. This leads to the fact that the main page only checks the onRender script once at the beginning, when the variable pageNumber = 1. I do this for hours and hours and I really like someone who can know why this is to help me, please.

Here is the code:

if( pageNumber > 1 ){ this.getStyle().display = "none"; } 

Your help and knowledge is greatly appreciated,

-Asaf

+6
source share
1 answer

You indicate

I tried to imitate this example, I could not do it

so maybe you missed some step. There is DevShare BIRT: Several main pages and blog post support. BIRT: Several main pages without scripts that should guide you through this process.

EDIT Based on clarification.

Modifying an existing report in BIRT (especially the free version) using the Layout editor may not always be correctly updated in XML. XML is the actual basis for the report. Re-creating the report from scratch and only using the example as a guide should solve this problem.

When you (or your client) are not completely sure what will be at the end of the report, the version provides a safe "un-doing" method, because this version has never been done. I always save the version (and the document in the report description) before trying something new.

Version

+3
source

Source: https://habr.com/ru/post/920360/


All Articles