I am trying to generate invoice with thermal printers, as the width of the page is less. I am trying to divide Table Header and data into multiple lines. How can i achieve this thing in WinForm Application using RDLC.
I have attached the Image which i am trying to achieve.
Attachment
Maybe it is too late for this answer but it may be useful to someone.
In the header Insert a row below, there will be two lines of header, in the first select all the columns and combine them, type the title for the product, in the second line type the columns QTY, PRICE, EXPIRE, in the detail insert a row below, there will be two detail rows, in the first select all the columns and combine it, assign the Product Name field, in the second row of the detail configure the fields QTY, PRICE, EXPIRE
Example
Regards,
Related
I'm using rdlc files to generate pdf files.
What I basically want to do to is to display the data of my data set on two "synchronized" tables.
The image below represents the result I would like to obtain:
The image represents one page of the pdf, on which the data is group by a certain attribute of the dataset.
Please tell me if any clarification is needed, it's hard for me to explain clearly.
How can i do that with 2 tables as a single object?
I managed to do this with a Tablix as the container. Add two lines of header and add another two Tablix to each cell of header with data. You cannot use Data row, you have to remove it. You can add a Tablix to a cell with drag and drop.
In the end, you will have something like :
Probably something alike can be achieved with subreports, but I'm not familiar with them.
EDIT:
Added screenshot
I believe this is what you want to see. 1 column, 3 rows Tablix. In Cells(1,1) and (3,1) you have other Tablix objects that you can customize.
Since i haven't find a way to merge colunms cells in rdlc, I've tried to concatenate 2 tablixes horizontaly- one is "standard" table, and the other is one field (those were my needs).
Running my sp on my rdlc, it works fine where there is one record to display.
However, when the result is multiple records, and I'm saving results in .pdf file, the 2 tables are not "synchronized" together any more - the gaps between results of each records are different.
I've tried to surrender the tablixes in rectangle and define a page break after rectangle - table still not synchronized...
Please advice..... ☺
Combine your two tablix into one. You can create the appearance of having two by putting an empty column between the two "sides" with no borders on top or bottom of the cells. It will look like two tables side by side, even though it is one table, and the rows will be forced to line up horizontally.
Another possibility for you is to have a sub-report. Create a simple report of just the tablix of the second table in question of the field(s) you want to include.
Then edit your primary report to include the sub-report. I cant direct in detail now how to link-up the sub reports and parameter link them, but suggest some reading up on it. So Each detail row in the parent report would be a group by (its PKID for example), then add the sub-report to it. This way as many rows at the sub-level go if 1 or more...
i got my pdf like this.
https://drive.google.com/a/mahidol.edu/file/d/0B9vSVV3dDAmFZDkwWXdfYWNDc2M/view
first, on Page 1 i use rowspan on the first column when it splited, bottom line not be equal. i want the line to be equal.
second, on Page 2 when table splited, on first column, i want to repeat column value again on new page.
thank you so much.
ps: I use nest table (fill table into another table). i am not sure, this is cause of problem or not?
I've had a Google but I find no answer. You know how say in MS Word, when you insert a table, you can merge the columns of one single row to create a column-less row? Or have say a main header and then more columns inside it? Like so:
Merged Row:
|Column 1|Column 2|Column 3|
|Value|Value|Value|
|Merged Row|
|Value|Value|Value|
God the text formatting is awful on this web-site...and the Header Column example:
|Main Header||Another Main Header|
|Column 1|Column2||Column1|Column2|
I'm trying to achieve this in a written DataTable in C# which is being populated by an array. But I'm interested in changing its structure as one of the above, whichever is possible/easier.
So I've created my DataTable and added normal columns and rows etc. But I'd like to create either a merged row or a main header to display. Instead of having a repeated value in a single column for the values I am getting.
Can someone please provide a quick example on how I could achieve either one of those? Because repeated value will just look ugly.
Cheers.
You're talking about displaying data in a particular way but a
DataTable has nothing to do with display. It is for storage and that's
that. How you display the data is up to you. The same data can be
displayed in innumerable different ways. In a WinForms app, one of the
most common ways to display the contents of a DataTable is with a
DataGridView. You can choose which columns to display and merge cells
in that grid if desired. In short, you're looking in the wrong place
to do what you want to do. It is a presentation issue, not a data
issue. –
jmcilhinney
I have a rdlc where I'm building a report.
I'm using a tablix grouping by a field of the tablix dataset, like the following:
When I fill the report with data and refresh it, it comes out like this:
Now, I want the first column(wich has the group by by the field "nome_terr") appear not in first place, but by second. The first column has to be "territorio_emp". If it was a normal column, I'd just move it, but being the Group By column I don't know how to do this.
Ideas?
Thank you.
If you know that your Territorio_Emp data is 1-1 related to your Nome_Terr column, you can just group by Territorio_Emp first, then by the Nome_Terr column.
If thats not possible, you can keep it the way it is, but make the width of the group by column 0, so its basically hidden. Just drag the column header separators.