微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Silverlight PDF报表

FastReport.NET的报表Componetone无法打开。

 

using Richwork.Core;
using System.IO;
namespace PdfViewerSamples.Web
{
    // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名“Service1”。
    public class Service1 : IService1
    {
        public byte[] DoWork()
        {

            string root = System.Web.Hosting.HostingEnvironment.MapPath("~");
            string filename=Path.Combine(root,"C1XapOptimizer.pdf");//""report.pdf");
            

            return filename.ToStream().ToBytes();
        }
    }
}



 

   InitializeComponent();

            Service1Client c=new Service1Client();
            c.DoWorkCompleted += (x,y) =>
                {
                    pdfViewer.LoadDocument(y.Result.ToStream());
                };
            c.DoWorkAsync();

            //var resource = Application.GetResourceStream(new Uri("/PdfViewerSamples;component/C1XAPOptimizer.pdf",UriKind.Relative));

 

 

不过不支持,开源的保存PDF报表的开发包有,叫SharpPDF,地址就免了,自己搜去,

Telerik,听说也提供了,不知道有木有盗版。

有木有合适的报表工具呢,最好免费的:

 

http://www.pdftron.com/silverdox/samplecode.html

 

Silverlight viewer sample code

The following section contains a brief description of the included SilverDox sample projects,found inSilverDoxsdk/Samples.


 

+ Tutorial Sample

This is the simplest sample,illustating basic usage of a DocumentViewer to display a .xod file. The sample shows how to send and receive @R_536_4045@ion to a DocumentViewer via data binding and direct method calls.

A step-by-step description of creating this sample is included in the Getting Started section.

 

要钱的。

再找:::::

 

http://pdf-viewer-silverlight.fyxm.net/

 

 

http://silverpdf.codeplex.com/
 

 

你可以展示微软的报表:找到一个开源的:

http://www.codeproject.com/Articles/121196/Silverlight-Report-Viewer-using-View-Model-MVVM

巧遇一个

Android PDF Viewer

Andorid PDF Viewer is a viewer for PDF-Files on ANDROID mobiles. The implementation will be a port of the pdf-renderer which is published by SUN under the LGPL: https://pdf-renderer.dev.java.net/. The first version will be very slow,so do not hurry...

1,268 weekly downloads

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐