Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic setting picture
Message
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Divers
Thread ID:
00935857
Message ID:
00936143
Vues:
30
>Hi, Wayne,
>
>This is covered in message #906230. The code is in VB.NET. One of these days I have to post the equivalent for C#.
>
>Hope that helps...
>
>Kevin
I have looked at this code and converted it c# for my application. I still not able to view the bitmaps on the report. Here is the code:
DataTable m_basetable = dataSet.Tables[0];
DataColumn col = new DataColumn("bPhoto",System.Type.GetType("System.Byte[]"));//Type typeof(byte[]));
m_basetable.Columns.Add(col);
string ImageLocation = Server.MapPath(".\\")+"images\\";
try
{
foreach(DataRow myRow in dataSet.Tables["WebData"].Rows)
{
FileStream fstream = new FileStream(ImageLocation+myRow["hPhoto"].ToString(),FileMode.Open,FileAccess.Read);
BinaryReader br = new BinaryReader(fstream);
myRow["bPhoto"] = br.ReadBytes((int)br.BaseStream.Length);//MyImage;
}
dataSet.WriteXml(Server.MapPath("..\\")+"..\\private\\LionCrest.xml");
}
catch (Exception err)
{
Response.Write("

");
Response.Write(err.Message.ToString());
}

The above codes seems ok what do you think?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform