Formatting CrossTab in SAP Analysis Office 1

发布时间:2016-07-14 11:29:22   来源:文档文库   
字号:

此问题

 

 

 

 

 

平均用户评级

(0 评级)

Is this a hierarchy?  Because the top of the hierarchy style can be changed with SAPHierarchy0 format - see below:

 

Not sure about the totals row though; I've done this before with Crystal Reports and formulas (works great) - but maybe you could play with the desired hierarchy levels to get the desired effect.

o

 

o

o

 

 

 

 

 

VBA - maybe, but I am not an expert

 

I hope  or others have some ideas...

 

The formatting you are asking works great in Crystal word/media/image9.gif

 

Hi Michael

 

I did something similar by help of a mixture of Analysis API and VBA

 

 

Public iFirstRow As Integer, iLastRow As Integer, iFirstColumn As Integer, iLastColumn As Integer

 

 

 

' defined in ThisWorkbook

Public Sub Workbook_SAP_Initialize()

 

 

' register callbacks

Call Application.Run("SAPExecuteCommand", "RegisterCallback", "AfterRedisplay", "Callback_AfterRedisplay")

 

 

 

Public iFirstRow As Integer, iLastRow As Integer, iFirstColumn As Integer, iLastColumn As Integer

 

' defined in a module

Public Sub Callback_AfterRedisplay()

 

'THis is a User Exit for Analysis Office

myDimension  ' get the dimensions of your crosstab

Undeline_Header ' Underline the first row

 

End Sub

 

 

 

Function myDimension()

'this allows to modify your crosstab by rows. columns and offsets

 

iFirstRow = Range("SAPCrosstab1").Row

iLastRow = Range("SAPCrosstab1").Rows.Count + iFirstRow

iFirstColumn = Range("SAPCrosstab1").Column

iLastColumn = Range("SAPCrosstab1").Columns.Count + iFirstRow

 

End Function

 

4 .

last not least the function or sub (if you like to use a button like "underline"

 

Function Undeline_Header()

' you my skip the selection ans just purely address the range

Range(Cells(iFirstRow + 1, iFirstColumn), Cells(iFirstRow + 1, iLastColumn)).Select

    With Selection.Borders(xlEdgeBottom)

        .LineStyle = xlContinuous

        .Color = -16777024

        .TintAndShade = 0

        .Weight = xlMedium

    End With

   

End Function

 

THe result will look like my last picture.

By changing the offsets of first or any other variable, you may insert formatting or whatever Excel has to offer word/media/image9.gif

 

 

Hope that may help you.

 

I did a lot of enhancements in BEx for the last 15 years by help of the (with 7x ) almost lost API

Many thanks to the Analysis Office developer crew taht you decided to have such a fantanstic API

 

JoergBoeke

o

 

o

o

 

本文来源:https://www.2haoxitong.net/k/doc/005f098ff5335a8103d2205c.html

《Formatting CrossTab in SAP Analysis Office 1.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式