Using XML Web Service with OWC Pivot Table

H

Hendrik

Hi all,

I think I have a rather challenging issue here, which I have not found
the best solution so far.

Here it is, I have a stored procedure which obtain a table of records.
These records must be the data source for a OWC Pivot Table on a
ASP.NET page.
I have tried the workaround of converting the resulting dataset to
recordset to XMLData to get the data to OWC Pivot Table.

Now, I have an XML Web Service which returns the same table of records.
Is it possible for me to set the datasource of my OWC Pivot Table to
the result of the query to this XML Web Service?

If not, what is the current best practise to load a table of records
from a stored procedure to OWC Pivot Table?
I have several scenarios here, but not sure which one to implement.

1. Set the CommandText of PivotTable to an .aspx page which streams out
XML file. This XML file is obtained from converting dataset to
recordset to XMLData.
2. Save the XML file and point XMLData and CommandText of PivotTable to
this XML file.
3. Set the datasource to the recordset, from dataset, to
PivotTableClass object, obtain the XMLData, and assign the resulting
string to a hidden <input> field in the .aspx, and on <body> load
assign this string to the PivotTable object's XMLData. (i tried this
one, but no data comes out, only schema)
4. Point the PivotTable to an XML Web Service? (possible?)

Sorry for the lengthy post, and Thanks a lot for all the help :)


Regards,
Hendrik (hendrikch-at-gmail-dot-com)
 
A

Alvin Bruney [MVP]

Basically, any option will do. There are some caveats that you should be
aware of. The XML needs to be valid owc xml or it will not load in the pivot
table for option 4.
for option 2, you will need to configure read/write permissions for file
retrieval.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 
H

Hendrik

Hi Alvin,

Thanks for the reply.
So, what kind of XML is a valid OWC XML? Is there any OWC schema that
the XML Web Service shall produce?

Based on your experience, which option would you recommend I take?

Thanks a lot.
 
V

v-jacko

I wasn't aware you could use XML as data source -
1) Alvin, is this covered in your book - that will clinch the decision
to buy it if so !!

2) Is it literally simple a matter of setting the command text to a
http URL or are any other parameters/setup involved ?
 
A

Alvin Bruney [MVP]

1) Alvin, is this covered in your book - that will clinch the decision
to buy it if so !!
Yup, for all the components along with source code samples.
2) Is it literally simple a matter of setting the command text to a
http URL or are any other parameters/setup involved ?
It's a bit more involved than that. Like I said the XML must conform to
valid OWC XML schema.
So you cannot just set the url to XML and expect it to load.

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 
A

Alvin Bruney [MVP]

So, what kind of XML is a valid OWC XML? Is there any OWC schema that
the XML Web Service shall produce?
OWC XML contains specialized header and footer tags and then some other
stuff that allows
OWC components to parse and load an XML file. In the absence of this
requirement, the load will fail silently.
Based on your experience, which option would you recommend I take?
I like the webservice option simply because XML are business to business
friendly. Outside of that, there really is no advantage to these different
approaches.

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 
H

Hendrik

Hi Alvin,

Thanks for the inputs. I have now successfully load the XML Webservice
with recordset schema (not OWC PivotTable schema) onto OWC PivotTable.

Well, you solve one problem, you get another problem. And the problem I
encounter now is memory issue. When I load 100 records onto OWC PT,
there are no issue at all, but when I try to load 40,000+ records into
it, my memory usage shoots up to 1.8 GB, it hung my machine for about 3
mins before I got HTTP 500 Internal Server Error (presumably because
the aspnet_wp.exe was terminated)

Any take on this? Or is there any best practise from Microsoft on what
is the maximum limit of records that OWC Pivot Table can handle? Or,
such large data should never be loaded into OWC component in the first
place?
Thank you so much :)

-Hendrik-
 
R

richi

Hello Hendrik

I have successfully loaded 10,000 records into my pivot table which takes
about 10 seconds to display on the page.

I would be grateful if you could let me know how you used an XML webservice
into a pivot table as I am going round in circles on this one. Any help would
be very much appreciated.

Alvin - when is your book published. I desperately want to get hold of a
copy but i can't find it anywhere in the UK!!

Many thanks

R
 
A

Alvin Bruney [ASP.NET MVP]

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top