3
A
回答
2
您可以使用下面的表达式中Image组件的图象 - 属性:
{StiImageHelper.GetImageFromObject(your_byte_array)}
1
我有一个测试表所示:
,并像一个测试stimulsoft报告:
和下面的代码是我送PIC从SQL Server到stimulsoft,使该报告的PDF文件:
protected void btnPrint_Click(object sender, EventArgs e)
{
SqlCommand myCommand = new SqlCommand("SELECT * FROM Product_Pipe_QR", new SqlConnection("my connection string"));
SqlDataAdapter dataAdapter = new SqlDataAdapter(myCommand);
DataSet dataSet = new DataSet("QR");
dataAdapter.Fill(dataSet);
StiReport stiReport = new StiReport();
string path = "~/Report/Product/QR.mrt";
stiReport.Load(Server.MapPath(path));
stiReport.RegData(dataSet);
stiReport.Render();
if (!Directory.Exists(Server.MapPath("~/Report/PDF")))
Directory.CreateDirectory(Server.MapPath("~/Report/PDF"));
string ReportFileName = "Pipe_Report.pdf";
stiReport.ExportDocument(StiExportFormat.Pdf, ReportFileName);
FileStream file = File.Open(ReportFileName, FileMode.Open);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + ReportFileName);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/pdf";
file.Close();
Response.WriteFile(ReportFileName);
}
两个UniqueSerial
和QRImage
在stimulsoft字典是string
和QRImage
数据库是image type
。
相关问题
- 1. 从android数据库中显示图像
- 2. 在Javascript中显示数据库图像
- 3. 从数据库中显示图像php
- 4. 从数据库中显示图像
- 5. 显示图像从数据库中ASP.NET
- 6. 从数据库中显示图像
- 7. 需要将图像从mysql数据库显示到fpdf
- 8. 显示从数据库检索图像到图像控制
- 9. 联合图像和数据显示绑定到数据库
- 10. mysqli不显示图像数据库
- 11. MVC数据库图像显示弹簧
- 12. 显示图像从数据库
- 13. 将数据库中存储的图像显示为blob type.in PHP?
- 14. Django将不会从数据库中显示图像
- 15. 如何将数据库中的图像显示为离子图像?
- 16. 如何从数据库显示图像到剃刀视图?
- 17. SSRS显示嵌入数据库或数据库图像
- 18. 从数据库中显示的数据 - 包括图像
- 19. 根据数据库中的整数显示星图像
- 20. 将图像显示到JApplet?
- 21. 上传图像/显示并将其保存到ASP.NET MVC4中的数据库
- 22. 从SQLite数据库中获取图像并将其显示到GridView Android Studio
- 23. 如何将图像从sqlite显示到flex数据网格中
- 24. 如何将数据库中的图片显示到heredoc?
- 25. 将数据库中的数据显示到组合框中
- 26. 将数据库中的数据显示到DataGridView中
- 27. 根据MySQL数据库中的值显示图像
- 28. 显示从数据库中的图像,图片不显示使用php
- 29. 将图像存储到SQLite数据库
- 30. 将图像存储到sqlite3数据库
我发现了!没有必要做任何额外的事情。我们可以将字节[]传递给stimulsoft,并将一个图像框放到报告中。它会自动放置图像。谢谢。 – Amin 2012-08-14 12:21:40
@Amin,请将您的解决方案作为答案发布并接受它(如[常见问题解答](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work)) – Steve 2012-09-17 14:23:37
我提到没有必要做任何额外的事情。我们可以在报表设计步骤中放置一个ImageBox,并像我们为其他fields_text,number等一样将我们的byte []传递给Stimulsoft。 – Amin 2012-09-22 06:24:34