Pivot Table - DataAxis Totals Width

J

Joel Barish

Please help!
I have spent the last day and a half reading MS's Web Site, Googling
for Code, and reading the TookPack Code Examples and I still can't
figure this out. Please help!

I have a simple Pivot Table with 3 measures as my DataAxis Totals:

With ptable.ActiveView
With .RowAxis
.InsertFieldset view.Fieldsets("Customers")
End With 'Row Axis

With .DataAxis
.InsertTotal view.Totals("Qty")
.InsertTotal view.Totals("Gross Margin")
.InsertTotal view.Totals("Income Before Interest and Taxes")
End With ' Data Axis
End With 'view

The Pivot Table AutoFits to the text length of Qty, Gross Margin, etc.
The result is 3 columns of very different widths. I need to assign the
column widths specifically.

ptable.ActiveView.DataAxis.Totals("Gross Margin").Width = 100

This doesn't work. I have tried about a dozen other variants and no
luck. Hair loss is imminent.

The ability to wordwrap the TotalsCaptions would be a nice bonus too,
but it is crucial that I resize these columns.

Thanks in advance!
Joel
 
J

Joel Barish

Is this just not possible? I have spent days hunched over the object
model, properties and methods and can't get this to work.

I notice that this question has been posted on this discussion board
dozens of times and never never answered. Is that because changing the
column width isn't possible or because the technique is so difficult
that no one has the energy to write the solution. It seems that
changing column width should be straightforward. (but since I've been
trying for days, I know it is not)

If the answer can't be found here, does anyone have any idea of how you
can submit a case to Microsoft help and pay a developer there for an
answer? Any help appreciated. Very desperate at this point.
 
A

Alvin Bruney

Word wrap is not supported. There is no workaround for this. Column width is
set according to the data contained in the cells. The minimum cell width is
set according to the maximum amount of characters in the cell with the most
characters. I hope this helps.

You have 3 free technical support incidents that you can use to have
questions answered. After that, it costs about 100 dollars. You may submit
an incident using MS support page.
column width isn't possible or because the technique is so difficult
that no one has the energy to write the solution.
Possibly. More likely, it probably isn't interesting enough to capture
interest.
For me, if the question captures my interest and I have the time, I usually
answer otherwise I pass. If its a nagging issue and there are no answers and
i'm motivated, I take a look. If I'm not motivated or simply not interested
in the particular topic, I pass. Someone else usually has a better answer.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
 
J

Joel Barish

Hi Alvin -

Thank you for your response. Now I know not to spend any more time
trying to adjust column widths. You saved me! Thanks again.

joel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top