I need to print a set of generated images in a table like structure with headings. These heading and images are never displayed on the screen. The images are generate QR codes for a series of URLS so they can easier be read in by a scanner. There need to be a header on each column and a text id field on each row but apart from that the rows would be 4-6 columns of QR codes (2d barcode).
I have found samples for printing images and samples for printing text and even a sample to print a datagrid shown on the screen but nothing for printing text and images in a table like structure. Could anyone help me out with a basic example. The table is expected to go over multiple pages vertically so I would also need to put the heading row on each page.
Even pointing me in the right direction would be useful.
This is for a windows application where I want to have code kick off a print job with no user interaction. Using dotnet 4.0.
See my method for creating and printing FixedDocument here including source code. This method will easily allow you to generate aligned tables with images and text and save them as XPS or print them to a printer.
Related
I am trying to create an RDLC report in a newspaper like 2 column format. This is my first venture into RDLC report and I am an absolute noob here.
I have tried to follow the instructions here
How can generate RDLC report on two columns?
but still my report shows up in one single column. I have decreased my font so that there is plenty of space for both columns to fit, but still the report body content never spills over to the second column
Some other forums tell to use a filter variable to display odd rows on the left and even rows on the right, and so on, but I cannot use that approach because the client requirement is that the second column will only be used if the first column is filled.
I am attaching a screenshot of my first version RDLC design.
I am also attaching a screenshot of the report format that is actually required see bellow.
You have this wast "white space" around your table which still counts for "used" space. This could be one of the things that makes RDLC "push" what is can to the second page. The things to do is to:
Reduce report size (in designer) to the table size with no white space
Set report size and margins in Report Properties window:
Look at Columns and ColumnSpacing properties of your report as per:
.rdlc report: text on page in two columns
I have a client that is asking me to add a fixed width (510 character) header record to a PDF file. They have asked that I create a new page (not problem) in which I write this fixed width header record on.
I can do this, and see the header record as page 1, followed by the original PDF. The problem is white space. The 510 character fixed width header is about 60% white space and all the ways I've tried generating the PDF cause this to be truncated. There are also line breaks where the text wraps. The client want to be able to use some OCR software they have purchased in order to read this header file from page 1.
I know very little about PDF file format. I've tried using ABCpdf, PDFsharp, and also created an RDLC and bound it to this header string and then generated a PDF from that. All 3 resulted in the same outcome.
Let me say I know how crazy this sounds, but it's what a client is requesting. I proposed several other ways in which we could solve their problem, but this (right now) is the only one they are comfortable with. They are not comfortable with me just appending the 510 characters onto the byte array, and having them separate it out programatically.
Are you looking to have a page displaying the long header? You can create a PDF page of any size (Print to PDF with a custom pages size of 20" wide by 6" tall. Weird but possible.)
Once that page is created, it can be inserted into another document of regular letter size pages.
Are you looking for consecutive pages displaying chunks of the header?
Using an OCR to read content that you put in is an overkill. Instead of rendering the 500-character header as text. Render it as single-character form fields. This way it will be easy to access those form-fields by name and retrieve the values using the same PDF library which you created the PDFs.
I have a pdf file with some table inside.
I want to read this document and change some existing row and add new rows too.
Is there a way do do this?
I'm afraid you won't have any luck.
Unfortunately you don't get 'rows' in a PDF - there is no concept of a table in PDF - only text and vector graphics.
This means you will have to manually add the vectors and the text in the right places to give the illusion of a table.
I am trying to create a Report with two columns.
Records should add in as below...
1.Bob 6.Sarch
2.Sue 7.Barrie
3.Adam 8.James
4.Dave 9.Steve
5.Robin 10.Euan
11.Fred
12.Heidi
13.Liz
For the first column (1-5 in this example), a page break should wrap the data to the second column (6-10). After the second column is full (11-13) the the data should page wrap.
The data used to generate the report will have a fixed number of columns. The height and width required for the data will not change.
I am using with C#, WinForms, .net4. I have tried several various approaches with no success. Thus far I have only managed
1.Bob 2.Sue
3.Adam...
Please help or point me in the right direction :-)
Many Thanks
TL;DR ---> This isn't possible with SSRS, afaik.
If I understand correctly, you want to list the items in a data set, that when rendered with a hard page break renderer will render with these requirements:
items are added vertically as long as there's space on the page
a new column of items is started when the first column ran out of space, vertically
a page break is inserted when the second column filled up the vertical space, thus starting a new, first column on a new page
Now, there's only these controls in SSRS:
Textbox
Table, Matrix
Chart
Gauge
List
Image
Subreport
Line, Rectangle
Out of these only the Tablix (Table/Matrix) and List are remotely capable of such a thing, but they can't satisfy your requirements. I'm afraid the answer to your question is that this can't be (easily) done.
The hard way that this may still be possible is perhaps by creating a custom report item and/or by creating a custom rendering extension. But that may be overkill for just wanting to create a nice little list.
i will need to print an "x" according to the coordinates given to me from one of the tables in my database. im probably gonig to use c# to connect to mysql.
i will probably have a winform that is 8.5 x 11 inches (The size of a regular sheet of paper) and i will populate the entire thing with labels of "x" and they will be invisible.
each individual table record will have the coordinates of those labels which should NOT be invisible
the form for every record will show and will print. the printing will be on top of a paper that is actually a physical application itself.
the problem:
how to fill out a physical application using data from a mysql database. (dont tell me that i should be printing the entire app from scratch, the reason this is not possible is because the form is actually TRIPLE paper width (white, yellow, and pink copy), so i cannot print the entire app from scratch, i have to print on top of it.
the question: how do i print "x" at specified regions? is my solution the best way to go or is there a smarter approach?
in case you have no idea what i am talking about, here are some related questions:
ms-access: designing a report: printing text on specific x,y coordinates
Conditional formatting in Access
While labels would offer you the ability to make an X show up I don't feel that having a bunch of hidden labels is the best way.
Does the "application" represent some kind of form? Are you looking to "check-off" boxes using x's and then print this?
I may suggest using GDI+ (drawing) vs using labels.
Consider the following:
Locate the coordinates for your boxes. Then use the drawstring method within an overridden onPaint event-handler for your form or for the panel which may represent your form's canvas.
This article talks about GDI+ and how to draw text as graphics.
http://www.functionx.com/vb/gdi+/objects/fonts.htm