How to get rid of the vertical line in SAP Crystal report - crystal-reports

​I am not sure how to get rid of this vertical line? is it in the margin?
and when I click the Design Tab, the page is not in full screen

The line indicates a page break when printing. Your report is designed to print on paper that is either A2 or ANSI C in size, likely with landscape orientation.
First you need to determine what size paper this report is intended to use when printing. Then go to File > Page Setup in your Crystal Report designer and configure the Printer Options and Page Options. Printer Options should either be set to No Printer, or the printer that can print the paper size you plan to use. Page Options will define the paper size, orientation and margins.
If you plan to use a paper size that is smaller than 22 inches in width, you will need to reduce the size of the objects in your report to fit the size of the paper or allow it to span multiple pages.

Related

Coordinate system in Crystal Reports

I'm working with CR version 13.0.25 - I believe the actual latest version as of this date is 13.0.26, so, basically the latest version of CR. What I am working with is re-positioning elements on the report dynamically from the C# code.
There are a couple of the reports where the original rpt (designed a number of years ago) spans multiple pages. These in particular are giving me issues, but they are not the only ones. The issue here focuses on the y (vertical) dimension.
CR documents use a coordinate system that is based in the upper left corner of the document, and is also based on twips (1440 twips/in). So, in theory, I should be able to set the Top value for a ReportObject to 1440 and that element should be printed 1" from some benchmark (either top of the page or bottom of the margin - I'm fairly sure it's bottom of the margin).
My results do not seem to reflect this - at least not exactly.
When I set the Top value, it appears that with some of the documents, the y dimension is scaled. In fact, I can apply a constant scaling factor (it varies according to the document) and I can make the fields appear with a relative 1" spacing all of the way to the bottom of the page. However, that scaling factor varies from document to document.
So, besides experimenting in our production code, I have also done the following:
I created a C# console app that opens an rpt file, grabs some of the elements on it, and re-positions them, then sends it to the printer. I designed a new rpt file with headers and footers sized as small as I could get them, and put 10 text fields in the details section. I iterate through the fields (via ReportDocument and ReportObjects and re-position them at 0, 1440 (1"), 2880 (2") etc.
This works perfectly with a document that has the default margins (.167 inches by default on each side). The first element has its top butted against the bottom of the margin, the second element is 1" from the top of the first element to the top of the second element, and so on down the page. If, however, I reduce the margins to zero - either programmatically or in the design, I get this scaling effect. The elements are all now about 7/8" or so apart, instead of the 1" that I would expect.
Does anyone know of any magic formula(s) or documentation on why the coordinate system appears to be changing? I could understand that if I change the margin that could offset everything on the page (assuming that the margin is our baseline) but it would seem to me that the inter-element spacing, being 1440 should still render at 1".
I believe Y is the vertical distance from the top of that section, not from the top of the page.

How to set max height of a picture in crystal report?

Is it possible to set maximal height of a picture in crystal report and preserve original ratio of a picture?
If can grow is disabled, every picture is streched or shrinked to default picture object size, if is enabled, I'm losing limits of picture size.
I'm using crystal reports for VS 2013 (13.0.5)
Actually I solved this problem for Visual Basic 5.0 and Crystal Reports 6.0 (Seagate version). You asked the newer version but maybe this gives you an idea to solve the problem or it may help some other guys searching an answer for their problems.
Before you assign the report source you can change the height of the picture:
Set crxFieldObject = Report.Sections.Item("D").ReportObjects.Item(269)
crxFieldObject.Height = theNewHeight
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
PS: After you assign the report source you can not change the height property. Below code does NOT work:
Private Sub Section3_Format(ByVal pFormattingInfo As Object)
Picture1.Height = theNewHeight 'this code does NOT work
End Sub
In this code:
.Sections.Item("D")means the Detail Section of the report and
.Item(269) means the Picture Object. After you insert an OLE Object you can check the item number with a small code such as:
aa = Report.Sections.Item("D").ReportObjects.Count
For i = 1 To aa
Set crxFieldObject = Report.Sections.Item("D").ReportObjects.Item(i)
bb = crxFieldObject.Name
If Mid(bb, 1, 7) = "Picture" Then
crxFieldObject.suppress = False 'You can put a BreakPoint here to check the value of i
End If
Next i
Hope it helps
The answer is No. I did many tests and researches and I didn't found any way to control the height and, without controlling the height, it's not possible to fit an arbitrary image in the object box and keep is ratio at the same time.
Looks like it's and old problem.
But if all your images are limited to the same dimensions, like you have set your limits to 500x500, so you can have, for example, images that do 500x200, 500x500, 250x500, etc., there's a way to do it.
The object box needs to have the same ratio as your limits. In my example, 500x500, the ratio is 1:1 (square) so your object box needs to be square also. You need to check Can grow and, in the Image tab, set the size exactly like the object box's size. You also have to set the bitmap image size (right-click on the box, choose Bitmap Image Object then Modify) to the image limits (500x500).
Perhaps too late, but when you right click on picture -> shaping of the object
You've a checkbox "modular size", uncheck it and put manually the size you want on Image tab.

how to fit content of reports so that we can print it on A4 size

I have created a report in ssrs 2008 r2.It is larger then the normal A4 size .So when i export the report in word i see it clearly but when i see print preview of the report in to the word its contents get cut from the right end.I think it is due to report size. Is there any way so that we can fit the content at the time of export in to the ms word so that user can clearly take a print out in A4 size.
The only way to do this is to physically decrease the size of your report when building it as there is no auto size capability in report builder.
Right click and properties on the grey back ground. Then change the size and orientation as required.
Then click on the white body and ensure the properties bar is open. Expand the size properties option and set the size of your report to reflect the previous selection.
Also don't forget to set the margins as this will effect the amount of printable space on your report.
Lastly ensure you alter the size of you fonts and report parts to fit on the size required.
I'd love to see an automatic sizing feature in the report builder for exporting.
This is because your report content size is greater than the report size.
Report size for an A4 page is 8.5*11 inch,if your content is greater than the report size then it will move the columns to the next .
Adjust the Size of each Tablix which should be less than your report size.
Select Tablix to view properties.
expand the size option and adjust width and height accordingly.
Thanks
Just increase height and width of paper size in Report builder properties. Doesn't have any sense but it works for me.
In Report Builder in the Report Properties change the width of the report so that it exceeds the width of your data. Exporting to both Word and PDF will mean that it fits the page width. You can also adjust the height so that the report fills your desired paper size.

Set the default settings og paper size in crystal reports

How can I set the paper size of legal as default. i.e Whenever user prints the report, it will be print in legal size paper by default.
You can set printer properties( default margin and paper size) through the control panel. You can only set 1 paper size at a time like A4,Legal etc…
You can specify the paper type for a report in crystal report itself. From the File menu take Page Setup and you can specify the paper size there. This will affect only the current report.
Also there are methods available to set paper size at the run time also
For that please refer the link below
Setting PageSize for Crystal Report

JasperServer - how to stop horizontal line in report from stretching across screen

I created this report in iReport Professional 4.5.1 and deployed it to JasperReports Server today. The total page width is 792 pixels. In my report I have some horizontal lines that are 752 pixels wide. When I run the report in JR Server the horizontal lines stretch all the way over to the right side of my monitor. This happens when I schedule the report and ask JR Server to save it as an HTML file, but when I schedule the report and save the output as a PDF the lines are the correct size.
How can I keep the horizontal lines from stretching? The stretch type for each line is set to "no stretch." My other report elements are managing to hold their position.
Thanks,
Lisa
Try using cell borders to draw those lines instead of a static "horizontal lines."
Thanks, Sam! Your answer helped me solve this. My report is a 6-column report and I have labels that I only print in the first column. Cell borders wouldn't work because there would be lots of gaps. However, I realized that my horizontal line did not need to be 752px wide; it only needs to be slightly wider than the width of the first column and the report will take care of copying it into the subsequent columns for me. I set the horizontal lines to 127px wide and now I have an unbroken horizontal line that runs through all of my columns. I can't believe that didn't occur to me when I was creating the report in iReport.