Viewing image from xml to CR

I need to load the image into a CR 9.
Image(binary data) should be coming from an XML file.
I've tried loading this image into a PictureBox and it works. It's just so odd I can't view this image in the report. Please help me.
[242 byte] By [Rinoa] at [2007-12-16]
# 1
Hello,

How are you trying to load the image into Crystal Reports 9? Is you datasource for the report the XML file? Is this a stand alone report designer or the embedded report designer?

Keith - Business Objects

KeithThomson at 2007-9-9 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...
# 2
Its the embedded report designer.
Below is my section of code.
The weird stuff here is that all text fields appear except the image.
I've already tested loading this image(from xml file.) into a image field on a form and it works. So I dont think the problem is on the xml file or the binary data(image file) itself.

-

private void PreviewReport()

{

DataSet dtsData=new DataSet();

ReportDocument oRpt;

XmlDocument xmlDoc = new XmlDocument();

string xmlPath= "D:\\DownLoads\\RptPreviewCode\\RptPreview\\Source\\Bom1j0976 - Test C810 - Boot Grey_a723c76d74884249be06ad0059060143.xml";

oRpt = new RptPreview.Reports.rptBomMain();

dtsData.ReadXml(xmlPath);

oRpt.SetDataSource(dtsData);

this.rptViewer.ReportSource=oRpt;

}

Rinoa at 2007-9-9 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...
# 3
by the way, it does have a schema(xsd) file matching the xml
Rinoa at 2007-9-9 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...
# 4

Since you are able to display the image from the DataSet object in a picture control, it should be able to display the image in the report.

The only suggestion I have is to read the schema before reading the xml file.

If this doesn't work, I recommend calling Business Object's customer support.

Mandeep at 2007-9-9 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...
# 5

hi guys , i am still new in this field , and need little help

Rinoa can you post the code that let you display the binary data from XML to picture box (Image) on win form. this is what iam looking for, or any body

can do that help , thanks all.

MCrw at 2007-9-9 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...

Visual Studio

Site Classified