OLAP Number Formats with Office Web Components

OLAP Number Formats with Office Web Components

Post by Reinfried Englmai » Sat, 25 Jan 2003 19:39:18



The PivotTable control(ActiveX) does not use the
Formatted_Value cell property.
With  e.g. MyPT.ActiveView.UseProviderFormatting=true,
this will result in measures being displayed as left
justified text.

With method:

set cs = createobject("ADOMD.Cellset")
   set cs.ActiveConnection = pt.Connection
   cs.Open _
   "select " & _
   "AddCalculatedMembers(Measures.members) " & _
   "on columns " & _
   "from " & CubeName & " " & _
   "cell properties format_string "
   for i = 0 to cs.axes(0).Positions.Count - 1
      totalName = cs.axes(0).Positions(i).Members
(0).UniqueName
      MyPT.ActiveView.Totals(totalName).NumberFormat = _
          cs(i).Properties("FORMAT_STRING")
   next

only "Normal Measures" are formatted, Calculated members
are not formatted.

Question1: What's the correct Syntax for formatting
Calculated members?

Question2: With set cs = createobject("ADOMD.Cellset") an
ActiveX control is created.
What's the way to avoid the security warning for the
ActiveX control?

Many Thanks to all.

 
 
 

OLAP Number Formats with Office Web Components

Post by SQL Server Development Team [MSFT » Wed, 29 Jan 2003 03:46:10


Hi Reinfried,

The OWC Toolpack includes sample code that might help you at:
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample...
l=/msdn-files/027/001/681/msdncompositedoc.xml

The format of global calculated members is defined on the server by the dba.
The format of session calculated members is defined in the CREATE MEMBER ...
or WITH MEMBER statement with the FORMAT_STRING property.

There was a change how the format of a calculated measure is inferred in
sp3. It's much smarter now - before it took the format from the first
measure in the cube. Now it infers formatting from members used in the
calculation.

Hope this helps,
Richard

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.


Quote:> The PivotTable control(ActiveX) does not use the
> Formatted_Value cell property.
> With  e.g. MyPT.ActiveView.UseProviderFormatting=true,
> this will result in measures being displayed as left
> justified text.

> With method:

> set cs = createobject("ADOMD.Cellset")
>    set cs.ActiveConnection = pt.Connection
>    cs.Open _
>    "select " & _
>    "AddCalculatedMembers(Measures.members) " & _
>    "on columns " & _
>    "from " & CubeName & " " & _
>    "cell properties format_string "
>    for i = 0 to cs.axes(0).Positions.Count - 1
>       totalName = cs.axes(0).Positions(i).Members
> (0).UniqueName
>       MyPT.ActiveView.Totals(totalName).NumberFormat = _
>           cs(i).Properties("FORMAT_STRING")
>    next

> only "Normal Measures" are formatted, Calculated members
> are not formatted.

> Question1: What's the correct Syntax for formatting
> Calculated members?

> Question2: With set cs = createobject("ADOMD.Cellset") an
> ActiveX control is created.
> What's the way to avoid the security warning for the
> ActiveX control?

> Many Thanks to all.


 
 
 

1. Office web component printing problem / olap report tool

I created an interactive web page from an excel 2000 file which contains a
pivot chart and a pivot table.  Then I tried to print the web page.  The
problem
is that the pivot chart stretchs in y-axis and occupies more than half of
the paper.  The pivot table part is even worse.  The last column was cut
away.  I have set the paper margin to 0 but still the table is incomplete in
the paper.  Has anyone here encounter such problem before?  What shall I do
to the web page so that the
printout will be just like what it shows in the web page?  Thank you very
much.

By the way, please recommend some good OLAP report  tools if you know any.
Thanks.

2. Appending Data via TClientDataSet ...

3. Request help sorting with Office 2k Web Components PivotTable and OLAP Data Source

4. Insert Records ?

5. OLAP & Office 2000 Web Components - Error

6. Can I pass a Table Name as a stored proc paramater

7. Office 2000 Web Components - OLAP Cube

8. REPOST: Given the choice: hot or cold?

9. OWC (office web components) pivottable conected to analysis services fails

10. Office Web Components - Create a cube with distinct count

11. SQL Cubes vs. Office Web Components

12. DynamiCube or OWC (Office Web Components)

13. Office Web Component - Multiple Entries