on ‎2010 Feb 25 1:33 PM
Hi there,
am bit with a problem, can anybody can tell me how to set the pagesize dynamically to a crystal report,
rpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape;
rpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA3;
have written this code but it gives me error as, am i missing anything or some trick is there
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))Source CrystalDecisions.ReportAppServer.Controllers Target Site Void ModifyPrintOptions(CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions) Stack Trace at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrintOptions(PrintOptions newVal) at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PaperSize(PaperSize value) at App_UI_CrystalReports_frmSectionWiseResults.btnViewReport_Click(Object sender, EventArgs e) in d:\Projects\SMShetty\App_UI\CrystalReports\frmSectionWiseResults.aspx.cs:line 317
Request clarification before answering.
What version of .NET?
What version of Crystal Reports?
What Service Packs for CR have been applied?
Win or web app?
Can you change the orientation in the CR designer?
What OS?
Is this on the dev computer or after you deploy the app?
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) Visual Studio Team System 2008
2) Crystal reports 10.5 that comes with VS-2008
3) am having crystal reports basic service pack 1 but its not getting installed
4) Web application
5) Yeah no problems in designer but i need through code behind
6) Windows XP professional with service pack 3
7) on Dev computer
Sorry, but I have to be clear about the details as I can not reproduce the issue here.
You downloaded Microsoft Visual Studio 2008 Service Pack 1 from here;
The you downloaded SP 1 for CR 10.5 from here;
https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
And SP 1 for CR 10.5 is not installing(?).
Can you tell me the version of the CR assembly crystaldecisions.crystalreports.engin.dll referenced in your project?
Ludek
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Enterprise
Microsoft Visual Studio Team System 2008 Development Edition 91904-270-3014571-60906
Microsoft Visual Studio Team System 2008 Development Edition
Microsoft Visual Web Developer 2008 91904-270-3014571-60906
Microsoft Visual Web Developer 2008
Crystal Reports keycode xxx
Crystal Reports Basic for Visual Studio 2008
-
This is the version details which am having currently installed in my system Ludek
Edited by: Ludek Uher on Mar 4, 2010 11:40 AM
Can you tell me the version of the CR assembly crystaldecisions.crystalreports.engin.dll referenced in your project?
Go to the properties of your project, find crystaldecisions.crystalreports.engine.dll and tell me the version of this file as referenced in your project. BTW, you do not want to be posting keycodes externally (I'll remove that from the previous post).
Ludek
Strange. No idea why the update does not work. Let's put that aside for now and go back to your code;
rpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA3;
What happens if - as a test, you just use ;
rpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape;
Ludek
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.