27 messaggi dal 22 novembre 2004

Salve, non riesco ad impostare il mio report in formato Landscape sulla stampante, con Crystal Report.
Mi spiego, quando eseguo la stampa il formato di default, prende il soppravvento su quello che imposto io da codice...

'LANDSCAPE
rpt.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.Landscape     
RPT_EXTRA_REPORT.ReportSource = rpt  


Dove sbaglio??????

Grazie per eventuali aiuti a riguardo.

Lanfra
Modificato da lanfra il 27 aprile 2009 17.26 -
27 messaggi dal 22 novembre 2004
Riporto la risposta della Buisness Object, che risolve il problema conosciuto della stampa in landscape.


A report in a Crystal Reports for Visual Studio .NET 2005 web application using the ActiveX print control is set to print with landscape orientation. However, when it is printed, the output is in portrait orientation. This can result in data to be deleted from the right side of the report.


Cause

This behavior is due to the paperorientation property incorrectly referenced as pageorientation in the Crystalprinthost.html file on the web server.


Resolution

To resolve this issue, edit the Crystalprinthost.html file in the following locations:

* <installation directory>:\Inetpub\wwwroot\aspnet_client\2_0_50727\CrystalReportWebFormViewer3\crystalprinthost.html
* <installation directory>:\Windows\Microsoft.NET\v2.0.50727\ASP.NETClientFiles\CrystalReportWebFormViewer3\crystalprinthost.html

Edit the incorrect block of code below to match the correct block.

Incorrect

if (window.dialogArguments.pageorientation) { objectTag +="<PARAM NAME=\"PageOrientation\" VALUE=\""; objectTag += window.dialogArguments.pageorientation; objectTag += "\">"; }

Correct

if (window.dialogArguments.paperorientation) { objectTag +="<PARAM NAME=\"PageOrientation\" VALUE=\""; objectTag += window.dialogArguments.paperorientation; objectTag += "\">"; }

The report will now print properly in landscape orientation.

TIP


If the code sample is truncated in your browser window, copy and paste the entire block of code into a text editor. Code samples are intentionally formatted this way so they do not wrap. Wrapped code can produce unexpected errors in your application.

NOTE


The PageOrientation in the PARAM tag is not a typo. This value is used by the ActiveX control and can't be changed at this time.


Keywords

DOTNET NET .NET PORTRAIT LANDSCAPE PRINT PRINTING ACTIVEX WEB 2005 PRINTCONTROL , 2716447



saluti

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.