cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a column's width and padding in code

Former Member
0 Kudos

Sirs:

I have a report which has three columns, I'm trying to set some of the report properties in code.

So far, I've been able to set the report margins and the detail section height:


'set the report margins
crDoc.PrintOptions.ApplyPageMargins(New CrystalDecisions.Shared.PageMargins(decReportMarginL, decReportMarginT, decReportMarginR, decReportMarginB))

'set the height of the detail section
Dim section As CrystalDecisions.CrystalReports.Engine.Section = crDoc.ReportDefinition.Sections("Section3")
section.Height = decLabelHeight

But I'm still not able to set the column width or the padding between the columns. Can anyone suggest a way?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

You will have to use InProc RAS to do this. Whether you have InProc RAS availbale to you depends on the version of CR(?)...

- Ludek

Former Member
0 Kudos

I'm coding this inside Visual Studio 2010 with the 'CR for VS' product.

If I instantiate the report object, I see the 'rasObject' in the object tree, but I can't figure out how to reference it in code.

former_member183750
Active Contributor
0 Kudos

See the following resources re. InProc RAS:

[How to Use The RAS SDK .NET With In-Process RAS Server|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32]

Samples:

http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375 [original link is broken]

http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples

[Report Application Server .NET API Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_api_en.zip]

[Report Application Server .NET SDK Developer Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_dg_en.zip]

- Ludek

Former Member
0 Kudos

Wow. I don't guess I could want a more complete answer. Thanks.

Answers (0)