2016-05-02 4 views
0

私はstimulsoftのレポート の新機能です。データベースSQLからstimulsoftのレポートに画像を送りたいと思います。 どうすればいいですか? 私はasp.netを使用します。C# データテーブルを背後のコードで作成し、レポートにバインドするためにデータをデータテーブルに設定します。 このデータテーブルのフィールドは、System.Drowing.Imageオブジェクトで塗りつぶすImageデータ型です。どうすればstimulsoftのWebレポートに画像を送ることができますか

string normalPath = Server.MapPath("Pics\\Other\\PrintPage.gif"); 
FileStream fsN = new FileStream(normalPath, FileMode.Open, FileAccess.Read); 
System.Drawing.Image normalImage = new System.Drawing.Image.FromStream(fsN); 
fsN.Close(); 

DataTable result = new DataTable(); 
result.Columns.AddRange(new DataColumn[5]{ 
new DataColumn("LineNumber",typeof(int)), 
new DataColumn("SerialNumber",typeof(int)), 
new DataColumn("ActivationCode",typeof(string)), 
new DataColumn("DetectorTypeId",typeof(int)), 
new DataColumn("Image",typeof(System.Drawing.Image)) 
}); 

Stimulsoft.Report.StiReport stiReport = new Stimulsoft.Report.StiReport(); 
ds.Tables.Add(result); 
stiReport.Load(Server.MapPath("CustomerActivator.mrt")); 
stiReport.Render(); 
stiReport.RegData("Data", result); 
StiWebViewer1.Report = stiReport; 
StiWebViewer1.Visible = true; 

答えて

0

レポートテンプレートには、画像のデータ列プロパティを設定する必要があります。

+0

ありがとうございます –

関連する問題