dbTalk Databases Forums  

Number Alignment in OWC Pivot

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Number Alignment in OWC Pivot in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Have Mercy
 
Posts: n/a

Default Number Alignment in OWC Pivot - 09-12-2005 , 04:09 PM






I am using an Office Web Component Pivot Table to present an OLAP report to
users. I have set the numeric formatting in the Analysis Services cube
definition and wish to pull these formatting specs into the PT using the line:

MyPT.ActiveView.UseProviderFormatting=true

The trouble is that OWC is LEFT aligning all of my numeric data by default,
even though it is keeping all of the formatting specs. If I set the above to
false (or comment it out), then numeric data becomes right justified, but
naturally I lose the other formatting specifications.

There does not appear to be any way to specify right justification in the
cube specs or in the OWC parameters in XML.

Does anyone know how I can force right justification in the OWC report and
still pull through the formatting specs from my cube definition.
--
Thanks, Ken

Reply With Quote
  #2  
Old   
pras
 
Posts: n/a

Default Re: Number Alignment in OWC Pivot - 09-13-2005 , 05:28 AM






use this Script it help you to right align the data in the pivotable
view

<script language="VBScript">
sub cellformat()
dim ttl
dim objView
set objView = pt.ActiveView
set c = pt.Constants
for Each ttl In objView.DataAxis.Totals
ttl.HAlignment = c.plHAlignRight
Next

end sub

</script>

Please Let me know if it helped you

Regards,
Prasanna


Reply With Quote
  #3  
Old   
Have Mercy
 
Posts: n/a

Default Re: Number Alignment in OWC Pivot - 09-13-2005 , 08:40 AM



Pras,

Thanks very much, this snippet works great. Exactly what I needed.
--
Thanks, Ken


"pras" wrote:

Quote:
use this Script it help you to right align the data in the pivotable
view

script language="VBScript"
sub cellformat()
dim ttl
dim objView
set objView = pt.ActiveView
set c = pt.Constants
for Each ttl In objView.DataAxis.Totals
ttl.HAlignment = c.plHAlignRight
Next

end sub

/script

Please Let me know if it helped you

Regards,
Prasanna



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.