on 09-07-2011 7:20 AM
cr.PrintOptions.PageMargins.bottomMargin = 10
This doesn't work at all ... is the property read_only?
Or is there any other chance to change page adjustments at runtime via code?
Lots of info missing. Version of CR and .NET for starters. See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
Step 2 Asking Your Question; Provide Enough Information
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Ludek, it's VS2005 and CR2008 - still.
Maybe this is the solution?
Dim pm As New CrystalDecisions.Shared.PageMargins
pm.bottomMargin = 10
cr.PrintOptions.ApplyPageMargins(pm)
Is there any hint to useful and somewhat extended information about the CR Object Model?
I mean, trial and error costs a lot of time ...
Regards
Hans-Christian
See these samples, they will answer a lot of questions:
http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
Also, the SDK help files:
http://help.sap.com/businessobject/product_guides/cr2008V1/en/crsdk_net_dg_12_en.zip
http://help.sap.com/businessobject/product_guides/cr2008V1/en/rassdk_net_apiRef_12_en.zip
http://help.sap.com/businessobject/product_guides/cr2008V1/en/rassdk_net_omd_12.zip
http://help.sap.com/businessobject/product_guides/cr2008V1/en/rassdk_net_dg_12_en.zip
Don
Not sure how to define "extended information about the CR Object Model", but there is the following:
[CR 2008 developer library|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm]
[API reference|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm]
[Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
Samples:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
Re. margins, see the KB [1313082 - Printer Margin Settings set in the Crystal Reports Designer not respected in VS .NET application|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333333313333333033383332%7D.do].
A while back I did a fair bit od playing with this and the code as bellow worked fine:
ReportDocument myReport = new ReportDocument();
myReport.Load(....rpt");
PageMargins myMargin = new PageMargins();
myMargin = myReport.PrintOptions.PageMargins;
myMargin.topMargin = 240;
myMargin.bottomMargin = 240;
myMargin.rightMargin = 240;
myMargin.leftMargin = 240;
myReport.PrintOptions.ApplyPageMargins(myMargin);
- Ludek
Thx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.