如何在RDLC报告中心显示报告数据? [英] How to show report data in center of RDLC report?

查看:98
本文介绍了如何在RDLC报告中心显示报告数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RDLC生成产品收据,但在RDLC中面临布局和设计问题。我的所有报告内容都不在中心。



我的页面大小为7.30厘米,我希望此内容位于报告的中心



这就是我要尝试的实现(预期的输出):





我的第一个桌子侧面的边框也被切割成红色圆圈



我如何将所有内容放在rdlc报告的中心?



已更新: 具有 A4尺寸和横向的报表查看器的打印布局设置:





这是我使用热敏打印机打印收据时的样子:





上图中有2张收据:原始公司生成的收据(右侧)和rdlc生成的(左一)



左侧:该收据是由我的winform应用程序使用RDLC报表生成的。您可以看到,收据中有很多内容被剪切(删除)。



右侧:这是我要实现的原始收据和输出,红色圆圈表示正在裁切的东西(已移除)在我的收据中(左一)。如您所见, BillNo,Date,Time,Title以及两个表格内容均被切掉(已从我的左侧收据中删除)。



原始收据中表格的大小,如下所示:



I试图设置表格的大小,即在我的rdlc报告中 5.2厘米,但是没有这样的选项。



更新2:根据我当前的RDLC设置,这就是我得到的:







我设法按照公司的原始收据确定收据的大小,但是现在唯一的问题是数据没有进入中心并且表已被删除(剪切)。



这里是热敏打印机原始收据使用的设置:





基于上面图片,这就是为什么我一直报告宽度:8cm 高度为29.7 cm

解决方案

看您的照片,看来您有一张8厘米的收据,左右边距为1.4厘米,主体为5.2。



因此您可以使用此设置在报告>报告属性>页面设置中:




  • 纸张尺寸:自定义

  • 宽度:8厘米

  • 左/右页边距:1.4厘米



身体宽度必须为5.2厘米,您可以在不使用边距的情况下进行填充。





这是浅蓝色主体和白色边距的输出。




I am using RDLC to generate product receipt but facing issue with layout and design in RDLC.All my report contents are not coming in the center.

My page size is 7.30 centimeter and I want this content to be in center of the report

This is what I am trying to achieve(Expected Output) :

https://i.stack.imgur.com/eV8Mc.png

This is what I am getting :

Also my first table side border is cut as shown with red circle.

How do I make all my contents in center of the rdlc report ?

Updated : Print Layout setting of reportviewer with A4 size and Landscape:

This is what it looks like when I print receipt using Thermal Printer :

There are 2 receipt in above image : Original company generated receipt(right side) and the one generated by rdlc(Left one).

Left side : That receipt is generated by my winform application using RDLC report.As you can see there are lots of content that is cut(removed) in the receipt.

Right side : This is the original receipt and output I am trying to achieve and the red circle indicates things that are being cut(removed) in my reciept(Left one).As you can see BillNo,Date,Time,Title as well as both the table contents are cut(removed in my left side receipt).

I have measured the size of table in Original receipt and it is as below :

I have tried to set the size of table i.e 5.2 centimeter in my rdlc report but there is no such option available.

Update 2 : Based on my current RDLC setting this is what I have got :

I have manage to got the receipt size as per company original receipt but now only problem here is data is not coming in center and tables are being removed(cut).

Here is the Thermal Printer setting used for original receipt :

Based on above image,that is why I have kept report Width : 8cm and Height as 29.7 cm

解决方案

Looking at your photo it seems that you have a 8cm receipt with 1.4cm left/right margin and 5.2 body.

So you can use this settings in Report > Report properties > Page setup:

  • paper size: custom
  • width: 8cm
  • left/right margin: 1,4cm

The body width must be 5.2cm and you could fill it without using margins.

This is the output with light blue body and white margins.

这篇关于如何在RDLC报告中心显示报告数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆