Crystal Reports - Underlay section overlays lines (drawing object) - c#

I have a problem with CR (version that ships with VS2008). Report has two report headers, one of them is used for watermark (a picture), using the "Underlay following sections" option.
The problem is that, while this picture underlays field objects, it overlays lines in all of the sections (details, report footer etc...).
Any solutions? Help would be mostly appreciated, I'm starting to lose my hair ...

I found "a solution" by replacing the line object with a textbox object, whose one of the borders is set to single. This way, the watermark stays under, and I have my line.
This might be a bug in CR ...

I had a similar challenge, I had an image in Header 'A' which was set to underlay following sections. The challenge was when I built a Header 'B' and drew a box or a line, they were obscured by the image.
(Text boxes worked fine but I needed to draw a box and some lines.)
The work around was I simply put a Sub report into Header 'B' and then I went into the sub report, drew all my boxes and lines and great news, they all appeared as I hoped when I ran the report. I hope this helps somebody else.
R.

Related

Is there an option in chart.js to hide values in the graph legend

I've picked up a project from a former colleague but know nothing about javascript and/or chart.js, I'm trying to learn.
I've been asked to part of the graph/legend - red ring in the image.
The thing is the chartjs json string/structure is split into separate variables which make it pretty hard to follow - and also give code samples. I've tried changing the "options" string, i.e. options: {legend: {display:false }}, but it's still displaying.
Is the part marked red actually part of the legend or is it something else on the chart
Image showing what I need to hide
That isn't the legend. Somewhere in the options there is a property xAxes. Here your collegue has defined multiple new axes. These are the ones you see. If you remove them and remove the xAxisId from the datasets you will get what you want

How to add a footer as a watermark so that it can be removed later

I have some scanned PDF documents (pretty flat, no selectable text, tags, objects, etc) and I would like to add a footer that can also be removed after being added. However, if it overwrites on top of anything, I want to remove the footer only. We can assume that, after the watermark is added, it won't be rescanned, changed, or flattened. (I should mention, in case any iText employees see this question, that my organization has recently purchased a license but I just started this project and I am waiting to have it sent to me so I can register for official support.)
I found an excellent answer for adding and removing watermarks here: iText 7 - Add and Remove Watermark on a PDF . My problem, as stupid as it might sound, is I'm really struggling with getting the variables right, even after lots of trial and error. The scanned documents seem to be coming in as portrait (when viewed in a PDF viewer) but they have a rotation of 270 such that, PdfDocument.GetPage(i).GetPageSize() and GetPageSizeWithRotation() have the height and width reversed and I need to take this into account but also don't want to assume that this is always the case. The footer should be centered at the bottom of the page.
The method signature can be as in the link provided (https://stackoverflow.com/a/45225597):
public static void WatermarkPDF(string sourceFile, string destinationPath)
Thank you in advance for the help and support.
Okay, BIG TIME EDIT: requirements are changing. In fact, they want to be able to have 2 lines of text as a left aligned header and have the ability to remove or replace either or or both AND additionally, have a right aligned footer that also can be removed or replaced. Not sure anymore if this should be implemented as a watermark. Again, I can assume that, once I add the headers and/or footers, the document won't be reflattened or edited in any major way... so, if they are added as elements, they should be able to be removed as elements but the problem is the scanned documents have no structure to begin with anyway (at least they don't seem to so far). So, there's no parent element, tag, or whatever.

C# string.Format alignment issue

I have a problem with the alignment of a few names (changed for this question).
with this code I display the names in a richtextbox where it should be in one row with the "Spalte:" after the Names...but it doesn't. Can anybody help me please?
(only the first for-loop is necessary for my question, the next one does another job)
I added a pic what it looks like and how it should be looking. I know I can do it like its in the commented area (doesn't work in every case), but I need to change the code for a few other things so this needs to work....
Here is what I have:
And here is what I want:
Thanks for helping me :D
You have four options:
Change the code for the RichTextBox to use a fixed-width font. Most fonts have variable widths for each character, meaning you can't line things up neatly based on spacing alone.
Use tabs instead of spaces for the layout (and make sure the tab size is large enough to account for variances in your text).
Use a grid control of some type (DataGrid, GridView, etc)
Use a custom control for each row with labels at specific places (and either calculate positions yourself to place them on the form or use something like a FlowLayoutPanel).

Crystal Report Layout issue

I am designing a Crystal Report in Visual Studio 2012 and can't seem to manage the position of a vertical line. I need the line to stick the right edge of the page, but it resists. Even if I managed to align it on the right, it displays at a different position after deploying the software on another machine, even when just previewing.
Setting the page size to A4 doesn't help. How can I make this easier on me?
Designer View:
In Report preview the right hand side line is not shown properly:
If I move the line a bit to the left, like this...
...the row background goes beyond the line in preview.
You might have better luck using a Box object for the outer layers and only using lines for the inside columns. Just like the lines, the Box can span multiple sections and will resize vertically if the report has extra lines added in. At the very least this will make sure the outside borders always connect perfectly.
If you're still having problems with precision, try setting the Size and Position. Set the Left and Top to zero, and calculate the appropriate Width value based on the Width of your report.
In the end Crystal reports are a little finicky when it comes to layout, and different viewers/printers might jostle stuff around a little. But unless the report has a dynamic width, you should be able to get it pretty close with a Box and very specific Size/Position values.

ReportViewer 2010 control either prints part of a table on a separate page or prints an extra empty page

I just started using ReportViewer control VS2010 (web, local).
My report is very simple - 4 columns, all fit on a screen fine.
When I click "print" button, the report is printed on 2 pages ( 2 columns on one and 2 on another).
If I change the margins on a page, all 4 pages are printed on the same page but I still have 2nd empty page printed as well.
If report spans across multiple pages (2 for example), with margins changed I get first page, second page is empty, then third page fine and the fourth page is empty.
Any suggestion how to make the report printed without empty pages?
Thank you,
Jenny
In my experience (which has been a painful one...), I found that if the report is printing an extra page it means that somewhere, your margins or page size of the subreports (if you're using any) are not equaling 8.5 X 11 (or whatever size paper you're using). make sure that your your table (i'm assuming that's what you're using?) is in the bounds of a sheet of paper. keep in mind you need take an inch of of each side (if you're using .5" margins [.5" for each side]) to keep the table on one page.
I had the same problem and m.webster's answer was spot on for me.
Check that the SIZE property of the reports BODY is within your REPORTs Pagesize and Margin properties.
In my case, I had set my report to A4 and the properties of the report (click in the grey area of the designed) showed: PageSize: 21cm, 29.7cm. I built my report but printing resulted in content spilling over to a second page.
When I turned on the RULER option, it was immediately obvious that my reports BODY (white content area) was wider that then PageSize of the Reports page size.
When I reduced the BODY's size->width property down to 21cm (after rearranging all my content to allow this resizing) I found there I was still getting the second page problem. A quick change to the reports margins down to 0 resolved this.
The final white space problem I had was an empty page appearing at the end of some of my reports. This was resolved by reducing the height of the reports BODY so that there was no blank space after my content. Because the initial report body appears in a nice portrait layout, I had assumed that it was just representing the final page which was not the case.
Its a bit of a late answer to the problem but I've added it to save someone else the wasted hour of head scratching when using this slightly unintuitive piece of kit.

Categories

Resources