Bug 207724 - Support for cross-reference
Summary: Support for cross-reference
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-29 02:45 EDT by Antti Karanta CLA
Modified: 2007-11-18 22:21 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Karanta CLA 2007-10-29 02:45:36 EDT
When writing large reports, it would be very useful to be able to make cross-references (as at least ms word calls them). What I mean is that I would be able to refer to some report element e.g. by id/name to have it's page number, preferably both the page it starts on and the page it ends on (the former being more important).

One would then be able to insert text like

blah blah, please see table XXX on page <value-of>crossreference('customertable')</value-of>

This does not imply that the functionality has to be available to user as a javascript function, although that would be useful.

For ms word I would imagine this to be easy to implement using word's own cross-reference functionality. For html and excel this is undefined. 

In MS Word you can insert cross references from Insert->Reference->Cross-reference.
Comment 1 Wei Yan CLA 2007-10-29 03:27:47 EDT
I think BIRT's drillthrough feature can match your request.

What you need to do is:

1. define bookmark for the target report element.
2. define the drillthrough in the jump position.


thanks.
Comment 2 Antti Karanta CLA 2007-10-29 08:16:46 EDT
(In reply to comment #1)

> I think BIRT's drillthrough feature can match your request.

Hmm, if I did not miss anything, drillthrough is about making a hyperlink between two separate reports? BTW, I could not figure out how to insert a hyperlink in the middle of a text element, only how to insert it as a data element, which is much more restricting (can't insert that in the middle of a freeform text).

I'm not talking about a hyperlink. I'm talking about being able to get the page number where the referred to report item occurs in the particular render format used. 
Or are there some javascript functions that I did not notice to ask this kind of information about a hyperlink destination?

The need for this feature comes from printed reports - hyperlinks don't work very well on paper. I am generating reports that the user will print and use (also) in paper form.
So, I'd need to be able to get the page number, which naturally depends on how pagination is done in the render format currently used, i.e. this information would need to be filled in at render time.
See how word cross-references work: they contain (optionally) the page number and also serve as hyperlinks.

In the example above, the person viewing the report might see e.g. 

"blah blah, please see table January deliveries on page 42."

Where the "42" would be inserted at render time (when rendering word doc, propably using word's cross-reference feature instead of hard-coded text). 
It would of course be good to be able to define a hyperlink in this text pointing to the table (in this case, generally any report element in the same report), but that's a separate issue.

Comment 3 Wei Yan CLA 2007-10-29 20:46:39 EDT
The drill through can also be used to link a bookmark defined in the same report.

Anyway, what you request is a new feature, we will investigate on this field to see how to implement it.

thanks.