Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show report data in center of RDLC report?

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 :

enter image description here

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:

enter image description here

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

enter image description here

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 : enter image description here

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 :

enter image description here

enter image description here

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 :

enter image description here

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

like image 711
Learning-Overthinker-Confused Avatar asked Apr 11 '19 13:04

Learning-Overthinker-Confused


People also ask

How show data report in Rdlc?

Go to Design view, Select Smart tag. Click Choose Report Dropdown, Select RDLC report (StudentReport). Click Choose Data Source and select <New data Source>. Select Object and Give DataSource Name.

How do I show the Rdlc report center aligned in ReportViewer?

Hi, I am still sorry for my misunderstanding, by design there is no such feature for report items.To solve the issue, there is a workaround, drag a table to the report body with three columns, delete detail and footer rows. Then drag the designed control (matrix or table ) into middle textbox of table header row.

Which is better RDL or Rdlc?

Here is the main difference between RDL and RDLC. Here is the difference between the RDL and RDLC formats: RDL and RDLC formats have the same XML schema. However, in RDLC files, some values (such as query text) are allowed to be empty, which means that they are not immediately ready to be published to a Report Server.


1 Answers

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.

body width

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

enter image description here

like image 125
tezzo Avatar answered Sep 19 '22 08:09

tezzo