guntur reddy

Greenhorn
+ Follow
since Jan 23, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by guntur reddy

se this example it is usefull

The only change we need to make on the JRXML template is to remove the <queryString> element.
To fill the report, we need to execute a database query in our Java code, and pass the query results to the report in a datasource, as can be seen in the following example:



I think it is useful

Thanks
venu
Hi
I am using jasper 4.0.0 i should using ireport with same version.
but i have a Nullpoint Exceprtion occure


java.lang.NullPointerException
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2264)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2277)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2748)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:53)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:200)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:603)
at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:370)
at com.abhinow.st3.web.servlets.Reportpdf.doGet(Reportpdf.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)


InputStream reportStream = getServletConfig().getServletContext().getResourceAsStream("C:\\workspace\\gvr\\WebContent\\jasper\\examplereport.jasper");
The null point occur in reportStream.
This is write way are not to take a path "C:\\workspace\\gvr\\WebContent\\jasper\\examplereport.jasper"
suppose i am taken a path ("...//jasper//examplereport.jasper") it has a error occur file not found exception.

One thing where the place the Jasper file.I place the .jasper in WebContent\\jasper\\examplereport.jasper


Thanks
Gvr
Hi i am using ECLIPSE IDE. How to ireport connect the Spring loaded Hibernate connection
Can you send a example
How can i use the Eclipse ide


Thanks
gvr
How to prepare a jasper report using struts2 with hybernet (Dynamically) .Please send a example .
and explanation .



Thanks
gvr
9 years ago
How can i use the struts jqueryGrid tag .sample example



Thanks
gvr
9 years ago
Good morning sir Could you please also tell me how to prepare a jqGrid with jsp server side and send a example to me


Thanks
venu
9 years ago
JSP
Payment table

Name Month Food Milk Education Rent
Abc January 1000 110 1000 550
Abc February 1000 210 1000 100

Please help me I have a problem .i am taking the table Payment table in this table Name and Month are primary keys.using Name we get the list objects it has a problem.



We are passing the String name=abc;



Dao Class:




public final List detailsrevised(final String name) {

String s = "select d.Month from Payment d"
+ " where d.name= '" + name + "'";
Query queryResult = session.createQuery(s);

List listmonth = queryResult.list();

int lenmonth = listmonth.size();
List<Payment> PaymentList = new ArrayList<Payment>();
System.out.println(PaymentList);

for (int i = 0; i < lenmonth; i++) {
String month = (String) listmonth.get(i);
System.out.println(month);

String s1 = "select d from Payment d where d.name = '"
+ name + "' and d.Month = '" + month + "'";
Query queryResult1 = session.createQuery(s1);

Payment Payment = (Payment) queryResult1.list().get(0);

PaymentList.add(Payment);
System.out.println(i);
System.out.println(PaymentList);
}

return PaymentList;
}

Problem: here we have a problem the list of objects are same values [quickstart.model.St3Details@9f784d, quickstart.model.St3Details@9f784d]


OUT PUT
[]
January
0
[quickstart.model.St3Details@9f784d]
February
1
[quickstart.model.St3Details@9f784d, quickstart.model.St3Details@9f784d]



I think it has a problem on cache.how can solve this problem please help me







9 years ago
please help me sir
ex :<s:textfield name="first name" label="First Name" /> in this example how can i separate textfield and label .please send a one sample example . i am the stating stage of this program



Thanks sir
gvr
9 years ago
sir
Could you please help me. how can i get the values from the database to jsp page using hybernet



Thanks
gvr
9 years ago