I am using telerik reports. Some of my reports are large sized. When printing these reports not fit into default page size. I need to fit it into page by default. How can I implement this? Pls reply
Each report has a defined size in its definition which you can change and the same goes for page margins. You should also have in mind that each printer has hardware margins which is not possible to override. With that taken into account, you should be able to set an appropriate size that prints correctly. If still in dilema, elaborate on the report size, its pagesettings and the printer and paper format you're trying to print to.
Related
I am trying to print the images from the ioComp iPlotX object to a PDF printer. This object has iPlotX.SaveToBitmap, which does work and I can 'send' the file to the PDF printer, but the image is blurry, the bitmap is 96 DPI.
The control has iPlotX.PrintChart method which is supposed to go directly to a printer. There is also a method to indicate which Windows printer to direct the output to. I fumbled around to see if I could get anything to work and a couple times I produced an image in the PDF file that was very clear. But other items printed to the page were gone and I only had one page instead of 3 pages. Most of the times nothing is in the PDF file.
A snippet of my relevant code is below.
Me.SinglePlotObject1(iIndex).PlotControl.PrintShowDialog = False
Me.SinglePlotObject1(iIndex).PlotControl.Printername = modNovaPDFConstants.NOVAPDF_PRINTER_NAME
Me.SinglePlotObject1(iIndex).PlotControl.PrintOrientation = poLandscape
Me.SinglePlotObject1(iIndex).PlotControl.PrintChart
This note is from the ioComp.Help:
Note : If you have set PrintShowDialog to TRUE and have set
PrinterName to a non-empty string, then the printer selected by the
user will be ignored! The PrinterName property will always override
the user printer selection, if you are using our printer dialog If
you plan on showing our built-in printer selection dialog to your end
user, then you should set the PrinterName property to an empty string
for everything to work correctly.
Also from their help is :
property PrintXStart : Double Used to specify the starting x-axis Min
value when implementing multi-page printing.
Description: Use PrintXStart to get or set the starting x-axis Min
value when implementing multi-page printing. By default, the
PrintXStart and PrintXStop are initialized to the Min and Max of the
x-axis display on the screen and will only print out one page. You
must manipulate the PrintXStart and PrintXStop in the OnBeforePrint or
OnBeforePrintPage event to have multiple pages print out during a
single print session.
The only example they show is setting the XStart property to 0. I am not sure if this means multiple pages for the same graph, that is, the graph is stretched out over multiple page or is this has something to with different iPlots on separate pages. In the past we have always just used the iPlotX.SaveToBitmap to print. At that time the plots and text were good enough.
If anyone has any experience with ioComp plot controls and printing, I am willing to try any suggestions.
Right now I am trying to create a test application with as little code as possible to test all of their other printer options.
I have tried their FAQ section but could not find anything related to printing using VB6 and the ActiveX controls. When I sent a message to them, a smtp error appeared.
DaveInCaz: Good Idea. I tried a different PDF printer and results are the same. I tried a method of the control called iPrintToDC, passing in the Printer.hDC. This made some progress. I can print two graphs on two pages, but the graphs are about the size of my thumb. If I change width's or height's, it only makes things worse, by somehow placing the bottom of the graph 'above' the title and removing all the contents of the graph itself; it is as if the graph is wrapped around a cylinder and all I see is where the top and bottom meet. When I used the .PrintChart method, only the last of two charts would be printed and nothing else I printed would appear.
Thanks.
My crosstab looks fine in the web viewer but when I export to PDF it's clipping it like showin in the image. It's also making the columns much wider than they need to be. (The web version isn't doing that.)
Does anyone know how to fix it? I tried searching for an answer and didn't see anything.
Without seeing the parameters you're passing to your RenderTask it is hard to tell exactly, so I'm going to guess that you have PAGE_OVERFLOW set to CLIP_CONTENT rather than FIT_TO_PAGE_SIZE.
A note of caution though. This discussion on the Eclipse forum mentions that page-break interval settings might override the page size render options. Note that the OP on the linked discussion was having a problem with the PDF exported from the HTML viewer.
EDIT: according to the docs inside genReport.sh you are able to pass parameters on the command line (-p pageOverflow=FIT_TO_PAGE_SIZE) or you can create a parameter file (-F params.txt)
It is unclear to me whether you can pass the constant (FIT_TO_PAGE_SIZE) or must pass its expected value (2), so you might have to try both.
I think you have restricted the width/height of your report
goto Master Page then click on the general settings and there you find the type drop-down choose Custom.
Through this custom options you can give your own height/width of your report and too in the report layout.By doing this you can expand your report width
NOTE: The master page width should equal to the width of your layout.
I have a SSRS RDL that is formated to fit on a three column lable sheet. When exported to PDF the 2nd column is not populated and on the next page the 2nd column is the only column populated. This continues to happen for as much data as I have. Has anyone had any problems with this or might have an idea on where the problem might be?
These kinds of quirks are usually related to the margins. Make sure that the actual label area does not exceed the page size, accounting for the margins. Also, printer drivers can cause a similar issue because of content-to-page-size issues, where the report shows correct on-screen but when printing, shifts content to a new page.
This is because of page setup properties. For example if a page is set to letter size(8.5in X 11in) and left and right margins to 1 inch. then you have adjust you report body size to 6.5 inch or below, if it exceeds above 6.5 inch, then leads to split data to other pages when exported to PDF.
I am having a problem when my program is installed to another computer, where its printer preference is different, where my data report accepts Letter size 8.2 * 11 in, because when the printer preference is different the data report well not show and gives an error saying the page width is larger than paper width, does anyone know how to fix this problem.
i tried this code but it didn't work
Printer.PaperSize = vbPRPSLetter
Check out the Microsoft KnowledgeBase article FIX: Error Message "Report Width Is Larger Than the Paper Width" When Showing Data Report in Landscape
When using the Show method of Data
Report to preview the report, the page
orientation defaults to the default
printer settings on the local
computer. Therefore, if the
orientation of the default printer
settings is set to Portrait of
standard Letter paper and your report
width is more than 8.5 inches wide,
the following error occurs: Report
Width is Larger than the Paper Width.
The solution appears to be setting Orientation before using the Data Report. Change DataReport1 to the name of your data report.
DataReport1.Orientation = rptOrientLandscape
DataReport1.Show
EDIT Another suggestion: Microsoft offer a free DLL that allows you to change the default settings for the printer. You could try using that free DLL in your project, then do something like this code below before using the data report. Microsoft say "this DLL is particularly useful when dealing with the Data Report, which reads the default printer orientation prior to displaying or printing a report."
Set obj = New PrinterControl
obj.ChngOrientationLandscape
-Can you just switch to a custom paper size?
Printer.PaperSize = 256
Printer.Width = 11808 '(8.2 * 1440)
Printer.Height = 15840 '(11 * 1440)
-Are you sure the error isn't related
to the maximum print width of the
report itself? Many printers have a max print width
that forces 1/4" margins on either
side of a paper. Which in your case forces your printable area to be 7.7" max. Quickest way to
check would be to temporarily set
the print wide to a lower value and
see if it works.
-Another possibility could be permissions to the printer. If it's a shared network resource it may be locked down and be rejecting the changes to the paper settings and throwing an inaccurate error msg.
To change Printer orientation at runtime, we need to install VB6 Service pack 6
Use this code
DataReport1.Orientation = rptOrientLandscape
DataReport1.Show
This will work fine
I have a SSRS 2005 report form that is printing to a Zebra ZDesigner TLP 2844-Z label printer. The Interactive and Page sizes are set to 4" wide by 3" high. Since there is no paper orientation in SSRS, it is assuming this to be a landscape report when it should be a portrait thereby printing the labels sideways.
The users are able to export to a PDF and print after adjusting the print settings, but the extra clicks to produce/print the pdf's are unacceptable.
Is there a way to force the print job to print portrait or another workaround/trick to do this?
Can you just set your Page width to be 3" and your height to 4" ? (Not your Interactive Size, your Page Size)
How are you designing the report? There should be a property to modify for paper orientation in the report's properties...
From MSDN
So what defines a portrait vs. landscape report? If the PageHeight is less than the PageWidth, then it is landscape, otherwise it is portrait. It is important to understand that Reporting Services has no notion of the rotation of the paper in the printer. It is up to the applications that consume the output (Acrobat reader, print control) to determine the correct printer settings to best render the specified page size.
Note that the DeviceInfo settings can be used at report rendering time to override the page sizes in the definition. This is how the client print control works when you change margins or page size. In SP2 and SQL 2005 Reporting Services, the default page sizes are extracted from the definition at publish time and written to the ReportServer database as custom properties on the report. While you can programmatically change these via the SetProperties method on the web service, they will be overwritten if the report is republished (unlike parameter and datasource information).
I have a similar printer with a similar problem. Change the report orientation to portrait (the numbers will be backward). Then when you run the report click page setup. Change the size from "USER" to either "custom" or "template" (depending upon your printer). You should then be able to use your printer properties to change the size of the labels.
To prevent the SSRS WinForms ReportViewer from rotating your printed labels, use a square page. If the length and width are the same, ReportViewer will not rotate. I found that when I expanded the page size for my 2.5" x 1" label to 2.5" x 2.5", the print was oriented correctly on the stock and there was no waste. Perhaps Zebra's driver clips the blank area.
I also tried designing a rotated label using Text Box's WritingMode = Rotate270. That didn't help.