In cactus, it has problem to generate report
Error Message:
XSL-1000: (Fatal Error) Error while parsing XSL file (null).
How to solve this problem, thank you~
This error is produced in the JDeveloper. It may be the xalan.jar cause this problem. But, I don't know how to replace the library.
Similar Messages
-
Problem while generating reports in BI
Hi All ....
I have created all the info objects and info cubes.... they are showing data which i have extracted from R\3 system ...all is correct ...
But now i m facing problem when i am generating reports...then its showing fields in Excel sheet but not data... data is there in R/3 system ..but i am not getting any reason why this is not coming in reports.
Please help me out
Thanx
ShivanjaliHi,
You can check it through query designer.
Just click the button on the top of the quesry designer it will have sign sqaure with a green circle on the top of square.The description says web.....
It will take you the web adn then give your login and execute it.
If you have authorization issue then it will say No AUthorization issue or everything is filtered out.
If your cube doesn't data for the selections you are giving at the runtime of the report then it will just give a message no applicable data found.
If you are not getting these messages then you should check the rows of the report as what have you put there has value in the cube or not.
Thanks
Ajeet
Thanks -
A big problem of Generate report with PDF format....Urgent
I want to generate a report with pdf format through one java file, it have two page 1)gen_report.jsp 2) report_gen.java , the compliation was failed. However, i don't what the problem is .... i hope anyone can help me as it is very argent for me ....Thanks a lot
1)gen_report.jsp
<table id="AutoNumber1">
<tr>
<td background="images/top5movie.png">
<p align="center"> </p>
</td>
</tr>
<tr>
<td >
<div align="center">
<table id="AutoNumber2" >
<form method="GET" action="../report_gen" name="report_gen" target="_blank" onSubmit="javascript:return checkr1(this)">
<tr>
<td ><b>Report Description:</b></td>
<td >This report is to show the top five popular movies in cinemix for a period </td>
</tr>
<tr>
<td><b>Data scope:</b></td>
<td >Start from
<input type="text" name="start" value="2003-1-1" >to
<input type="text" name="end" value="2006-1-1" ></td>
</tr>
<tr>
<td><b>Data processing:</b></td>
<td >Show
<select name="order_by">
<option value="desc" selected>top</option>
<option value="asc">bottom</option>
</select>
5 films</td>
</tr>
<tr>
<td> <p align="center">
<input type="submit" value="View_Report" name="subm">
</p></td>
</tr>
<input type="hidden" name="report" value="r1">
</form>
<form method="GET" action="../report_gen" name="report_gen" target="_blank" onSubmit="javascript:return checkr2(this)">
<input type="hidden" name="report" value="r2">
</form>
</table>
</div>
</td>
</tr>
</table>Then my java code is here
report_gen.java
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
// chart and pdf out
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.xy.*;
import org.jfree.data.xy.XYBarDataset;
import org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.statistics.SimpleHistogramDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.DefaultFontMapper;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfTemplate;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.pdf.PdfPCell;
public class report_gen extends HttpServlet
private final String titles[] = {"Top Five popular movies ",
"Financial cirumstance of cinemas",
"Distribution of time segment",
"Distribution of favourite movie type"
private final String descs[] = {"This report is to show the top five popular movies in cinemix for a period ",
"This report is to show the financial circumstance of each cinema site ",
"This report is to analysis the customer when is the most visit time ",
"This report is to analysis the customer which type of movie do they watch the most"
private final String bigTitle = "Cinemix";
private final String driver = "org.gjt.mm.mysql.Driver";
private final String url= "jdbc:mysql://localhost:3306/cinemix";
private final String userID = "abc";
private final String passwd = "abc";
public void init(ServletConfig config) throws ServletException
super.init(config);
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
final int width = 550;
final int height = 200;
/ title font (centre and report title)
final Font fTitle0 = FontFactory.getFont("Helvetica", 42, Font.BOLD);
final Font fTitle1 = FontFactory.getFont("Helvetica", 30, Font.BOLD);
// centre name:
final String title0 = bigTitle;
// Default category for DefaultCategoryDataset
final String cat = "data";
Connection conn;
JFreeChart chart;
String title1 = "xyz Report";
String chartDesc = "description";
String notes[] = new String[4];
String chartTitle = "so bad this is title";
String chartXTitle = "this is x";
String chartYTitle = "this is y.";
String report = request.getParameter("report");
int max=-10000;
int min=10000;
int j=0;
// do some basic checking
if (report == null || report.equals(""))
report = "-1"; // this course unknow report error message
String start = request.getParameter("start");
String end = request.getParameter("end");
String order_by = request.getParameter("order_by"); // ToDo: check invalid string
int topN = 5;
String order = (order_by.equals("desc")) ? "Top" : "Last";
String inv[] = {"08:30", "09:30", "10:30", "11:30", "12:30", "11:30", "12:30", "13:30", "14:30", "15:30", "16:30", "17:30","18:30","19:30","20:30","21:30","22:30","23:30"};
int inv_val[] = new int[inv.length - 1];
try
Class.forName(driver).newInstance();
catch(Exception e)
printE("Cannot load mysql database driver!", response);
e.printStackTrace();
return;
try
conn = DriverManager.getConnection(url, userID, passwd);
if (report.equals("r1")) { // report 1
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
Statement stmt = conn.createStatement();
String sql = "select *,count(f.Name),f.Name from film f, filmDetail fd, ticket t where f.startDate > '" + start + "' and f.endDate < '" + end + "'and fd.filmID = f.filmID and fd.filmDetailID = t.filmDetailID group by f.name order by fd.filmDetailID asc limit '" +topN+"'";
ResultSet rs = stmt.executeQuery(sql);
while (rs.next())
if (rs.getInt("fd.filmDetailID") > max) max = rs.getInt("fd.filmDetailID");
if (rs.getInt("fd.filmDetailID") < min) min = rs.getInt("fd.filmDetailID");
j++;
ataset.setValue(rs.getInt("fd.filmDetailID"), cat,rs.getString("f.Name"));
title1 = titles[0];
chartDesc = descs[0];
chartTitle = order + " " + topN + " popular movie";
chartYTitle = "Box Office record";
chartXTitle = "Film Name";
gender = " ";
chart = ChartFactory.createBarChart(chartTitle, chartXTitle, chartYTitle, dataset,PlotOrientation.VERTICAL, false, true, false);
else
print("Error: I don't inderstand your request!", response);
return;
catch (SQLException e)
printE("Cannot open database connection? <br>", response);
// printE(e.toString);
e.printStackTrace();
return;
response.setContentType("application/pdf");
Document document = new Document(PageSize.A4, 5, 5, 5, 5);
try
PdfWriter writer;
writer = PdfWriter.getInstance(document, response.getOutputStream());
HeaderFooter footer = new HeaderFooter(new Phrase("Page: "), true);
footer.setBorder(Rectangle.NO_BORDER);
document.setFooter(footer);
footer.setAlignment(Element.ALIGN_CENTER);
// step 3
document.open();
document.add(getHeader(title0, title1, start, end, gender, order, topN, chartDesc));
document.add(printChart(chart, writer));
document.add(getFooter(notes));
catch(DocumentException de)
de.printStackTrace();
// step 5
document.close();
return;
}// end doGet()
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
// processRequest(request, response);
/** Returns a short description of the servlet.
public String getServletInfo()
return "Generate reports for " + bigTitle;
/* To print en error and exit(?) */
private void printE(Object obj, HttpServletResponse response) throws IOException
response.setContentType("text/html");
PrintWriter out;
out = response.getWriter();
out.print(obj.toString());
out.close();
// To-Do: how to force exiting?
// create data chart
private PdfPTable getHeader(String title0, String title1, String start, String end, String sex, String order, int topN, String desc)
Font fTitle0 = FontFactory.getFont("Helvetica", 42, Font.BOLD);
Font fTitle1 = FontFactory.getFont("Helvetica", 24, Font.BOLD);
Font fTitle3 = FontFactory.getFont("Helvetica", 12, Font.BOLD);
Font fValue = FontFactory.getFont("Helvetica", 12, Font.UNDERLINE);
Paragraph parStartEnd = new Paragraph();
parStartEnd.add(new Phrase("Data start from: ", fTitle3));
parStartEnd.add(new Phrase(start, fValue));
parStartEnd.add(new Phrase(" to ", fTitle3));
parStartEnd.add(new Phrase(end, fValue));
Paragraph parGenerateDate = new Paragraph();
parGenerateDate.add(new Phrase("Report generated at: ", fTitle3));
parGenerateDate.add(new Phrase(new java.util.Date().toString(), fValue));
Paragraph parGender = new Paragraph();
parGender.add(new Phrase("Current show gender: ", fTitle3));
parGender.add(new Phrase(sex, fValue));
Paragraph parTopN = new Paragraph();
parTopN.add(new Phrase("Now is showing ", fTitle3));
parTopN.add(new Phrase(order, fValue));
parTopN.add(new Phrase(" ", fValue));
parTopN.add(new Phrase(new Integer(topN).toString(), fValue));
parTopN.add(new Phrase(" record(s)", fTitle3));
// Start main table
PdfPTable tblMain = new PdfPTable(1);
tblMain.getDefaultCell().setBorder(0);
// Print title
tblMain.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
tblMain.addCell(new Paragraph(title0, fTitle0));
tblMain.addCell(new Paragraph(title1, fTitle1));
tblMain.addCell("");
tblMain.addCell("");
tblMain.addCell("");
// Print headers data
//tblMain.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
//tblMain.addCell(parInvoiceNum);
//tblMain.addCell("");
tblMain.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
tblMain.addCell(parStartEnd);
tblMain.addCell("");
tblMain.addCell(parGenerateDate);
tblMain.addCell("");
if (sex != " ")
tblMain.addCell(parGender);
else if(order != null && topN > 0)
tblMain.addCell(parTopN);
else
tblMain.addCell(" \n");
tblMain.addCell("");
tblMain.setWidthPercentage(96);
tblMain.addCell(new Paragraph("Description of this report:", fTitle3));
tblMain.addCell(desc);
tblMain.addCell("\n");
// Finish main table
return tblMain;
// print a chart _directly_ to pdf and return a empty Pdftable...
public PdfPTable printChart(JFreeChart chart, PdfWriter writer)
PdfContentByte cb = writer.getDirectContent();
int width = 550;
int height = 450;
PdfTemplate tp = cb.createTemplate(width, height);
Graphics2D g2d = tp.createGraphics(width, height, new DefaultFontMapper());
Rectangle2D r2d = new Rectangle2D.Double(0, 0, width, height); //->,
chart.draw(g2d, r2d);
g2d.dispose();
cb.addTemplate(tp, 20, 170);
// quick method to push down the footer text
// the only things this method return
PdfPTable tblDownDown = new PdfPTable(1);
tblDownDown.getDefaultCell().setBorder(0);
tblDownDown.addCell(" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n");
tblDownDown.addCell(" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n");
tblDownDown.addCell(" \n \n \n \n \n \n");
return tblDownDown;
public PdfPTable getFooter(String notes[])
Font fNote = FontFactory.getFont("Helvetica", 14, Font.UNDERLINE);
Font fComment = FontFactory.getFont("Helvetica", 12, Font.ITALIC);
Font fTitle1 = FontFactory.getFont("Helvetica", 30, Font.ITALIC);
// Start footer table
PdfPTable tblFooter = new PdfPTable(1);
tblFooter.getDefaultCell().setBorder(0);
if (notes != null)
tblFooter.addCell(new Paragraph("Notes:", fNote));
tblFooter.addCell("");
tblFooter.addCell("");
tblFooter.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
for (int i=0;i<notes.length;i++)
if (notes[i] != null)
tblFooter.addCell(new Paragraph("" + (i+1) + ". " + notes[i] + "", fComment));
tblFooter.addCell("");
tblFooter.addCell("");
tblFooter.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
tblFooter.addCell(new Paragraph("- End of report -", fComment));
return tblFooter;
}Go to the cache directory and see if you can open the report directly from here (not in IE).
I have seen posts on problems with Acrobat Reader Plugin for IE (I believe it was version 6 of Reader). -
i have prob to report generate(like a VB data report).Actually wht i want is to generate a report and to have a preview of the same and print also.If possible do sent me some code related to this problem or give me idea whwre i can get it.
Thanks
sandeepThis error is produced in the JDeveloper. It may be the xalan.jar cause this problem. But, I don't know how to replace the library.
-
Hi ,
I am facing 1 problem while generating Report.
I am trying to generate a report based on one Users global attribute.
I have customized the USER UI CONFIG and Uer Report task to generate a report like this.
I created a new report to generate report and in that report I have given the condition as that attribute equals to some value "true" / "False".
But there are some users who has this attribute value as true and whose accounts are not properly created in a resource LDAP So this User view is containing some error.
Hence when I try to run the newly created report as it tries to iterate on the user objects whose view is containg some errors ,the report is not properly getting generated and giving exception as error in calling the method getResourceobjects on LDAP.
What can I do now ? What is the alternative for me? I want to generate the report on that attribute only.....
It is very urgent for me and Can anyone please help me out....
it would be so great if there is any immediate reponse for this.>
... ORA-00932: inconsistent datatypes: expected DATE got NUMBER ...
>
I believe the above error message is very descriptive.
HTH
Srini -
Hi,
Problem to generat an report on an SSRS for SCCM 2012 R2 SP1. I got error has occurred during report processing.
In general it is no problem to generat SSRS reports, but an custom one i get issue with.
The Error:
An
error has occurred during report processing. (rsProcessingAborted)
Query
execution failed for dataset 'DataSet1'. (rsErrorExecutingCommand)
ExecuteReader:
CommandText property has not been initializedHi SaiTech,
According to your description, when you render report on SCCM 2012 R2, you got the error message.
According to my knowledge, the issue can be caused by following reasons:
Select permission not granted to ConfigMgr reporting account. We need to open the SQL management console and open the properties dialog box of configmgr db, grant select and execute permission to ConfigMgr reporting account.
Reporting Services Web Service URL or Report Manager is false. Make sure Web Service URL and Report Manager URL are correct. Restart SMS_Executive service and reinstall Reporting Service Point, then please render the report again.
Report timeout. Increase query and report timeout.
If the problem remain unresolved, please provide detailed information of SRSRP.log (default location: %programfiles%\Microsoft and Configuration Manager\Logs) and reporting services error log(default location: %programfiles%\Microsoft SQL Server\<SQL
Server Instance>\Reporting Services\LogFiles), it will help us move more quickly toward a solution.
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
If you have any feedback on our support, please click
here.
Wendy Fu
TechNet Community Support -
Hi all,
I have procedure for generating report as csv file.I n this procedure has several BEGIN..END pl/sql blocks and
SELECT...INTO..clauses .And i'm using UTL_FILE for generating csv report.
But problem is now this procedure is taking 12 hrs for 1 month date interval(3lacks records).I need to run this procedure every month .I need to reduce the execution time.could Some one give me a new idea for generating report.
Any new Idea?What makes you think that "FOR ... IN (SELECT .....) LOOP" isn't looping through a cursor?
for below block code is entire block
BEGIN
IF LN_COUNT > 0 THEN
LS_RESTART_POSITION :=NULL;
FOR LN_CNT IN (SELECT RESTART_POSITION FROM TEST_PROGRESS WHERE to_char(created_on,'dd/mm/yy hh24:mi:ss') >=(SELECT nvl(max(to_char(created_on,'dd/mm/yy hh24:mi:ss')),'00:00:00') FROM TEST_PROGRESS
WHERE TEST_SESSION_DETAIL_ID=TB_TYPE_DET_ID(TEST_TYP_ID_CNT).TEST_SESSION_DETAIL_ID AND
RESTART_TYPE = 1)
AND TEST_SESSION_DETAIL_ID=TB_TYPE_DET_ID(TEST_TYP_ID_CNT).TEST_SESSION_DETAIL_ID AND RESTART_TYPE<>1
ORDER BY CREATED_ON)
LOOP
LS_RESTART_POSITION := LS_RESTART_POSITION||'\'||LN_CNT.RESTART_POSITION;
END LOOP;
LS_RESTART_POSITION:= SUBSTR(LS_RESTART_POSITION,2,LENGTH(LS_RESTART_POSITION)-1);
ELSE
LS_RESTART_POSITION :=NULL;
FOR LN_CNT IN (SELECT RESTART_POSITION FROM TEST_PROGRESS WHERE TEST_SESSION_DETAIL_ID=TB_TYPE_DET_ID(TEST_TYP_ID_CNT).TEST_SESSION_DETAIL_ID ORDER BY CREATED_ON)
LOOP
LS_RESTART_POSITION := LS_RESTART_POSITION||'\'||LN_CNT.RESTART_POSITION;
END LOOP;
LS_RESTART_POSITION:=SUBSTR(LS_RESTART_POSITION,2,LENGTH(LS_RESTART_POSITION)-1);
END IF ;
EXCEPTION
WHEN OTHERS THEN
Sp_Insert_Error_Log (LS_OBJECT_NAME,SYSDATE,'RESUME_FLAG','WHEN OTHERS TRIGGERED'||'-'||SQLERRM);
END;
How are you populating your collection? Via a bulk collect?
through bulk collect
However, I would be willing to bet that this loop is inside another loop, right?
Yes your are correct it is inside of the loop.
I procedure is too big(800lines) hence i can't post entire procedure.If any possible plz let me know.
Yes -
Problem in generating oracle 10g reports to rtf Template? (Emergency)
Hi Team,
I had a problem in generating rdf to rtf template.. I had an rdf template with place holders like this
Hi i "Employee" <Empno> and my salary is <Empsal>
but after the generation by using BIBatchConversion , i am getting partial rtf file like this
Hi i "Employee"
i am not getting the rest of the design... do i need to overwrite the rtf manually or do we have any other conversion process when we are using placeholders in rdf reports...
Regards
Bhu1hi...i already done what u had suggested but the error still come up.
DECLARE
RO_Report_ID REPORT_OBJECT;
Str_Report_Server_Job VARCHAR2(100);
Str_Job_ID VARCHAR2(100);
Str_URL VARCHAR2(100);
PL_ID PARAMLIST ;
BEGIN
PL_ID := GET_PARAMETER_LIST('TEMPDATA');
IF NOT ID_NULL(PL_ID) THEN
PAUSE;
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
RO_Report_ID := FIND_REPORT_OBJECT('REPORT_OBJ');
ADD_PARAMETER(PL_ID, 's_sin_no', TEXT_PARAMETER,:scrap_delivery_request.sin_no);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'C:\New Forms\REF_SF_510.rdf');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'rep_edmund.main');
Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH('rep_edmund.main') + 2, LENGTH(Str_Report_Server_Job));
Str_URL := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=' || 'rep_edmund.main';
WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
DESTROY_PARAMETER_LIST(PL_ID);
END;
Edited by: baguhan on Jul 4, 2009 12:59 AM -
Problems while generating the report........
Hi Experts,
I have genereated a new report on purchasing data, I am facing bellow problems while generating the report,
1) In rows one Invoice doc num is there, I am not getting result row for this object, I have given NEVER in supress result rows in properties of that object, but it's not showing.....how can i get result row for this object?
2) I am getting '#' for the blank values, How to remove these '#"s
Please help to solve my above problems,
Helpful answer will be awarded with points,
Thanks in advance,
Venkat.Hi,
1) If you have only Invoice Num it does not shows the result Row .
2)If you display the characteristics as Key u will get as '#'. You can select as Text,then it will show 'Not Assigned'. (Hope you know that when the Values not updated from Infoprovider then # appears at output )
Hope it helps -
Problems with a report generated as PDF
I am having a problem with my report when it is generated as a PDF file from the reports server. A space is added soon after the letter w in all the words where there is letter w; for example, the word awake appears as aw ke, will appears as w ill, etc. Does anyone know how to fix this problem? I am using Reports 11g. Thanks.
Hi
In layout change the font (Redo font) thru menu option (Not Font) Format -> Font >Western.
This may solve your problem...
user8655468 wrote:
I am having a problem with my report when it is generated as a PDF file from the reports server. A space is added soon after the letter w in all the words where there is letter w; for example, the word awake appears as aw ke, will appears as w ill, etc. Does anyone know how to fix this problem? I am using Reports 11g. Thanks. -
Rwrun60.exe problem when generating matrix delimited reports
when i am generating reports in delimited format with matrix stayle i am getting following error:
ProgramError:
RWRUN60.exe has generated errors and will be closed by windows.you will need to restart the program.
please advice me urgently .Hi
From Reports 6i -patch-11 onwards, a new desformat called delimiteddata has been added. Tyr using delimteddata desformat instead of delimited format. Please refer to patch-11 release notes to know more about it.
Thanks
The Oracle Reports Team -
Problem while rendering report generated with iText API
Hi!
I am stuck with problem of rendering report generated through iText API.
What exactly happens is, I have to put an image (.jpg) on my report, when I am generating HTML file using iText API, the image size is normal i.e., as it is taken.
But when I render it to take print through printer, the size of image is getting short i.e., it prints like an Icon on Paper. What can I do to get the proper image size on paper also?
The code is as follows, which I have used to render
public class HTMLPrintRenderer implements Printable {
ReportAbs objReport;
JEditorPane editorPane;
String fileName;
final int STARTING_PAGESET_NUMBER=0;
int currentPageSetNumber=STARTING_PAGESET_NUMBER;
/** Creates a new instance of HTMLPrintRenderer */
public HTMLPrintRenderer(ReportAbs objReport) throws Exception{
this.objReport=objReport;
this.fileName=ReportsUtility.getReportLocation()+ objReport.getReportFileName();
if(objReport.isLayoutLandscape()){
SCALE =600.0/1000;//600.0/850;
else{
SCALE =600.0/850;
init();
private void init()throws Exception{
setDocument(STARTING_PAGESET_NUMBER);
public void setDocument(int pageSetNumber) throws Exception{
editorPane=new JEditorPane();
((AbstractDocument)editorPane.getDocument()).setAsynchronousLoadPriority(-1);
editorPane.setText("text/html");
editorPane.setPage("file:"+fileName+"."+pageSetNumber);
currentPageSetNumber=pageSetNumber;
int pageCountInPageSet=0;// counter to track number of pages in each pageSet
int currentPage=-1;
double pageStartY=0,pageEndY=0;
final double SCALE;// =600.0/1000;//600.0/850;
final int HEADER_HEIGHT=30;//50;
final int FOOTER_HEIGHT=70;
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
Graphics2D graphics2D;
graphics2D = (Graphics2D) graphics;
initEditorPane(editorPane,pageFormat);
ReportPrinterUtility.printPageAttributes(pageFormat);
/// print custom here... page numbers and page headers may be printed here
/// meant only for HEADRS and FOOTERS
/// caution... DO NOT ALTER GRAPHICS OBJECT ATTRIBUTES
/// @author Manoj
//TRANSLATE..............must also be reverse translated
double x=pageFormat.getImageableX();
double y=pageFormat.getImageableY();
graphics2D.translate(x,y);
paintCustomPage(graphics2D,pageFormat);
//REVERSETRANSLATE
graphics2D.translate(-x,-y);
graphics2D.scale(SCALE,SCALE);
// V set clipping area
int headerHeight=HEADER_HEIGHT;
graphics2D.setClip((int)(pageFormat.getImageableX()/SCALE),
(int) ((pageFormat.getImageableY()+headerHeight)/SCALE),
(int) (pageFormat.getImageableWidth()/SCALE),
(int) ((pageFormat.getImageableHeight()-FOOTER_HEIGHT)/SCALE));
// VI set pageStart on editorPane
if (pageIndex > currentPage) {
currentPage = pageIndex;
pageStartY += pageEndY;
pageEndY = graphics2D.getClipBounds().getHeight();
pageCountInPageSet++;
// VII
graphics2D.translate(graphics2D.getClipBounds().getX(),
graphics2D.getClipBounds().getY());
// VIII prepare clipping area
Rectangle allocation = new Rectangle(0,
(int) -pageStartY,
(int) (editorPane.getMinimumSize().getWidth()),
(int) (editorPane.getPreferredSize().getHeight()));
View rootView=editorPane.getUI().getRootView(editorPane);
if (printView(graphics2D,allocation,rootView)) {//page exists
System.out.println("page exists"+pageCountInPageSet);
return Printable.PAGE_EXISTS;
else {// page does not exist
System.out.println("resetting page parameters");
pageStartY = 0;
pageEndY = 0;
currentPage = -1;
if(!setupNextPage()){///more pages exist TODO:
return Printable.NO_SUCH_PAGE;
else{//no more pages exist
// call next page
pageCountInPageSet=0;//reset to first page in pageSet
resetGraphics(graphics2D,pageFormat);
return print(graphics2D,pageFormat,pageIndex);
private void resetGraphics(Graphics2D graphics2D,PageFormat pFormat){
graphics2D.clearRect(0,0,
(int)(pFormat.getImageableWidth()/SCALE),
(int)(pFormat.getImageableHeight()/SCALE));
graphics2D.translate(-graphics2D.getClipBounds().getX(),
-graphics2D.getClipBounds().getY());
graphics2D.scale(1/SCALE, 1/SCALE);
}Hi!
I am stuck with problem of rendering report generated through iText API.
What exactly happens is, I have to put an image (.jpg) on my report, when I am generating HTML file using iText API, the image size is normal i.e., as it is taken.
But when I render it to take print through printer, the size of image is getting short i.e., it prints like an Icon on Paper. What can I do to get the proper image size on paper also?
The code is as follows, which I have used to render
public class HTMLPrintRenderer implements Printable {
ReportAbs objReport;
JEditorPane editorPane;
String fileName;
final int STARTING_PAGESET_NUMBER=0;
int currentPageSetNumber=STARTING_PAGESET_NUMBER;
/** Creates a new instance of HTMLPrintRenderer */
public HTMLPrintRenderer(ReportAbs objReport) throws Exception{
this.objReport=objReport;
this.fileName=ReportsUtility.getReportLocation()+ objReport.getReportFileName();
if(objReport.isLayoutLandscape()){
SCALE =600.0/1000;//600.0/850;
else{
SCALE =600.0/850;
init();
private void init()throws Exception{
setDocument(STARTING_PAGESET_NUMBER);
public void setDocument(int pageSetNumber) throws Exception{
editorPane=new JEditorPane();
((AbstractDocument)editorPane.getDocument()).setAsynchronousLoadPriority(-1);
editorPane.setText("text/html");
editorPane.setPage("file:"+fileName+"."+pageSetNumber);
currentPageSetNumber=pageSetNumber;
int pageCountInPageSet=0;// counter to track number of pages in each pageSet
int currentPage=-1;
double pageStartY=0,pageEndY=0;
final double SCALE;// =600.0/1000;//600.0/850;
final int HEADER_HEIGHT=30;//50;
final int FOOTER_HEIGHT=70;
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
Graphics2D graphics2D;
graphics2D = (Graphics2D) graphics;
initEditorPane(editorPane,pageFormat);
ReportPrinterUtility.printPageAttributes(pageFormat);
/// print custom here... page numbers and page headers may be printed here
/// meant only for HEADRS and FOOTERS
/// caution... DO NOT ALTER GRAPHICS OBJECT ATTRIBUTES
/// @author Manoj
//TRANSLATE..............must also be reverse translated
double x=pageFormat.getImageableX();
double y=pageFormat.getImageableY();
graphics2D.translate(x,y);
paintCustomPage(graphics2D,pageFormat);
//REVERSETRANSLATE
graphics2D.translate(-x,-y);
graphics2D.scale(SCALE,SCALE);
// V set clipping area
int headerHeight=HEADER_HEIGHT;
graphics2D.setClip((int)(pageFormat.getImageableX()/SCALE),
(int) ((pageFormat.getImageableY()+headerHeight)/SCALE),
(int) (pageFormat.getImageableWidth()/SCALE),
(int) ((pageFormat.getImageableHeight()-FOOTER_HEIGHT)/SCALE));
// VI set pageStart on editorPane
if (pageIndex > currentPage) {
currentPage = pageIndex;
pageStartY += pageEndY;
pageEndY = graphics2D.getClipBounds().getHeight();
pageCountInPageSet++;
// VII
graphics2D.translate(graphics2D.getClipBounds().getX(),
graphics2D.getClipBounds().getY());
// VIII prepare clipping area
Rectangle allocation = new Rectangle(0,
(int) -pageStartY,
(int) (editorPane.getMinimumSize().getWidth()),
(int) (editorPane.getPreferredSize().getHeight()));
View rootView=editorPane.getUI().getRootView(editorPane);
if (printView(graphics2D,allocation,rootView)) {//page exists
System.out.println("page exists"+pageCountInPageSet);
return Printable.PAGE_EXISTS;
else {// page does not exist
System.out.println("resetting page parameters");
pageStartY = 0;
pageEndY = 0;
currentPage = -1;
if(!setupNextPage()){///more pages exist TODO:
return Printable.NO_SUCH_PAGE;
else{//no more pages exist
// call next page
pageCountInPageSet=0;//reset to first page in pageSet
resetGraphics(graphics2D,pageFormat);
return print(graphics2D,pageFormat,pageIndex);
private void resetGraphics(Graphics2D graphics2D,PageFormat pFormat){
graphics2D.clearRect(0,0,
(int)(pFormat.getImageableWidth()/SCALE),
(int)(pFormat.getImageableHeight()/SCALE));
graphics2D.translate(-graphics2D.getClipBounds().getX(),
-graphics2D.getClipBounds().getY());
graphics2D.scale(1/SCALE, 1/SCALE);
} -
Problem generating report ouput to a file -REP0069 REP57054 REP 1849
hi,
I am working with oracle reports builder (9i). i hv created some reports.While trying to get the report in a file(.txt) by using "File->generate to file" ,i am not able to generate...
i get error msgs as shown below...
rep 0069 - internal error whil generating report
REP-57054: In-proccess job terminated.
rep 1849 - Failed while printing
this poblem occurs only with the newly created reports(today n yesterday)...my old reports are running correctly....tats i am able to generate to file...Pls help me in this regard...
Thanks in advance...Thank you for the reply. I'm trying to download the patch, but I can't seem to find it. I assume this is a patch for the Reports Developer, correct? I did a search on bug 2490826 in Metalink and I haven't been able to find it. If you have the number of the patch you're referring to, please let me know.
Thank You,
Adina -
hi,
In matrix report as the Number of column field and row field are not certain how do I get to know or point to each column field value for particular row.
Other details:-
In simple matrix report with column field as 'Division No' and Row field as 'Account No' and cell field as 'Credit_Amt' and summary field(name F_sumCreditAmt) for Account wise.
'AccountNo' field repeating frame is down wards and 'division no' repeating field is accross.
If the summary for 'accountNo' is ' 0' then I am able to supress the row, but the sum can be 'zero' if the total in that row for particular row and all the columns can be (-2000) and (1000,500,500) which will amount to be zero when you add up. But my problem is how do I generate report even if the summary column value is 'zero' but it has some value in the 'Credit_Amt' Field. I need to show the row whose summary is 'zero' but it has some value in the 'Cr_Amt' field for some of the column field(ie Division_no).
Thanks
Ramif you run your query against the repository database you will get the error while the user MGMT_VIEW in the repository database doesn't have any
privileges on dba_data_files (I'm using OEM/GC 10g - at least in this version the user MGMT_VIEW is used).
If you want to run your query against a target database you have only these choice: create a public database link for that target database.
select tablespace_name as tbname, sum(bytes)/1024/1024 as size_mb from dba_data_files@target_db group by tablespace_name;
On the other hand you could use the repository of the OEM/GC to get some informations about the tablespaces of a target database.
Please check:
http://download.oracle.com/docs/cd/E11857_01/em.111/e12135/toc.htm => Part II Reference => 7 Management Repository Views
For your purpose the view MGMT$DB_DATAFILES in the SYSMAN repository might be a good choice...
HTH -
Best way to generate report on huge data table
Hi,
I am using Oracle11g.
I want to generate reports on transaction tables containing huge amount of data, on which very frequently DMLs are performing in real time.
i want to keep my report/result in RESULT_CACHE for 15 mins. active. whenever any insert/update runs on main tables the RESULT_CACHE is getting invalidated
my question is can i control/stop RESULT_CACHE relies on(table_name) invalidating, as Oracle11g invalidating RESULT_CACHE automatically.
my requirement is to not hit the main table again&again.
pls help..
Thanks in advance.
Vinod910575 wrote:
Hi,
I am using Oracle11g.
I want to generate reports on transaction tables containing huge amount of data, on which very frequently DMLs are performing in real time.
i want to keep my report/result in RESULT_CACHE for 15 mins. active. whenever any insert/update runs on main tables the RESULT_CACHE is getting invalidated
my question is can i control/stop RESULT_CACHE relies on(table_name) invalidating, as Oracle11g invalidating RESULT_CACHE automatically.
my requirement is to not hit the main table again&again.
pls help..
It sounds as if you're trying to avoid contention on a very busy large table while users are experimenting with relatively small fractions of the total data set. The type of thing you're doing is probably about the best approach - though it sounds as if you are not using global temporary tables which could save you a bit of time and contention when refreshing each private data set.
Ideally, though, you probably want a front end tool that does client-side caching - i.e. pulls the data into the front-end tool and lets the user rearrange it cosmetically there until the user explicitly requests a new trip to the database. I think Oracle Discoverer has (had) some capability in this area. What's the scale of the work the users are doing - can you give us a few scenarios about how much raw data they will extract and what they want to do with it before they refresh it ?
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Author: <b><em>Oracle Core</em></b>
P.S. Oracle does have client-side caching technology - but your ability to use it is dependent on the tools you use. You might want to go over to one of the developer or BI forums to see what they say about this problem; they may give you a different perspective on it.
Edited by: Jonathan Lewis on Jan 31, 2012 6:55 PM
Maybe you are looking for
-
Is it possible to watch music videos on a nano?
I bought a music video on itunes and when I updated my ipod the music video didn't transfer onto the ipod. Can a nano play music videos? dell Windows XP
-
API method to check unlimited strength cryptography
Hi, Is there any API available to check whether user has installed the unlimited strength cryptography files? Regards, Efby.
-
Having issue with Airport Express and Itunes - Please Help
Ok, I am having a very odd issue with my wireless music network all of a sudden, and it's driving me nuts. I have searched the forum and I don't get the sense that anyone else is having this issue. My house consists of multiple machines, but I have m
-
Bookmarks in version older than 8 - installed new hard drive - where is the bookmarks file?
installed new hard drive two months ago - just now reinstalling Firefox -- installed new version 8 -- need to know where my old bookmarks would be stored (what file and where)
-
Need help about sending back xml to MIDlet from servlet
Hi all, I need an example (or maybe some links or tutorials) about using servlet as the resource files for kXML parsing in J2ME. Can somebody help me ? Actually, I want to know how servlet generate xml and send it back to the client (MIDlet). My rece