cancel
Showing results for 
Search instead for 
Did you mean: 

Property read-only?

Former Member
0 Kudos
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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

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]

Former Member
0 Kudos

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

former_member183750
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Thx.