Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

exec() command  RSS feed

 
ash zeek
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how should I go about using exec() command to produce report using excel through queried data from database and save the report in a folder and display in the GUI? Can anyone help some code will b great.
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to give more details of what you're trying to achieve and what have you already done so far.
 
ash zeek
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, what I meant is I will have a GUI with options that qill query the database after selecting the generate report button a new GUI will appear and within a JPanel it should show a graphical representation of the query results(e.g pie chart). So when the button is run it should also run the exec() command to run excel and feed the query data to it a produce a pie chart which will then return into the JPanel of the Report GUI. Hope thats a better explanation. Can I do this or is there some other caommand I can use. I have no code at the moment just need help on how to go about it.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a GUI that accepts user input.

This input is then used to query a database.

Once the results are amassed you want a new JPanel, that embeds MS Excel with a pre-rendered pie chart?

Wow!

You can however, create a csv or use an open-source Apache project for manipulating Excel files,
then use exec to have Windows associate the extension (.xls, or .csv) to the application type and have it fire up.

Seems overly complicated to be using Excel anywhere.
There are plenty of helper frameworks out there to draw basic and or complex graphs.

Pat.
 
ash zeek
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are probably right- it will be too much work I havent got much time. What alternatives can you think of? Basically the results can be show in the report as a JTable but above it should be a graphical representation. Also, if I have a query page on one form and want to copy the fields selected/entered how can I copy them to the report form? do you have any examples? please
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!