Progress bar while downloading xml data

B

Budihardjo Tan

We are using DSC to download XML data and then bind the DSC result to the
pivot & chart component.
We use URL as described below at the client scripting to download the
pregenerated XML data file. The xml data file could be huge (about +100,000
lines and above 100MB).


sURL = '/data/data.XML';
DSC.RecordsetDefs.AddNew(sURL, DSC.Constants.dscCommandFile, sTitle);


Is there a way we could show a progress bar while the client browser
performing the download process?
We need to show the progress to the client when the client brower performs
the second line above.
Any help is appreciated.
 
A

Alvin Bruney [MVP]

you would need to use custom javascript to do this. I've seen code on the
web as simple as drawing colored div tags via a timer. The colored div tags
for a progress bar of sorts. The timer causes the update from the second
line up till the data is loaded and then the timer is stopped and the div
tags are hidden. Googling for that should yield a good catch.
 
B

Budihardjo Tan

Thanks,
I am trying to capture the event from DSC that will update the progress bar.
Is that possible?

Alvin Bruney said:
you would need to use custom javascript to do this. I've seen code on the
web as simple as drawing colored div tags via a timer. The colored div tags
for a progress bar of sorts. The timer causes the update from the second
line up till the data is loaded and then the timer is stopped and the div
tags are hidden. Googling for that should yield a good catch.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Budihardjo Tan said:
Could someone please help on this?
 
A

Alvin Bruney [MVP]

Here is a complete example:

Sub MyDataSourceObject_RecordsetSaveProgress(DSCEventInfo)

' Update the status bar with the current
' completion percentage.
Window.Status = DSCEventInfo.PercentComplete

' Check to see if the save has been completed.
If DSCEventInfo.PercentComplete = 100 then

' Clear the status bar when the save is complete.
Window.Status = ""
End If

End Sub


The event occurs repeatedly when the ExportXML method is called.

Private Sub Object_RecordsetSaveProgress(ByVal DSCEventInfo As DSCEventInfo)
Object A DataSourceControl object.
DSCEventInfo The DSCEventInfo object that contains information about the
event.

Use the PercentComplete property to determine the current progress of the
export operation.
You cannot use this event to update the contents of the current HTML
document.


--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Budihardjo Tan said:
Thanks,
I am trying to capture the event from DSC that will update the progress bar.
Is that possible?

Alvin Bruney said:
you would need to use custom javascript to do this. I've seen code on the
web as simple as drawing colored div tags via a timer. The colored div tags
for a progress bar of sorts. The timer causes the update from the second
line up till the data is loaded and then the timer is stopped and the div
tags are hidden. Googling for that should yield a good catch.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Budihardjo Tan said:
Could someone please help on this?

We are using DSC to download XML data and then bind the DSC result
to
the
pivot & chart component.
We use URL as described below at the client scripting to download the
pregenerated XML data file. The xml data file could be huge (about
+100,000
lines and above 100MB).


sURL = '/data/data.XML';
DSC.RecordsetDefs.AddNew(sURL, DSC.Constants.dscCommandFile, sTitle);


Is there a way we could show a progress bar while the client browser
performing the download process?
We need to show the progress to the client when the client brower performs
the second line above.
Any help is appreciated.
 

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