Hi, I need help please with queryString and pageHeader

Hi,

1)How can I set an Icone/Image to a pageHeader?

2)How can I creat dinamic queryString parameters, I'm usingJasperReport

I mean something like this:

publicclass Report{

public Report(){

// TODO Auto-generated constructor stub

try{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

Connection conn = DriverManager.getConnection(

"jdbc:sqlserver://matarotsrv:1111;databaseName=qm6","aa",

"aa");

// load JasperDesign from XML and compile it into JasperReport

JasperDesign jasperDesign = JRXmlLoader.load("task1.jrxml");

JasperReport jasperReport = JasperCompileManager

.compileReport(jasperDesign);

HashMap parameters =new HashMap();

if(ownerId!= 0){

parameters.put("owner_id",new Integer(ownerId));

}

if(!(ownerName.equals(null))){

parameters.put("owner_name",new String(ownerName));

})

JasperPrint jasperPrint = JasperFillManager.fillReport(

jasperReport, parameters, conn);

JasperViewer.viewReport(jasperPrint,true);

}catch (Exception e){

e.printStackTrace();

}

}

Then, in the xml file - How can I connect to the WHERE statment only if this properties is full with data?

<parameter name="owner_id" class="java.lang.Integer" />

<parameter name="owner_name" class="java.lang.String" />

...

Where tasks.owner_id = $P{owner_id} AND tasks.owner_name = $P{owner_name}

Thanks,

Yael.

[2676 byte] By [yael800a] at [2007-11-26 18:10:41]
# 1

1) You mean that little icon in the title bar of the window? It's done in the page itself.. Insert this inside the <head> tags

<link rel="shortcut icon" href="img/favicon.ico">

Change favicon.ico accordingly

Sorry, I can't answer number 2

albertsesea at 2007-7-9 5:43:05 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Thanks,I whant to add "logo" to the header report (from xml).
yael800a at 2007-7-9 5:43:05 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Why don't you try asking them? http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=showcat&catid=8
masijade.a at 2007-7-9 5:43:05 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...