Renumbering Page numbers with automatic TOC (Report Book) Jasperstudio 6.0.1 - jasper-reports

Have a questions regarding page numbering in a report book. Point is: I have a client that does name-giving of page numbers like this:
Chapter 1, page 6 (4th page that chapter) = 1-4
Chapter 2, page 12 (3th page that chapter) = 2-3
etc.
Now, it's possible to make it happen with al different reports in the Content-section, but How do I display this pages/properties in the table of contents?
The report book supports some method that gives that bookmark-names back, but uses the $V{MASTER_CURRENT_PAGE} to print the page number. How could I show the page-numbers that are actually beneath the pages of the bookmark?
Please let me know, struggle with this one.
Regards, Gert

Related

How to rearrange report section at print time in ActiveReports?

I need to print the report footer before the group header/footer in ActiveReports 6. My code in report footer requires calculation from the group header/footer, so instead of moving all the controls to report header and do massive changes to code, I wonder if there's a quick way to just rearrange the page at print time.
I currently have:
rhMain (reportheader) for report cover page
gfVehicle (groupfooter) for detail on each vehicle, summary data is also calculated and stored here for each vehicle to be used in report summary
rfMain (reportfooter) for report summary
What I need to be arranged:
rhMain cover page
rfMain summary page
gfVehicle detail on each vehicle
What I have tried is move all the summary stuff to rhMain and during rfMain_format, I change the value of the controls in rhMain. This failed probably because rhMain is already rendered at this point.
Any other ideas?
There is no way to rearrange the sections during printing. The sections are designed to be rendered in a specific order and it cannot be changed. If you can provide some detailed information about your use case we may try suggesting some workaround. You can post your questions to ActiveReports support forums.
Can you please explain your scenario so we can try to help based on it. In general a report footer is nothing but a "group-footer" for the whole report (that is not bound, so would it help to replace the report-header/footer with an outside group header/footer.
Please include an image of what you're trying to do so we help further.
Issam Elbaytam
Grapecity.

Adding 2 additional pages to the end of a crystal Report

I have a report for orders and i would like to add 2 pages at the end of the order. My order is most of the time 1 page, sometimes it will be 2 pages. So I want to add my terms & conditions to the end of it. This terms&conditions is always 2 pages.
I tried to add a text object in the report footer. Than in Section Expert, I select Report footer --> and Check the New Page Before ( I also tried it with the New Page After)
I also suppress the sections that I don't want to appear on the 2 last pages by using : PageNumber > TotalPageCount - 2
As far as this all works, but if I open my report. On the second page of the report you see the beginning of the terms&conditions. On the third page of the report you will see also de terms&conditions. But the second portion of the first page, of the terms&conditions, is also on the second page of the terms&conditions. therefore, there is always a part of the text that is duplicated
For example: my example of terms&conditions exist of 14 points. On the first page of the terms you will see point 1 to point 8. on the second page you will see point 6 to point 10. and on the third page you will see point 9 to point 14
--> Thats very annoying!!
I also tried it to check 'Suppress if duplicated' --> but nothing is changing??
Can someone help me with my problem please??
Place the terms and conditions in sub report and place that sub report in report footer

Two different pages with distinct headers and footers in crystal reports

Right so I'm fairly new to this crystal reports thing and i've been stuck with this for days and can't get my head around it!
i have to produce a report which contains two pages - 1. purchase order and 2. receiving note
report 1. has its own
header
detail
footer
report 2 has distincts header, detail and footer.
the only way i managed to make this happen was to use subreports but they only work in 1 level deep so having the addresses in subreports themselves i can't use this!
Now ive tried creating new groups and all of that but i cant get it to show in different pages
right now i have
header1
header2
details1
details2
footer1
footer2
any ideas of what could i do please?
If you know that page 1 and 2 are always page 1 and 2 (and a page 1 doesn't spill over into the 2nd page pushing the original 2nd page out to the 3rd page) then you can use a formula to change the header based on the page number. Create a new formula and then you can do something like this:
Basic Syntax
If PageNumber = 1 Then
formula = "This is the page header for page 1"
ElseIf PageNumber = 2 Then
formula = "This is the page header for page 2"
End If
That said, I probably would probably stick to using sub reports and use the report headers in those reports to display your unique headings. Using the section expert you can make sure that there is a page break between the two sub reports.

ActiveReports 7 TextBox/List Page Break

I'm new to ActiveReports 7, I have a rdlx Report using a stored procedure to populate multiple lists with TextBoxes. The data is appearing correctly, however I am unable to get the TextBoxes to break when their contained data exceeds the length of the page. Instead, the TextBox remains unbroken and starts on the next page leaving a large empty gap. I have the containing Lists' 'KeepTogether' property set to 'False' and it doesn't help. How can I make these Lists and/or TextBoxes break at the end of the page and resume on the next?
Check the type of report you have. There are the "ActiveReports 7 Page Report", aka FPL (Fixed Page Layout) report and the "CPL Report" (Continuous Page Layout).
Fixed Page Layout is for creating a new page for each record. Suitable for invoices and similar reports. You need a "CPL report" so that it only adds pageas as needed for the content.
To get a CPL Report take the following steps from inside the designer in Visual Studio:
Project > Add New Item
Choose the "ActiveReports 7 Page Report" item here.
Choose Report > Convert to CPL Report.
Those steps should effectively have the effect of changing "Page" to "Body".
Below are the steps I used to create a CPL report that has a list with a textbox containing very long text (longer than a page) and it renders across pages okay:
Add a list
Add a textbox to the list. The default properties should work fine, but the relevant properties on my textbox are:
TextBox.CanGrow=True
TextBox.WrapMode=WordWrap
List.KeepTogether=False: Although technically this should be fine either way if the textbox/list are larger than a page. KeepTogether=False will just prevent it from moving to a new page if it is starting half way down the page.
Let me know if you still don't crack it and I'll upload my test report here somewhere for you.

Alter the page numbers on a pdf created with PdfSharp/Itextsharp

I am using PdfSharp/Itextsharp to stitch together a number of documents and stamp a page number at the bottom of each page. The first document in the package is the Table of Contents and is not paginated. I start the pagination with the first page after ToC. The problem is the page number that is displayed on the document is not the same as the page number indicated by the Adobe Reader.
I checked with other documents and it looks like pdf supports the option to somehow reset the page number so page 1 can start again later in the document.
How can I do this with pdfsharp or itextsharp?
The page numbers shown in Adobe Reader are defined by "Page Labels".
For instance: you number the TOC with i, ii, iii, iv, v and so on. The real page numbers are 1, 2, 3, 4, 5, and so on.
Here's a Java example from my book that shows how to work with Page Labels: http://itextpdf.com/examples/iia.php?id=234 [archived] It should be very easy to adapt it for use in C#.
If not, look for the corresponding example on this site: http://kuujinbo.info/iTextInAction2Ed/index.aspx