Crystal report 2008 User Defined Page Layout - crystal-reports

I want to set the Report Layout on client side So User can set report's layout Which may be Portrait OR Landscape after report shown. So user will have the option if data comes on half page then he can use landscape to print Report Otherwise Portrait.

If you're wanting to design two different report layouts in one RPT file and pick one at runtime, that's not really possible. If you're just wanting to know how to set the orientation, here are the properties for doing that:
cryRpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape
cryRpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
cryRpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.DefaultPaperOrientation

Related

Crystal reports - different layout/design on each page

I have a report which contains multiple pages. Is there any possibility to use a design for the first page and on the other pages to have a different one? If so, how can I achieve this? Thanks
It's possible to combine landscape and portrait subreports, you need a new section for ever subreport.
Right click on one of the section and select "Section expert", from here you can add new sections by clicking on an existing section (header, details, footer) and the Add button on the "Paging" tab on the right you can decide the orientation of you section (Default (portrait), landscape and portrait).
Now create your subreport and put it in the new section.
For a portrait subreport just follow the default creation procedure.
For a landscape subreport create a landscape oriented section and in the subreport set landscape orientation in each section of the subreport.
Page Header and Page Footer won't allow you to change the orientation, so in your landscape subreport suppress those section without drill down (right click on the section to find this option) or Crystal Report will act weird and create a new page for every section with different orientation and suppressing them will prevent this situation.

Mix Portrait and Landscape in Crystal Report

I am preparing a report and currently I have a portrait and landscape subreports, I want to mix them in one report.?
It's possible to combine landscape and portrait subreports, you need a new section for ever subreport.
Right click on one of the section and select "Section expert", from here you can add new sections by clicking on an existing section (header, details, footer) and the Add button on the "Paging" tab on the right you can decide the orientation of you section (Default (portrait), landscape and portrait).
Now create your subreport and put it in the new section.
For a portrait subreport just follow the default creation procedure.
For a landscape subreport create a landscape oriented section and in the subreport set landscape orientation in each section of the subreport.
Page Header and Page Footer won't allow you to change the orientation, so in your landscape subreport suppress those section without drill down (right click on the section to find this option) or Crystal Report will act weird and create a new page for every section with different orientation and suppressing them will prevent this situation.
At the end you will have a situation like this
If a main report is set to portrait orientation and the subreport is set to landscape, the subreport will print landscape, on a portrait oriented page, thus resulting in data being cut off. In the reverse scenario, main report is landscape, subreport portrait, the subreport will print portrait on a landscape oriented paper and as above, data will be cut off.
I am using Crystal Reports 10. It doesn't has "Paging" tab in Section Expert. I believe mix page orientation is not possible in this version.

Crystal Report: Centering reports within report viewer control

Looking for a way to center a report within the .NET Crystal Reports viewer control when the containing form is maximized.
I thought it centers the report by default? I put the crv onto a form and set the dock to fill. In fact, I don't know how to get it to not center the report.
On the DOCK property of the viewer control, set it to FILL.
Set the ReportViewer control DOCK property to FILL and set the Maximized property of the form programmatically after calling the Show method. If it is set in the design time it's not working. See below my sample code.
Me.rptViewer.Zoom(100)
Me.rptViewer.Show()
Me.Show()
Me.WindowState = FormWindowState.Maximized

Printed Report is not recognizing margins

I have an application developed in vb using .net framework. We are using Crystal Reports XI runtime to run reports from this application. When I view the reports in Crystal, they are properly centered on the page, however, when we view the report on screen it all looks correct, however, when we send it to the printer, the report is high on the page and to the left margin. Can anyone give me a work around for this? We generally print the reports to screen first and then to Adobe PDF.
Thanks for your assistance.
Go to File/Page Setup and make sure your margins are set up correctly. This also could be a printer driver issue.

Horizontal page in Crystal Reports

How can I design my report to use it horizontally ? I really need more fields so vertically won't show everything.
Thanks.
edited:
I need the page to be landscape instead of portrait.
Sorry, my version is 8.0.
You should be able to change the orientation under the printer settings for Crystal from File > Print...
As long as your printer supports landscape printing, the report will reflect the change (check printer drivers if it doesn't allow landscape but you think it should).
Depends on if you are trying to do this at design time or run-time, and it depends on the version of Crystal Reports you are using. Usually you go to File -> Page Setup to change the paper orientation and size.
Edit - the runtime environment for that version of Crystal doesn't support changing the paper orientation at program execution through the CrystalReport object, just when you are designing the report. You would have to change the orientation using the printer options when selecting the printer to print to.
If you right click on your report,go to design-> page setup, there will be an orientation tab to select landscape or portrait.