OWC10 migrated to .Net empty images created..

B

Bob [BVP]

I have OWC10 Pie chart that works fine in classic asp, but
does not render the image in .aspx ? The app runs, no errors
but it generates an empty image file. Maybe you guys have
an idea ? I initially thought it must be permissions, then
I thought the datatype/data issue.. I have plucked around with
no sucess.. the data looks fine.. Just no image.. ?? Anything
obvious come to mind ?

oChart = New OWC10.ChartSpace
c = oChart.Constants
oChart.Border.Color = c.chColorNone
sCaption = "Managed Assets"
oChart.Charts.Add()
oChart.Charts(0).Type = oChart.Constants.chChartTypePie
oChart.Charts(0).SeriesCollection.Add()
oChart.Charts(0).SeriesCollection(0).Caption = sCaption
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimCategories, c.chDataLiteral, PieCategories)
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimValues, c.chDataLiteral, PieVals)
oChart.Charts(0).HasLegend = True
oChart.Charts(0).HasTitle = False
sFname = "reports\" & Session("FSO").GetTempName & Session.SessionID & ".gif"
' show a logo.gif just fine, so I know that the .binarywrite is working correctly..
' sFname = "reports\cpa_logo.gif"
oChart.ExportPicture(Server.MapPath(sFname), "gif", 610, 550)
' Response.BinaryWrite(oChart.GetPicture ("gif", 500, 400))
' ChartHolder.Controls.Add(new LiteralControl(sFname))

response.Write("<tr><td wdith=340><img src='" & sFname & "'></td></tr>")
response.Flush()

Thanks, Bob
 
B

Bob [BVP]

Ok, installed the Office XP "Primary Interop Assembly" (PIA), registered the
assemblies.. modified my machine.config, and imported the correct
namespace.. but the first statement in the code below is
failing ? What am I doing wrong ? Clues appreciated..
 
A

Alvin Bruney - ASP.NET MVP

have you resolved this issue?

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

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET
 
B

Bob [BVP]

No sir..

Alvin Bruney - ASP.NET MVP said:
have you resolved this issue?

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

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET
-------------------------------------------------------



Bob said:
Ok, installed the Office XP "Primary Interop Assembly" (PIA), registered the
assemblies.. modified my machine.config, and imported the correct
namespace.. but the first statement in the code below is
failing ? What am I doing wrong ? Clues appreciated..
 
A

Alvin Bruney - ASP.NET MVP

re-register you owc10 dll at the command prompt
regsvr32 owc10.dll. after that, your call should succeed

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

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Bob said:
No sir..

Alvin Bruney - ASP.NET MVP said:
have you resolved this issue?

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

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET
-------------------------------------------------------



Bob said:
Ok, installed the Office XP "Primary Interop Assembly" (PIA),
registered
the
assemblies.. modified my machine.config, and imported the correct
namespace.. but the first statement in the code below is
failing ? What am I doing wrong ? Clues appreciated..


I have OWC10 Pie chart that works fine in classic asp, but
does not render the image in .aspx ? The app runs, no errors
but it generates an empty image file. Maybe you guys have
an idea ? I initially thought it must be permissions, then
I thought the datatype/data issue.. I have plucked around with
no sucess.. the data looks fine.. Just no image.. ?? Anything
obvious come to mind ?

oChart = New OWC10.ChartSpace
c = oChart.Constants
oChart.Border.Color = c.chColorNone
sCaption = "Managed Assets"
oChart.Charts.Add()
oChart.Charts(0).Type = oChart.Constants.chChartTypePie
oChart.Charts(0).SeriesCollection.Add()
oChart.Charts(0).SeriesCollection(0).Caption = sCaption
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimCategories,
c.chDataLiteral, PieCategories)
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimValues, c.chDataLiteral, PieVals)
oChart.Charts(0).HasLegend = True
oChart.Charts(0).HasTitle = False
sFname = "reports\" & Session("FSO").GetTempName &
Session.SessionID &
".gif"
' show a logo.gif just fine, so I know that the .binarywrite is
working
correctly..
' sFname = "reports\cpa_logo.gif"
oChart.ExportPicture(Server.MapPath(sFname), "gif", 610, 550)
' Response.BinaryWrite(oChart.GetPicture ("gif", 500, 400))
' ChartHolder.Controls.Add(new LiteralControl(sFname))

response.Write("<tr><td wdith=340><img src='" & sFname &
'> said:
response.Flush()

Thanks, Bob
 

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