Autor Beitrag
pascalsv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 133

Win XP Prof. SP2 / Windows 7
Visual Studio 2008 / Silverlight 3 / Silverlight 4 Beta
BeitragVerfasst: Do 25.09.08 16:38 
Hallo zusammen,

beim Zuweisen von xmlContent zum xmlDS.XMLData.ByteArray (vorletzte Zeile) kommt die Fehlermeldung: "Object reference not set to an instance of an object."

Warum?

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
CrystalDecisions.ReportAppServer.DataDefModel.ISCRXMLDataSet xmlDS =
                        new CrystalDecisions.ReportAppServer.DataDefModel.XMLDataSet();
                    byte[] xmlContent = reportContent.getXmlContent();
                    byte[] xsdContent = reportContent.getXsdContent();
                    xmlDS.XMLData.ByteArray = xmlContent;
                    xmlDS.XMLSchema.ByteArray = xsdContent;


Vielen Dank, ich komme einfach nicht darauf. Ich habe zwar schon einige Threads dazu im Web gefunden, aber mir ist nicht klar, was hier genau falsch ist.

Pascal
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 25.09.08 17:02 
Ich tippe drauf, dass Du xmlDS.XMLData erzeugen musst, bevor Du dann xmlDS.XMLData.ByteArray etwas zuweisen kannst.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".