Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Detecting Report Design Perspective and Web Client in BIRT

Is it possible in a BIRT report to distinguish between running in the Design Perspective and the RTC Eclipse Client?

0 votes



4 answers

Permanent link
On 1/27/2010 7:08 AM, bill.taylor wrote:
Is it possible in a BIRT report to distinguish between running in the
Design Perspective and the RTC Eclipse Client?


When we run in the RTC Eclipse Client (or in the RTC Web UI) we pass a
context map to the BIRT report engine, with some known values in it. You
could test for the existence of one of these values in the map.

For example,

var projectArea = reportContext.getAppContext().get("PROJECT_AREA");

If it was in the map, you're running in RTC. If not, you're in some
other viewer (probably the BIRT viewer).

Hope this helps.

james
RTC Reports Team Lead

0 votes


Permanent link
That works perfectly, thank you

0 votes


Permanent link
I know you can hide elements selectively according to document type, but can you determine the document type programmatically?

Many thanks

0 votes


Permanent link
On 2/3/2010 3:53 AM, bill.taylor wrote:
I know you can hide elements selectively according to document type,
but can you determine the document type programmatically?

Many thanks


The IReportContetx should be able to answer this question. For example,
in the context of a chart:

if (icsc.getExternalContext().getScriptable().getOutputFormat() == "pdf") {
...
}

In a (non-chart) report item you can just ask the context:

reportContext.getOutputFormat()

james
RTC Reports Team Lead

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jan 27 '10, 6:59 a.m.

Question was seen: 5,204 times

Last updated: Jan 27 '10, 6:59 a.m.

Confirmation Cancel Confirm