Re: [jasperreports-questions] dynamic xls report

2006-01-17 Thread Henrique Oliveira

Hi,

yes, there. Use the crosstab. See example on 
http://jasperreports.sourceforge.net/samples/index.html
Unfortunately yet not exist design graphic tool to draw the crosstab, 
but you can edit you xml and create it.



Manuel Grau Aracil wrote:

Hi! I need to make an excel report with dynamic fields and I don't 
know how. I need to generate a table, but I can't do a design before 
because the number and name of the colums are variable.Is there a 
method to do this with Jasper Reports?




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions


[jasperreports-questions] Setting style at run-time

2006-01-17 Thread Pushkar
	I am using iReport 0.5.3 with JasperReports 1.1.1. I have defined a style in my report using iReport and applied it to some text fields (let's call this style 'col_header'). When I run the report from my java program, it works well and also shows the text fields with the applied style. Now, is there a way, where I can get col_header style from report during run-time and modify some of it's properties. I have tried the following way, but this did not work. It still shows the text fields with earlier style. Basically I want to externalize the style for my reports(similar to css in HTML). Any help on this will be greatly appreciated.//Code Snippet		JasperPrint jasperPrint = jasperPrint(dataSource, reportParameters, templateLocation);JRStyle style = jasperPrint.removeStyle("col_header");//Altering few properties in style		style.setFontSize(12);		style.setForecolor(new Color(50,50,50));//Adding the modified style to the report		jasperPrint.addStyle(style);JasperExportManager.exportReportToPdfFile(jasperPrint, "/sample.pdf");	                 //Thanks,Pushkar

Re: [jasperreports-questions] Empty image map value

2006-01-17 Thread Teodor Danciu


Hi,

This was a bug and was fixed.
http://sourceforge.net/forum/message.php?msg_id=3520710

Thank you,
Teodor


Kjetil Hoem wrote:


Hi Teodor,

JFreeChart is used for the chart generation if that is what you mean. I
have not written any custom JRRenderable, and I thought it should be
fairly straightforward. Here is a little snippet from my prototype
report servlet, also showing how the map content was printed:

--snip
JasperCompileManager.compileReportToFile(jrxmlFile, jasperFile);
JasperPrint jasperPrint = JasperFillManager.fillReport(
	jasperFile, new HashMap(), dbConnection);
JRExporter exporter = new JRHtmlExporter();

StringBuffer htmlBuffer = new StringBuffer();
Map imagesMap = new HashMap();
request.getSession().setAttribute("IMAGES_MAP", imagesMap);
exporter.setParameter(
JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(
JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(
JRExporterParameter.OUTPUT_STRING_BUFFER,htmlBuffer);
exporter.setParameter(
JRHtmlExporterParameter.IMAGES_URI,
"/imageservlet?image=");
exporter.exportReport();
  
for(Object key : imagesMap.keySet()) 
   System.out.println(

"map entry: key="+key+", value="+imagesMap.get(key));
--snip

I'm running it on Tomcat5.5/JDK1.5.0_06/WinXP, if that could provide any
further answers. The jrxml file was generated with iReport. What makes
it really strange is, as I said, storing the chart image on disk is no
problem.

Regards,
Kjetil


 


-Original Message-
From: Teodor Danciu [mailto:[EMAIL PROTECTED]
Sent: 12. januar 2006 19:50
To: Kjetil Hoem
Cc: jasperreports-questions@lists.sourceforge.net
Subject: Re: [jasperreports-questions] Empty image map value


Hi,

Are you using our chart component or is something custom-made?
I'm interested in the JRRenderable implementation behind the scenes.

Thanks,
Teodor


Kjetil Hoem wrote:

   


Hi all,

I have a problem that I have been unable to find any information on
either in the manual, faqs, forums and this list's archives:

The image map (JRHtmlExporterParameter.IMAGE_MAP) populated by the
 


html
 


exporter contains null for what was supposed to be my chart image. A
printout of all the items contained in this map looks like this:

map entry: key=px, [EMAIL PROTECTED]
map entry: key=img_0_0_1, value=null

As you can see, the "px" entry contains an object, and I can confirm
that it is the correct image data object, which works fine. The
"img_0_0_1" entry, on the other hand, contains nothing even though
 


the
 


KEY obviously is present. When I tell the exporter to store the
 


images
 


on disk, everything seems to be fine, and the chart is plotted
wonderfully correct.

But I don't want to store the images on disk. Does anyone have any
 


idea
 


what may cause this strange behavior?

Regards,
Kjetil Hoem




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through
 


log
 


files
   


for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD
 


SPLUNK!
 


http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions



 






---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

 





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions


Re: [jasperreports-questions] Dynamic query, parameters question

2006-01-17 Thread Lucian Chirita
For the order by clause, you can use $P!{..} with a String parameter.  
The parameter passed and default values will be replaced in the query 
string before sending it to the JDBC driver.  The default value should 
be a valid Java String expression.


Regarding the society parameter, check the postgresql's driver JDBC type 
mappings.  If int8 is signed integer on 8 bytes, Long should do.  The 
default value would be something like new Long(1).


HTH,
Lucian

Srepfler Srgjan wrote:

How can I pass a parameter to the query of the type
SELECT COUNT(*),model FROM elevators WHERE society=1 GROUP BY model 
ORDER BY model DESC


I'd like to pass in the order_by (here count) to be also a model, 
should it be of type java.lang.String? Should the default value be 
quoted ""?
Also how do I specify the society parameter (here I've put it to 1), 
how can I make it obligatory, and to my java code I'm using 
java.lang.Long, postgresql characterizes it as int8, what should I 
choose as data type and how do I set the default value to it as it's 
not value type but reference type?


Srgjan Srepfler


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions