I am new to Dundas, I would like to export the olap grid to excell. I dont know how to do it. can someone help me on this?
views:
22answers:
1
+1
A:
I assume the ASP version:
Dim myResponse As HttpResponse = HttpContext.Current.Response
Dim strm As System.IO.Stream = New System.IO.MemoryStream
Dim strToExport As String
OlapGrid.Export(strm)
Dim streamReader As New System.IO.StreamReader(strm)
strm.Position = 0
strToExport = streamReader.ReadToEnd
Try
myResponse.Clear()
myResponse.Buffer = False
myResponse.AddHeader("content-disposition", "attachment;filename=Report2Excel.xls")
myResponse.ContentEncoding = System.Text.Encoding.Default
myResponse.ContentType = "application/vnd.xls"
myResponse.Charset = ""
myResponse.Write(strToExport)
Catch ex As Exception
Finally
myResponse.[End]()
End Try
BTw if you know a solution for the KPI images in the grid let me know
Doc
2010-09-21 11:57:33
Thx for your reply, also, i got it worked here is the code snipt.
Nathan
2010-09-27 15:44:49
if (this.IsCallback) {return; }Byte[] renderedBytes = _presenter.GetRenderedBytes(new MemoryStream(), OlapClient1); if (renderedBytes != null Response.ClearHeaders(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; //"application/pdf"; Response.AddHeader("content-disposition", "attachment; filename=temp.xls"); Response.BinaryWrite(renderedBytes); Response.Flush();
Nathan
2010-09-27 15:46:15
Try this for KPI images http://documentation.devexpress.com/#WindowsForms/CustomDocument8390http://documentation.devexpress.com/#WindowsForms/CustomDocument8390
Nathan
2010-09-27 15:55:34