Print & Export TChart.net problem
Posted: Wed May 19, 2004 6:49 am
Dear Sir/Miss
I found 2 error in the print and export tchart in the webform runing vb.net code behind.
1. Export
The code work well to export the chart data to excel file format. but when I try to open the exported file using Ms Office XP Pro. It keep on popup the error message. "Unable to read file" What is the problem?
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnExport.Click
Dim objExport As Steema.TeeChart.Export.ExcelFormat = TChart.Chart.Export.Data.Excel
Dim FilePath As String
FilePath = Request.ServerVariables("APPL_PHYSICAL_PATH") _
& "DesignTemp\Test.xls"
objExport.IncludeHeader = True
objExport.IncludeIndex = True
objExport.IncludeLabels = True
objExport.Save(FilePath)
FilePath = "http://" & Request.ServerVariables("HTTP_HOST").ToString _
& "/MyWeb/" _
& "DesignTemp\Test.xls"
Response.Redirect(FilePath)
objExport = Nothing
End Sub
2. Print.
When I try to do print preview at the webform and the error page will keep on display as below. As i understand is because the client site couldn't access the server form. but how to do the print preview in webform?
'#############################################
Dim objPrint As Steema.TeeChart.Chart = TChart.Chart
objPrint.Printer.Preview()
'#############################################
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
And I really feel disppointed about the TChart.net version.
After i upgrade the TChart v5 to Tchart.net version, I found that a lot function is not work properly.
The Multi-Language is not work properly for display the chineses word. It keep on showing the funny character, even I change the webform charset = Chinese Simplified (GB2312) and that is no answer from you.
Anyway if that is no answer for it, we decide to refund the TChart.net.
Cliven
Metierview
BI Consultant
I found 2 error in the print and export tchart in the webform runing vb.net code behind.
1. Export
The code work well to export the chart data to excel file format. but when I try to open the exported file using Ms Office XP Pro. It keep on popup the error message. "Unable to read file" What is the problem?
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnExport.Click
Dim objExport As Steema.TeeChart.Export.ExcelFormat = TChart.Chart.Export.Data.Excel
Dim FilePath As String
FilePath = Request.ServerVariables("APPL_PHYSICAL_PATH") _
& "DesignTemp\Test.xls"
objExport.IncludeHeader = True
objExport.IncludeIndex = True
objExport.IncludeLabels = True
objExport.Save(FilePath)
FilePath = "http://" & Request.ServerVariables("HTTP_HOST").ToString _
& "/MyWeb/" _
& "DesignTemp\Test.xls"
Response.Redirect(FilePath)
objExport = Nothing
End Sub
2. Print.
When I try to do print preview at the webform and the error page will keep on display as below. As i understand is because the client site couldn't access the server form. but how to do the print preview in webform?
'#############################################
Dim objPrint As Steema.TeeChart.Chart = TChart.Chart
objPrint.Printer.Preview()
'#############################################
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
And I really feel disppointed about the TChart.net version.
After i upgrade the TChart v5 to Tchart.net version, I found that a lot function is not work properly.
The Multi-Language is not work properly for display the chineses word. It keep on showing the funny character, even I change the webform charset = Chinese Simplified (GB2312) and that is no answer from you.
Anyway if that is no answer for it, we decide to refund the TChart.net.
Cliven
Metierview
BI Consultant