Hugo de la Mora

Greenhorn
+ Follow
since Jun 29, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Hugo de la Mora

here is my code

<%@ page import="com.crystaldecisions.report.web.viewer.*,
com.crystaldecisions.reports.reportengineinterface.*,
com.crystaldecisions.sdk.occa.report.data.*,
com.crystaldecisions.sdk.occa.report.reportsource.*,
com.crystaldecisions.sdk.occa.report.exportoptions.*" %>

<%
String report = "test3.rpt";

IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
IReportSource reportSource = (IReportSource)
rptSrcFactory.createReportSource(report, request.getLocale());

try{
ReportExportControl expControl = new ReportExportControl();

ExportOptions exOpts = new ExportOptions();
//exOpts.setExportFormatType(ReportExportFormat.RTF);
//exOpts.setExportFormatType(ReportExportFormat.recordToMSExcel);
exOpts.setExportFormatType(ReportExportFormat.MSExcel);

//RTFWordExportFormatOptions options = new RTFWordExportFormatOptions();
//DataOnlyExcelExportFormatOptions options=new DataOnlyExcelExportFormatOptions();
ExcelExportFormatOptions options = new ExcelExportFormatOptions();

options.setStartPageNumber(1);
options.setEndPageNumber(3);
exOpts.setFormatOptions(options);


expControl.setExportOptions(exOpts);
expControl.setReportSource(reportSource);
expControl.setExportAsAttachment(true);
expControl.setOwnPage(true);
expControl.refresh();
//expControl.processHttpRequest(request, response, config.getServletContext(),out);
expControl.processHttpRequest(request, response,getServletConfig().getServletContext(), null);
expControl.dispose();
}catch(Exception e){out.println(e);}



i'm getting this error
Error
exporterName is empty
what can i do?
19 years ago
Hi, does anyone knows how to export data to Excel from JSP using Crystal Reports, thx in advance.
19 years ago
i did not understand the treeset and the comparator, i read some tutorials about it, but i did not get it, so if you could give more help that would be great, thx
19 years ago
Thanks Stan and Sonny for answer, but i'm not sure if usign methods like Arrays.sort(array); will resolve this issue, what im trying to do is...
I have the following code:

File file = new File("../uploads");
String[] fList = file.list();
...
for(int n=start;n<startF;n++){
File f2 = new File("../uploads/"+fList[n]);
System.out.println("name="+fList[n]):
System.out.println("last modi="+new java.sql.Date(f2.lastModified()));
}
...so I want to sort that list by lastModified attribute, is there a short way to do that, because i kwon that the long way is put a couple of lists and then sort both, i was wondering is there are a short way...thx in advance for your time.
19 years ago
is there any way to sort an array by creation date using the File class...

File file = new File("../something");
String[] fileList = file.list();

i want to get the fileList array sorted by creationdate, thx in advance
19 years ago
Yeah!, you're right, thx.
19 years ago
JSP
hi, the values are not passwords or things like that, for that things im using sessions, but i cannot use POST because im using enctype="multipart/form-data" on the form and i get an error using post, also in anothers ones im using javascript like

document.postForm.action='post.jsp?forumID=<%=forumID%>&prev=yes&att=<%=hasAttachment%>';

so do you have any suggestion to hide those values? thanks in advance.
19 years ago
JSP
Hello, my problem is that i have for example this URL http://1.1.1.1/something.jsp?var1=something&var2=somethingimportant, i want to hide var1 and var2 to get only http://1.1.1.1/something.jsp, what should i do?
19 years ago
JSP
Thanks a lot, u are incredible, I really appreciate that tutotial, thanks again.
21 years ago
Hi, Cindy, I dont understand u, can u explain me with an example, please, cos i have never used that class before.
Thanks any way.
21 years ago
What I have to do to print from java in 3 printers?
21 years ago
Hello, where can I find information about or if someone could help me about, How can I print from Java in client-server?
Thanks, I downloaded the new driver and then work it, I really apreciate it, thanks.
Hi, I need help for the next methods (first(),last(),absolute())because dont work and send me this error in
import java.sql.*;
public class Query {
public static void main(String[] args) {
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
}
catch (Exception e) {
System.err.println("Driver Error...");
e.printStackTrace();
}
try {
String cadCon="jdbc:mysql://127.0.0.1/xxx";
Connection conexion = DriverManager.getConnection(cadCon,"xx ","xx");
Statement sentencia = conexion.createStatement();
String consulta="SELECT * FROM bajas";
ResultSet srs = sentencia.executeQuery(consulta);
srs.absolute(4); //here send me Error
int rowNum = srs.getRow(); // rowNum should be 4
srs.relative(-3);
int rowNum2 = srs.getRow(); // rowNum should be 1
srs.relative(2);
int rowNum3 = srs.getRow(); // rowNum should be 3
System.out.println("one "+rowNum+"two"+rowNum2+"three"+rowNum3);
and then i got the error
java.lang.AbstractMethodError
at Consulta.main(Consulta.java:26)
Exception in thread "main"
the method srs.next() work it, so I dont know what I have to do? thank for your help.