This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

prriya pratheep

Greenhorn
+ Follow
since Jun 10, 2008
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prriya pratheep

I need to create a chart. I am getting parameter from java .

My java code

public static List<CostSales> randomData() {
List<CostSales> listOfCostSales = new ArrayList<CostSales>();
listOfCostSales.add(new CostSales(10.2,1));
listOfCostSales.add(new CostSales(20.2,2));
listOfCostSales.add(new CostSales(30.2,3));
listOfCostSales.add(new CostSales(40.2,4));
return listOfCostSales;
}

parameters.put("listOfCostSales", randomData());

jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,dataSource);

Then In Ireport I created a chart . In main dataset I created a parameter listOfCostSales as list and cost and month. And created a subdataset Chartdata with listOfCostSales, sale, month.

In chart data
Connection/DataSource Expression, I used Use connection expression from the drop down and set value


I don't know what is wrong with my code. I can't access elements of list. I am getting null key ..

For testing Printed month and cost by drag droping. I am getting null

Please help me .I am struggling with this for last two week. Almost googled most of the sites and failed to find out the answer.
6 years ago
I need to create a chart through java i am creating report. Need to generate chart for monthly sales and cost.I use array list for cost , sales ,actual_cost and actual_sales and month and pass this array list through map.My map already has some other values.

My java code










My jrxml file


where ChartDataset is my subreport have parameters Actual_cost ,Actual_sale,Sale,Cost and month which I want to use in my XY chart where month is in x axis and Others as values.

How can i retrieve these values in my chart. when i try to run with $P{REPORT_PARAMETERS_MAP}.get( "Actual_Cost" ) I am getting empty key . I try to print in text box nothing is getting.

Can you please help me to get values. I am new to ireport and last one week i am trying this.

Thanks
I am using java and I Report and new to Ireport. Values to I report are passed through java.

I handled only single values not array or group of values .


Now I want to create a chart. with month on x-axis and running(auto increment) values on y-axis. Data are in Map in java , so i can pass Map to Ireport through parameters.How can use this to chart.

I saw example are for SQ L query .

My java code


Usually i retrieve values like this in Ireport



sample output is
Month: 1
Key: Actual_Cost
Value: 910.00
Key: Actual_Sale
Value: 0.00
Key: Cost
Value: 87300.00
Key: Sale
Value: 97991.25
.....
Month: 17
Key: Actual_Cost
Value: 910.00
Key: Actual_Sale
Value: 0.00
Key: Cost
Value: 92740.00
Key: Sale
Value: 104095.75



Please anybody help me how to retrieve data from map? or If map can not handle in ireport any other way to handle this.

My x-axis is for month should like this M 1, M 2, M 3 ....
and y-axis 100,200,300 etc.

what should i use for Series expression, X Value expression and Y value expression in i report chart properties?

Using graph for four keys so X Y map is OK right?

Please give me suggestions...


Note: data are from two sources, that is why i am using parameter and data source.

Hi, I am facing the same problem. Opening a empty file .Please anybody help me to open it as mentioned by Moieen Khatri.Below is my code



Thanks and Regards
7 years ago
Parent form and child form...what i mean is

JSP program A calls another JSP program B

In A I am calling B like this



I am calling ZSOR_zau_R.jsp and in ZSOR_zau_R.jsp I am returning values to A like this



Instead of hardcoding zdist10,zdist20 i want zdist+lines where lines is the parameter.

Thanks for quick reply
Hi,

I want to return values from child to parent form.I want to return the value in a text box, name of text box is a dynamic one.

The below is the text box where value is goint to display.



In child form



Here instead of zdist10 and zdist20 I want it should be dynamic like zdist plus lines.
for example lines is 10 then zdist10,if it 50 then zdist should zdist50..

Please help to do this.



Hi

In my program when i click a image button it will call program which returns a value

<td ><img alt "new" />)</td>showID will return a value...

I want to display this value in a text box

<span id="empid1"> </span> <input name="empno" type="text" id="empno" size="40" maxlength="50" />

In this above code the value is displaying near to text box...i want to display it inside the text box.

id is empid1

Thanks



I am using MYSQL...

I am using select st and display the value(this is for search form)

My code is


Thanks for the reply
Thanks and Regards
Hi friends,

I want to do one jdbc program which runs the query with wild characters.

Before that in my table filed values are like "ARVOD TEC ", that is a lot of space at the end.

In jsp page if the user enter AR* it should display all the data starts with AR
if the user enter *VOD it should display all the data ends with vod.

I wrote the code to check if the * is at last.In this code strmpn contains is field value

for (int i=0; i < strmpn.length(); i++)
if (strmpn.charAt(i)=='*')
{
flag = true;
}
String replaces =strmpn.replace('*','%');
if (flag)
Query = Query +" MPN like '"+replaces +"'";
else
Query = Query +" MPN = '"+replaces +"'";

If the * is at the end it is working fine.

What is my problem is i want to check at the begining too
Since field values contains lot of space at the end , for example "ARC ",I am not able to get the result...

Please help me how to solve this problem...

Thanks & Regards
In my program i am getting error of
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 1 in the generated java file
The type com.sap.mw.jco.JCO$Function cannot be resolved. It is indirectly referenced from required .class files

An error occurred at line: 1 in the generated java file
The type com.sap.mw.jco.JCO$Repository cannot be resolved. It is indirectly referenced from required .class files

An error occurred at line: 19 in the jsp file: /barCodeHanu.jsp
JCO.Client cannot be resolved to a type
16: try{
17:
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{


An error occurred at line: 19 in the jsp file: /barCodeHanu.jsp
The type com.sap.mw.jco.JCO$Client cannot be resolved. It is indirectly referenced from required .class files
16: try{
17:
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{


An error occurred at line: 20 in the jsp file: /barCodeHanu.jsp
JCO.Repository cannot be resolved to a type
17:
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{
23:


An error occurred at line: 21 in the jsp file: /barCodeHanu.jsp
JCO.Function cannot be resolved to a type
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{
23:
24: mRepository = new JCO.Repository("ARAsoft", client);


An error occurred at line: 24 in the jsp file: /barCodeHanu.jsp
JCO.Repository cannot be resolved to a type
21: JCO.Function function = null;
22: try{
23:
24: mRepository = new JCO.Repository("ARAsoft", client);
25: function = mysap.createFunction(mRepository, "Z_BC_LABEL");
26: if (function == null) {
27: out.println("Function is null!");


An error occurred at line: 39 in the jsp file: /barCodeHanu.jsp
JCO.Table cannot be resolved to a type
36: } catch (Exception e) {
37: out.println(e.toString());
38: }
39: JCO.Table table = function.getTableParameterList().getTable("ZBAR");
40: int numRows = table.getNumRows();
41: String[] value = new String[8];
42:


An error occurred at line: 48 in the jsp file: /barCodeHanu.jsp
com.sap.mw.jco.JCO.Field cannot be resolved to a type
45: try{
46: do
47: {
48: com.sap.mw.jco.JCO.Field tabField;
49: for(com.sap.mw.jco.JCO.FieldIterator fI = table.fields(); fI.hasMoreElements(); out.println(String.valueOf(tabField.getString())))
50: tabField = fI.nextField();
51:


An error occurred at line: 49 in the jsp file: /barCodeHanu.jsp
com.sap.mw.jco.JCO.FieldIterator cannot be resolved to a type
46: do
47: {
48: com.sap.mw.jco.JCO.Field tabField;
49: for(com.sap.mw.jco.JCO.FieldIterator fI = table.fields(); fI.hasMoreElements(); out.println(String.valueOf(tabField.getString())))
50: tabField = fI.nextField();
51:
52:


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.

Hope this is due to class path problem ...the jar file sapjco.jar can't capture...thi jar file is at WEB-INF/lib FOLDER...

is any need to give this in classpath?
11 years ago
JSP
Hi Amit Ghorpade

Thank you for the nice suggestion.Actually I used this name for testing purpose.

I am using eclipse.Hope it will automatically compile.After that i copy the class file to company server and run there

Regards
11 years ago
JSP
Hi
From my JSP page I am calling a function of a java class .I am getting error .


My jsp page where calling is



My class program

I am getting error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 13 in the jsp file: /barCodeProcess.jsp
Generated servlet error:
The method fetchData() is undefined for the type barCodeClasss1


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.


--------------------------------------------------------------------------------
Help please
Regards
[ August 04, 2008: Message edited by: prriya pratheep ]
11 years ago
JSP
Hi friends

In my program i am getting max(ID) an interger value from the resultset.I don't know how to convert that into integer.


String s3 = "select MAX(ID) from SALES_EMPLOYEE_MASTER";
ResultSet resultset = statement.executeQuery(s3);



If I use int maxid=resulltset.getInt(1); , I ma getting error.Please help me to how to retrieve a interger value from the resultset..

Thanks in advance
Regards
Hi friends

I want to print some forms using java.

The form is like one to print header and details.Header contains four rectancle boxes and below header some lines to print DETAILS.

i want to take data from sql table.This part is familier one for me and i can do that.

But for drawing rectancle and put some lable and text boxes inside the rectanngle and print that form ...I am not familier with graphics and priting.

Please anybody help me to get an idea of what are the things i have to use to do this

Can i use applet for drawing rectandcle etc if so how can i print it using printer?

Or graphics without applet?

or else?

Regards
11 years ago
Thank you guys for the replays

I got

here is the code


FileInputStream fis = new FileInputStream(file);
InputStreamReader isr = new InputStreamReader(fis, "UTF8");

11 years ago