Generate reports in PDF or EXCEL from Web App...
Hello, I have to generate some reports from data base using web APP on Java, these reports with few generation criteria must be in PDF format and EXCEL format (both), someone knows a tool with which I can generate them?
Best regards.
PDF: iText
Excel: Apache POI
Similar Messages
-
Report Viewer error on export PDF or Excel from Azure Web Sites
Hi,
When I try to export any RDLC report on PDF or Excel I obtain the error:
[ArgumentException: Parameter is not valid.]
System.Drawing.Graphics.GetHdc() +1153145
Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +75
I Try with Microsoft.ReportViewer.WebForms.dll version 10.0.40219.329 (Report Viewer 2010) and with version 11.0.40219.329. (Report Viewer 2012).
The same code works on premises server or on "Azure Cloud Service" Web Instance.
Any help would be highly appreciated.
Thanks.
LQHello
I am also getting this error when trying to render a PDF report.
Call stack pasted below.
Thanks
David
Parameter is not valid.
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details:
System.ArgumentException: Parameter is not valid.
Source
Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Parameter is not valid.]
System.Drawing.Graphics.GetHdc() +1153145
Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +63
Microsoft.ReportingServices.Rendering.RichText.TextBox.MeasureFullHeight(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Single& contentHeight) +489
Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +386
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +704
Microsoft.ReportingServices.Rendering.HPBProcessing.RowInfo.CalculateVerticalLastDetailCell(PageContext context, Boolean firstTouch, Boolean delayCalc) +419
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailCell(Tablix tablix, TablixMember colMemberParent, Int32 colGridIndex, RowInfo rowInfo, PageContext pageContext) +826
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List`1 detailCellsState, PageContext pageContext) +108
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List`1 detailCellsState, PageContext pageContext) +862
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailRow(Tablix tablix, TablixMember rowMemberParent, Int32 parentRowIndex, Int32 parentColIndex, PageContext pageContext) +292
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +139
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +3529
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixRows(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, List`1& pageStructMemberCell, Boolean ignoreTotals, Boolean& finishLevel, Boolean parentHasFooters, CreateItemsContext createItems, Double startInTablix, Double endInTablix, PageContext pageContext) +3034
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixItems(Tablix tablix, PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix) +113
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateVertically(PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix, Double topInParentSystem) +290
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +636
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +704
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineContentVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Boolean resolveState, Boolean resolveItem) +281
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +145
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +704
Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 page, Int32 totalPages) +833
Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.NextPage() +54
Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.Init(Report report, PaginationSettings pagination, CreateAndRegisterStream createAndRegisterStream, Hashtable& renderProperties) +356
Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing..ctor(Report report, PaginationSettings pagination, CreateAndRegisterStream createAndRegisterStream, Hashtable& renderProperties) +35
Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) +110
Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) +67
[LocalProcessingException: An error occurred during local report processing.]
Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +346
Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +147
Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +31 -
Report Generate to File PDF, HTML,Excel and Others Format
Dear Experts,
I am using Oracle 9i and Developer 6i. How I convert report in PDF, HTML, Excel and others format after generating the report. When i try to generate, then giving the following error message:
REP-0999: Unimplemented Error.
How can I solve it, Please help me.Do the column headings display ok but the data does not?
If so it may be related to the font size. i.e. the whole report may not fit on the page when scaled for pdf output. -
How to download data in excel from web report in sap ?
how to download data in excel from web report made in sap abap?
through tcode smw0.for exemple using
MS_EXCEL_OLE_STANDARD_DAT -
Generating reports in RTF and Excel on Sun Solaris
hi,
Could any one of u out there kindly tell me if it is possible to generate reports in RTF and Excel formats on a Report Server running in Sun Solaris machine. We use Reports 6i.
Because I am able to generate a report in RTF format on report running in Windows NT machine, but on Solaris i get a message that the Reports Server terminated abnormally!.
Thanks,
Prabhu SCould you please tell us whether you fllowed any special procedures
or made some specific settings to launch RTF reports ?Can't help much, I'm afraid. The report and web server settings were
all made before I got here, and are not visible to me.
We can get RTF from report builder/generate-to-file and when running
reports on the web. Our servers are all Sun/Solaris boxes, although
we display on DOS boxes. Excel we get from a program, not from the
report server.
Report builder 6.0.8.10.1, database claims to be 8.1.7.0.0.
Sorry I can't help much more than saying "yes, it can be done".
Allan Plumb -
Hello,
My application generates report in different formats, such as: Adobe, Excel, XML, CSV and HTML
I have a webtest that makes all preparations, then generates a report.
In my application I have an option either to save the new generated report or open it.
When I try to open the new report, the web test doesn't see it and therefore not allows me to test it.
Please refer me to knowledge base or let me know how to resolve this type of issues.
Thanks.
qatmHi qatm,
Thank you for posting in MSDN forum.
Since this web performance test is used to verify the Http request/respond work correctly in VS, and the browser session is then displayed as a list of URLs in the Web Performance Test Editor.
However, as you said that you want to test a generated report in my application by using web performance test in VS2012 Ultimate. If the report is not as the Http format, so I think that it is not possible to test a generated report by using web performance
test.
Thanks for your understanding.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Generate report in pdf in rute specifics??
Hi, I have a form whit a button to generate report in pdf, works fine, but i want that when the user press the button, a window opened and the user choose where want to save the pdf...
I think that i need some libs but i dont know, and i dont know the code to insert in button to open this window.
Please HelpHi there
Firstly what version are you running of Forms/Reports?
Secondly, if you are running 9i/10g, when the PDF document is presented, the user will be able to save it in a location of their choice. When you call the report you can tell the app server where to save a copy of the file, but you will have to keep in mind that the location will be relative to the app server and not the client machine. Besides the results are normally cached on the app server, so all you will have to do is remember the job id and request the results again via a http call.
Cheers
Q -
Download to excel from web report generated through ITS
We were on SAP 4.6B. We have several abap reports for which we have a web interface using ITS. On the broweser output we have provided a URL which reads 'Download to CSV file' . This has been achieved by modifying the function www_get_report. The mod first generates a unique filename and exports the name to the memory and generates the hyperlink. The abap report program ftp'ies a the csv file to the ITS server path as in the URL.
Now we have upgraded to ECC 5.0 and we want to achieve the download to CSV option without the modification. What would be the best way to achieve this in the netweaver platform.Sofia,
The same report query runs for downloading the data into excel, I don't think you can limit the number of records in download.
You can achieve it using custom code, like on click of download excel redirect to another page and then restrict the data as per your need, or you can use the custom procedure to download the limited data.
Denes' utility to download into excel.
http://htmldb.oracle.com/pls/otn/f?p=31517:108:1476564836494581:::RP,::
Regards,
Manish -
SOAP Messaging Using Crystal Reports Web Services To Return Report in PDF or Excel Format
All,
I am trying to use SOAP messaging to fetch a Crystal Report through a Managed repository and getting back either a PDF or Excel file. For some reason, any reference to web services on this site I cannot access. Like thread, "Using Web Services on the Crystal Report Server XI to return reports". Can anyone point in a direction to Web Service Calls API documentation or does this not exist ?????? I would hope this product has this capability.
Thanks In Advance,
TomXI Release 2 Service Pack 2 introduced the Business Process BI Web Services, that allow you to retrieve reports using SOAP messaging.
It's documented here:
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/WS_SDK/wssdk_portal/doc/wssdk_bpbi_doc.pdf
Sincerely,
Ted Ueda -
Generating Report in PDF Format.
Hi All,
How can I configure Report Server to generate all my Reports in PDF Destination Format? I am using Oracle 10g.
In 6i, it used to be FORMS60_REPFORMAT parameter. Is there any equivalant in 10g? Where can I set it? or Is there any other way to configure Report Server?
I may set desformat in rp2rro.pll but I would like to have it at Report Server level.
Thanks for your help in advance.If you want to run all your reports using a generic file, then use web.show_document within Forms and set your desformat for each report in the cgicmd.dat file (in Oracle_home/reports/conf directory) on the App Server.
Please be warned that any change to this file will require bouncing the report server (or the app server as I sometimes find it doesn't always pick up the changes).
HTHs
L :-) -
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). -
Is it possible to save an Xcelsius chart that has been exported to BOE and is in a dashboard to a pdf or Excel file? This is a popular feature for Webi reports, but it seems to be unavailable for Xcelsius/SWF documents.
We can print using the Print button in Xcelsius 2008, but we don't have Acrobat Professional installed so printing to a PDF is not an option.
Does anyone know a workaround that does not involve purchasing additional software?
Does anyone know when SAP will include this feature in Xcelsius?it's possible to export the data to Excel but it's difficult to say the least. please see the link below for 3 options depending on your particular situation.
http://xcelsius2008.blogspot.com/2009/07/export2excel-in-xcelsius.html -
Programmatically generate password for pdf with data from database
Good day everyone,
I would like to know is it possible to programmatically generate passwords for pdf??
The main idea is to enable an automated process of pdf acquiring individualised password from a database (Excel, Access, you name it) and finally sending the pdf to individual recipient. Can I use javascript for this? And if yes, how?? If not, pls do advice me on the appropriate steps.
Background (for clarity's sake):
Currently I am working on developing an automated process for the sending customised, password encrypted payslip to about 80 staff. The entire procedure is pretty much summarized as below:
mail merg (UBS output in) excel to words -> convert words to pdf -> programmatically password encrypt the pdf -> email to individual recipients.
Well my current status is - I am quite done with the batch mail merge and convertion part. And batch proccessing of password encryption is not a problem, but the idea is to allow acrobat to retrieve password automatically from a database and not key-in each and every password manually. The batch email for now is another problem but for now I have to work stepwise. (Any ideas on how to do it would equally be valued though! =D)
System and software using:
Windows XP and 7 Professional
Microsoft Office Proffesional 2010
Adobe Acrobat X Pro
I would be really grateful for any relevant replies to my question and any additional thoughts or ideas are welcome!!
I would to thank any potential saviour in advance!
Thank you for helping!Basically I need to automate the password generation from database extract
e.g. Excel database with StaffID, StaffName, PayMonth, etc. Then when the pdf is created, its password would be <StaffID>_<PayMonth> which is extracted from excel.
Is it possible for this to happen?? I dont mine using Javascript, I'll just have to learn it.
Or how about recommending a program which does that??
Whichever is fine as long there's a solution!
Thanks! -
Generate report to PDF problem; font or layout problem
Hi all,
I have this report that look fine.
But when I generate this report to PDF one of the column which supposed to show date information become "******" in the PDF version.
Normally I would try to modify the report by changing its font to smaller one or expanding the field to accomodate longer string.
The problem is i don't have the RDF file.
So i need to know how to make the PDF i'm generating looks the same as the the original one i'm generating the PDF from.
btw The report is made with Report Builder 6.0.8.11.3, and running on oracle database 10g.
Thank you.
Message was edited by:
Jimmy JKThello Gouri,
basically I just wish the PDF version of the report looks exactly like the one generated by reports runtime.
When I run the report all data is shown properly.. But the PDF version i generated from that failed to show one the column properly. Instead of showing the data the PDF version replace it with ******.
How come?
Is this the same kind of problem where the printed result differ from what it look on the sreen?
Is it adobe reader problem? -
Greetings all,
I have a report that is being called from a form. The report runs no problem, and comes in the previewers. However, when I try to use the "Generate to File" option, the report blows up(some machines throw a Dr. Watson error, others just through an Application Error). To make this more interesting, if the report is run through the development tool, it generates to pdf without a problem.
Has anyone else had this problem, and if so, what is the fix?
Thanks,
Chris
[email protected]Hi Chris
I suggest you apply Reports and Forms Integrated patch on your setup. You can download the patch from metalink site.
Thanks
Rohit
Maybe you are looking for
-
My Firefox is not working (All I get is a blank white screen with the firefox logo. If I have to reinstall Firefox 3.66, how can I transfer my old profile to the new installation? == This happened == Every time Firefox opened
-
Dell U2713H Startup under Snow Leopard
Under Snow Leopard, 10.6.8, my new Dell U2713H doesn't come on when I Start Up my Mac Pro. I have to turn it off from energy saving mode, and back on. I also miss the spinning starting up window completely. Wonder what I would do if I needed to see a
-
F.05 - Foreign currency valuation of customers and vendors
Hello all, My client wants to post the valuation differences realized gain/loss from exchange rates for customer and vendor open items to the customer/vendor account itself. Meaning, at the moment the F.05 creates the accounting documents for revalua
-
Lightroom 4 removing Vibrance and saturation from my ARW files
I have a Sony Alpha SLT A55V when I import them to Lightroom 4.2 the color and vibrance changes. See examples below. The first image is after importing to lightroom, and making no edits, the second is after importing in PMB Sonys software that cam
-
Vista on Macbook 2.4Ghz?
Hi, I am thinking of buying a Macbook 2.4Ghz but I need Windows Vista Running on it as well. So I was wondering if anyone had already tried it out and what they thought about the performance of Vista on it, ignoring the fact that it would be slower t