Creating Charts in MS - Excel from JSP tables
Hi,
Is there any way of taking the values in my JSP tables and passing them into ms-excel, and creating graphs or charts based on these values??
I don't particulaly want to use a macro ... is this the only way? or does someone know an easier and more profficent way?
Cheers
graphs and charts - no. There is probably no easier way.
Putting the values in is not hard. Just set the return type to vnd/ms-excel instead of text/html. And send the HTML table only. This will read into newer versions of excel fine. If for older versions then make your table comma delimited data instead. This can be done through style sheets using XML.
Just some ideas. Without knowing more can't really help more.
Similar Messages
-
Populate Combobox in Excel from SQL Table
I have a requirement to populate a combobox in excel from a table in SQL when the user opens the excel workbook. Can you help me on how I can do that. I have a supplier column in the table which I like to appear in the combobox and has around 1500 records.
Excel Version 2010
SQL Server Version 2008
Thanks in advance.Hi Jaggy99,
According to your description, you want to implement a combobox for the supplier column when open a SQL Server table in Microsoft Excel, right?
I have tested it on my local environment, when we connect to a SQL Server database and display the table data in Excel, the excel will populate a drop-down list for each columns as the filter. Here is the screenshot for you reference.
Regards,
Charlie Liao
TechNet Community Support -
Can't create DeliveryBean when call bpel from jsp
Can't create DeliveryBean when call bpel from jsp
/*** code ********************************/
Properties props = new java.util.Properties();
java.net.URL url = ClassLoader.getSystemResource("context.properties");
props.load(url.openStream());
Locator locator = new Locator(domain, "bpel", props);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
NormalizedMessage nm = new NormalizedMessage();
String convId = GUIDGenerator.generateGUID();
nm.setProperty(NormalizedMessage.CONVERSATION_ID, convId);
nm.addPart("payload", xml);
NormalizedMessage res = deliveryService.request(processID,operationName, nm);
/*** code ********************************/
This code works well in java , but when I use it in jsp on tomcat server,
the following exception ocured:
Can not create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: Name ejb is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:768) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279) at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53) at workflow.bpel.BpelProcessHelper.invokeSyncBpel(BpelProcessHelper.java:54) at
Will anyone to tell me where "ejb/collaxa/system/DeliveryBean" bean is?
Which jar file is this class in ?
Thanksdid you try including bpel/lib/orabpel.jar & bpel/system/server/j2ee/ob_ejb_engine.jar in your tomcat classpath.
-
Create Big XML files ( extract ) from Relational Tables
Experts: I need to create a big XML extract more than 5Gb , from relations tables using SQLX. I read the excellent FAQ given by MDrake in the following thread.
https://forums.oracle.com/thread/418001
Question
1) Is it better to use XML schema, My XML output format is pretty much going to be static, so I can register an XML schema .
2) Does Registering the XMLschema help with better memory management. I recall I used to get out of memory exception when I generated xml documents on oracle 10g using DBMS_XMLGEN.
3) Can I generate this 5 Gb of XML file using oracle's default DOM parser?
Thanks
KevinHi Kevin,
1) Is it better to use XML schema, My XML output format is pretty much going to be static, so I can register an XML schema .
2) Does Registering the XMLschema help with better memory management. I recall I used to get out of memory exception when I generated xml documents on oracle 10g using DBMS_XMLGEN.
No, an XML schema won't help for the generation.
It is useful though if you're looking for the opposite task, i.e. loading an XML file into database tables.
3) Can I generate this 5 Gb of XML file using oracle's default DOM parser?
What is the default DOM parser ? Do you mean DBMS_XMLDOM APIs?
Since you want to generate XML, there's not much to parse.
Generally, using SQL/XML functions is the way to go.
You may still hit some performance/memory issues while reaching such a size, especially with large XMLAgg aggregation context.
If you do, you may switch to chunk generation instead. I've got some pretty good result with this approach and the parallel query feature. -
Creating XML file using data from database table
I have to create an xml file using the data from multiple table. The problem That i am facing is the data is huge it is in millions so I was wondering that is there any efective way of creating such an xml file.
It would be great if you can suggest some approach to achieve my requirement.
Thanks,
-VinodAn example from the forum: Re: How to generate xml file from database table
Edited by: Marco Gralike on Oct 18, 2012 9:41 PM -
Problem creating a datablock with columns from 2 tables...
Hello guys, i have a problem in creating a datablock with columns from 2 different tables. I try to create the datalock manually and in the Query Data Source Type Property i choose FROM clause query, and in the query data source name property i type my sql statement with the columns i want to display.After that i place the items that the datablock will contain , manually from the painter. However , when i run the application, the datablock doesn't display the items from the database. Am i doing something wrong?
Thanx in advance,
Regards,
Bill.Never mind Peter, I found the error. I forgot to make execute_query for the datablock, so this was the reason why the items weren't displayed to me.
Thanx anyway a lot for your advices and your time you spent ! -
Creating a Query with Data from 4 Tables.
Hey guys. I'm having a small problem figuring out the best way for me to handle this query.
I'm trying to make a query which outputs the amount of appointments a GP has furfilled, and the total amount allowed.
I have 4 tables, for each I'm just gonna list the relevent columns:
Appointment: ID, Patient_ID.
Patient: ID, GP_ID.
GP: ID, Trust_ID.
Trust: ID, Quota.
Appointment table has 400 entries (2 per patient atm).
Patient table has 200 entries.
GP Table has 30 entries (GP's can be assigned to more than one person) .
Trust table has 6 entries.
What I need to do is, look at the appointment table and get the number of times each patient has an appointment.
Go through the patient table, and find out which GP the patient in the appointment belongs to.
Add each occurance to the correct GP.
Find out which Trust each GP belongs to, and add the total for each GP to the correct Trust.
Check the quota in the Trust table, to see if the total is more than the allowed.
I can't seem to think of an easy or simple way for me to do this. Can anyone help please? Many thanks.Hi,
That sounds like a job for JOIN.
To check the quotas against the total, use the SUM function; either the aggregate SUM or the analytic SUM, depending on your requirements.
Sorry this answer is so vague, but that's the bes I can do with the information provided so far.
Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved. In this case, between 2 and 10 rows of data per table should be enough to show what you need to do.
Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Always say which version of Oracle you're using. -
Create release not picking data from Requisition table
Hi All,
I have imported release data from 11i to R12 through Requisition import program. Data got imported successfully. I have updated BLANKET_PO_HEADER_ID and BLANKET_PO_LINE_NUM column in po_requisition_lins_all table. Then I have ran Create Release Concurrent Program but that program Not picking the release from Requisition table.
Can any one face this issue...Please let me know what thing i missing while doing this.
Thanks.According to what I understand from your question, you have the Req successfully created but the the release is not happening when you run the create releases program.
You have to have a ASL for this item with release property as Automatic Release and the BPO document number attached in the ASL attributes.
Let me know if you have this setup or not.
Karthik. -
How to dynamically create selecItems in a pgae from a table
To those who may be able to help:
I am using JDeveloper 10.1.3.4. In my application, I need to put a number of selectItem tags such as radio buttons on a page. What is difficult about this is that it can not be known in advance how many radio buttons there will be, because is depends on how many rows will be selected from a table, even though it is known that the number of selected rows will not exceed 3. I am considering using the radio button because it looks better on the page, and the user must select only one.
A few sample rows from the table:
TERM AVAILABLE SWITCHED
200809 N OFF
200902 N ON
200906 Y ON
200909 Y ONThe SQL of the view object from this table/(entity object) is:
SELECT Terms.TERM
FROM TERMS Terms
WHERE AVAILABLE = 'Y' AND SWITCHED = 'ON'I am able to drag the selected two rows from the data control palette. But it is just a table. What I need is to ask the user to select one of them. What is the easiest way to achieve that?
Many thanks for your help!
NewmanHi, Sireesha,
I almost succeed in the backing bean, except one last line when adding the new SelectItem into the list. Here is the code:
private List<SelectItem> termList;
public void setTermList(List<SelectItem> termList) {
this.termList = termList;
public List<SelectItem> getTermList() {
return termList;
FacesContext fc = FacesContext.getCurrentInstance();
ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
BindingContext bc = (BindingContext)vb.getValue(fc);
DCDataControl dc = bc.findDataControl("ZBOVModuleDataControl");
ApplicationModule am = (ApplicationModule)dc.getDataProvider();
ZBOVModuleImpl zbovam = (ZBOVModuleImpl)am;
TermsForStudentsImpl termsOpen = (TermsForStudentsImpl)zbovam.getTermsForStudents1();
System.out.println("Number of rows: " + termsOpen.getEstimatedRowCount());
long size = termsOpen.getEstimatedRowCount();
for (int i = 0; i < size; i++) {
Row currRow = termsOpen.getRowAtRangeIndex(i);
String term = (String)currRow.getAttribute("Term");
String termDesc = translateTerm(term);
SelectItem selectItem = null;
selectItem = new SelectItem(term, termDesc);
// The code runs fine except when the one line below is uncommented
//termList.add(selectItem);
System.out.println(term + ": " + termDesc);
public String translateTerm(String yyyymm) {
String year = yyyymm.substring(0,4);
String semester = null;
String month = yyyymm.substring(4,6);
if (month.equals("02")){
semester = "Spring";
} else if (month.equals("06")) {
semester = "Summer";
} else if (month.equals("09")) {
semester = "Fall";
return semester + " " + year;
}The page in the front is blank except one line of static text, and nothing in the page binds to the termList in the backing bean yet. When the line {color:red}termList.add(selectItem);{color} is commented out, the page runs and the console prints out:
09/08/17 03:17:25 Number of rows: 3
09/08/17 03:17:25 200809: Fall 2008
09/08/17 03:17:25 200902: Spring 2009
09/08/17 03:17:25 200906: Summer 2009But uncommenting that line will cause a NullPointer error, and the error message says that the SelectTerm class can not be instantiated (I wrap round the long line of error message in the browser into several shorter lines):
javax.servlet.jsp.JspException: javax.faces.FacesException:
javax.faces.FacesException: Can't instantiate class: 'zbov.viewcontroller.backing.student.SelectTerm'..
class zbov.viewcontroller.backing.student.SelectTerm : java.lang.NullPointerExceptionI am stuck here. Do you have any idea what is wrong and how to get around this?
Thank you for helping.
Newman -
Can we create a BAM data Object from two tables
Hi ,
I want to pull the data from two tables and create a BAM data object, Is it possible in BAM?
Do the needful
Regards,
FrancisThe sample way is using AQ on database. You can create a database view to join the tables. And create AQ on the view, create a ems to listen on the queue.
-
Create Trigger to insert records from one table to another
I created the below trigger to move data from one table to another after records have been inserted from another table to that table. What I need done is that each time records have been inserted into TEST_TBL, one of these actions codes should be implimented: U-update, N-insert, D-delete and inserted into TEST_TBL1. But each time I run the script, I get bunch of errors. Please see the script below: - Your help will be appreciated.
create or replace
trigger POWER_tr
after update or insert or delete ON test_tbl
for each row
begin
if updating then
insert into test_tbl1
(idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, action_code, date_added
VALUES
(idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, 'U', sysdate);
ELSif INSERTING then
insert insert into test_tbl1
(idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, action_code, date_added
VALUES
(idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, 'N', sysdate);
ELSIF deleting then
insert into test_tbl1
(idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, action_code, date_added
VALUES
(idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, 'D', sysdate);
END IF;
END POWER_tr;
Thank you,
Albert Zaza
Edited by: azaza on Mar 1, 2009 4:14 PMHello
At the end of trigger show errors / and post what errors are you getting exactly?
Here is a simple example for your reference, this will save old values in history table; you can replace it with new values if that's what do you want.
CREATE OR REPLACE TRIGGER TRG_DU
AFTER DELETE OR UPDATE
ON EMPLOYEE REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
DECLARE
BEGIN
IF UPDATING
THEN
INSERT INTO employee_hist
VALUES ('UPDATE',
:OLD.empid,
:OLD.name,
:OLD.deptid);
ELSIF DELETING
THEN
INSERT INTO employee_hist
VALUES ('UPDATE',
:OLD.empid,
:OLD.name,
:OLD.deptid);
END IF;
EXCEPTION
WHEN OTHERS
THEN
-- Consider logging the error and then re-raise
RAISE;
END TRG_DU;
/Regards
Edited by: OrionNet on Mar 1, 2009 7:27 PM -
Create a cursor or collection from a table that is unknown at designtime
Hi All,
I have a bit of a problem: I have to loop through a table (by means of a cursor, collection, refcursor - does not matter - any way that is possible is fine), but I do not know which table at design/compiletime. PLSQL does not want to let me use %rowtype unless the table already exists at compiletime, but I need to write a generic function to migrate data from one datamodel to another (two different applications).
In other words:
type Tc_OOMTable is ref cursor;
c_OOMTable Tc_OOMTable;
rec_OOMTable c_OOMTable%rowtype;
sqltext varchar(1024);
BEGIN
initialize(OOMTab, G3ETab);
sqltext := 'select * from ' || OOMTable;
--loop through all elements in OOMTable
open c_OOMTable for sqltext;
loop
fetch c_OOMTable into rec_OOMTable;
exit when c_OOMTable%notfound;
I would like to be able to pass a tablename to the OOMTable variable. Is that possible at all? If so, how can I do that?
If this is not possible: could I use the ROWNUM and loop through a table like this:
FOR j IN 1..NumRows
LOOP
select * from <my table name> where rownum=j;
--process the row here...
END LOOP;
TIA,
StefanDave,
There are a couple of things: I know the applications that both datasets are coming from/going to, so I know a number of columns that the apps add to the table. I do not know what the user has added for his/her own reasons.
Secondly, I use user_tab_columns to compare the columns between the two tables, including data type, data length/scale/precision if applicable, and store the matching columns in a varray of records.
If I don't write a generic function I'll have to write code for every table, which is what I'm trying to prevent. I'll have a look at DBMS_SQL, see if that does for me what I want.
Thanks,
Stefan -
Date can not display correctly in excel from .jsp
Hi,
I create a .jsp report to export the data to excel. the report run OK, except the date field can not display correctly.
for example in database :start date ='01-oct-2003'
in the except it displays to 02/06/02.
It seem all the date field can not be control in the report, and control by somthing else
Doese anyone come accross this problem?
ThanksHi Rong,
Are you using the following demonstration to build your JSP?
http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
(Output to Excel with Oracle9i Report)
I tried to do the same, and inserted a database date field in the JSP using Reports. I found the following:
While making the template inside Excel, if I make sure that the format of the date cells is "Date" - some particular date format, the date field values from Reports does not get exported correctly.
However, if you make sure that inside the template, the format of the date cells is not date, but "General", then the date field values are correctly exported to Excel.
Pl try it and let us know.
Navneet. -
How to create a link to Excel, from Bex Web 3.x
I need to create a link, from Bex Web 3.x, to Excel or PDF, how can i do this?
I only do a link with another PAge in internet explorer.
Thanks
RominaHi Romina,
I am not sure if I correctly understood your question, but you can try to use the broadcasting functionalities which allows you to publish Excel and PDF documents on the portal, besides online links to real time data.
You can check:
http://help.sap.com/saphelp_nw04s/helpdata/en/3a/0e044017355c0ce10000000a1550b0/frameset.htm
Hope it can help you.
Kind Regards,
Márcio -
Create ViewCriteria comparing two columns from same table
Does anyone know how I can create a ViewCriteria where clause that compares two columns from the same table?
For example if I had two integer columns (MINSAL and MAXSAL) and wanted to see if they are equal. I would normally do the following SQL below.
SELECT * FROM EMPL
WHERE MINSAL = MAXSALIt works, but it is not ideal.
Setup a Transient column that performs a groovy evaluation of MINSAL=MAXSAL and then my ViewCriteria evaluates the column to true and I set Query Execution Mode to Both.
Maybe you are looking for
-
Data Integrator: Arabic characters are not correctly displayed
Hi, I'm trying to load Arabic text via an UTF8 flat file into an Oracle database. I've read several topics and set the correct code page settings (also during install) for the datastore and flat file. Already in flat file preview (see attached screen
-
Transfer material from Valuated project non valuated project
Hi Experts, While i am trying to transfer material from Valuated project stock to Non valuated project with T.Code MB1B movement type 415 'Q', I am getting following error. WBS element has different inventory valuation Message no. CN769 Diagnosis Th
-
I have a Verizon landline and on one of my phones (a corded phone) I always hear news reports in the background. How do I stop this? Thank you.
-
since i downloaded ISO 5 on my ipad and iphon 3 and 4 music stops after one track but the play symbol arrow still shows at top of screen. is this a ISO 5 error and how can i correct it?
-
I have sent my playbook but want to know whats going on with it
RMA #: RM01559652 Serial #: 134362269157 Incident #: INC000025955464 thts all i have can you help me also i recieved 2 new emails from rim way before i made this account wich was made about 2 minutes ago. they congratulated me for buying