Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PageSetup and Printing of JTextArea contents

843807Jun 28 2010 — edited Jul 9 2010
Dear All,

I am implementing a small text editor program, using
JTextArea
. The program has PageSetup and Print menu items.

The PageSetup menu item handler is given below and is working. Meaning if I do a PageSetup and change the page options like Landscape to portrait etc, the changes are checked to be retained when I enter PageSetup again, as pageFormat retains them.
// instance variable
PageFormat pageFormat = printerJob.defaultPage();

// handler code
void filePageSetupHandler( ActionEvent ae ) {
	pageFormat=printerJob.pageDialog(pageFormat);
}
However, how do I use the pageFormat obtained in the above handler to implement the Print handler? I have tried various things, but no suceess. Here is the partially completed Print handler code.
void filePrintHandler( ActionEvent ae ) {
	// how do I use the pageFormat information obtained earlier, in this place???
	textArea.print(null,null,true,null,null,true);
}
Any help will be greatly appreciated.

Regards,
Sudheendran T L

Comments

Sasi Nagireddy

Hi Chandu,

Below the Steps to improve the performance.


1. implement caching mechanism

2. use aggregates

3. use aggregate navigation

4. limit the number of initialisation blocks

5. turn off logging

6. carry out calculations in database

7. use materialized views if possible

8. use database hints

9. alter the NQSONFIG.ini parameters

Note:calculate all the aggregates in the Repository it self and Create a Fast Refresh for MV(Materialized views).

and you can also do one thing you can schedule an IBOT to run the report every 1 hour or some thing so that the report data will be cached and when the user runs the report the BI Server extracts the data from Cache.


http://blogs.oracle.com/pa/resource/Oracle_OBIEE_Tuning_Guide.pdf

http://www.peakindicators.com/index.php/knowledge-base/98-obiee-and-database-performance-tuning

http://obiee101.blogspot.com/search/label/CACHE

http://obiee101.blogspot.com/2010/01/obiee-performance-tuning.html

http://www.slideshare.net/themoff/performance-testing-and-obiee-4247838

http://www.peakindicators.com/index.php/knowledge-base/96-20-golden-rules-for-the-obiee-11g-rpd

Mark if helps.

Thanks,

Christian Berg-0racle

Some comments:

  • ad 1. implement caching mechanism: This should come way back at the end of this list and should NEVER be the first thing you turn to. Caching isn't something you "just turn on" since without a proper understanding and a sound caching strategy (refreshs vs stale data anyone?) caching does more harm than good.
  • ad 4. limit the number of initialisation blocks: This ahs absolutely nothing to do with the stated problem.
  • ad 5. turn off logging: The ancient myth of logging slowing down operations. This is nonsense.


With regards to the OP @

In Sql it is expected as the data is huge. But why OBIEE is taking such time."

^-- So you do expect your query to be slow in SQL. OBIEE is emitting SQL agaisnt the data base...how do you expect a speed-up to happen? If an (same) SQL statement takes 10 seconds on SQL Developer/Toad/whatever, it will not take any less when emitted by OBIEE.

In general: Most performance problems are best tackled at the source - i.e. the actual database. And the means for this are legion: from simple indexing to partitioning stategies, DB parametrization, actual aggregate modelling etc etc.

Ramshoney

Hi Chandu,

Check the Execution plan in database whether the tables are using full scan or index scan.

Check whether using cast functions in the front end of the report.

Check whether any null values are going to filter or in metric column, bec null values will take longer time in obiee.

let me know .

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 6 2010
Added on Jun 28 2010
5 comments
7,858 views