开发者

ReportViewer: Print reports and allow users to edit report design

开发者 https://www.devze.com 2023-03-28 21:55 出处:网络
I\'ve been \"playing\" with ReportViewer and I need to know how to do the following things: Print report without creating a ReportViewer. Why? I don\'t want to show it, just print. ReportViewer is t

I've been "playing" with ReportViewer and I need to know how to do the following things:

  • Print report without creating a ReportViewer. Why? I don't want to show it, just print. ReportViewer is too slow.

    开发者_高级运维
  • Allow users to edit report design. The idea is to allow users to drag and drop TextBoxes to fit a pre-printed form. For example: to print invoices in a pre-printed form.

Thanks in advance.


You CAN print a report without a report viewer.

http://msdn.microsoft.com/en-us/library/ms252091.aspx

Also I have seen a post somewhere that creates a class that inherits from PrintDocument and you can pass the report into. It was in C# and I converted it to VB and it works fine.

Edit: Here is the post that detials the ReportPrintDocument class. Code linked on bottom of post http://blogs.msdn.com/b/brianhartman/archive/2009/02/27/manually-printing-a-report.aspx



For the first part of the question: you can not print report without using reportViewer control. But you can print thre report from reportViewer control without actually showing the report. Here is similar question explaining how to do printing of report whout preview
Link
.For the second part of the question there are several ways to edit report desing. First is to use report designer in visual studio. Which is not good for users becaouse most user dont have VS or knowlege how to use it.Another way is to edit the xml of thr rdlc file by hand which is difficult to do even by programers. What i can suggest is using ReportBuilder. But this possible only if you use report server not reports in local mode.If thre is something not clear please ask.
Best Regards,
Iordan

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号