--- In NADUG@yahoogroups.com, "Zabi" <zsalauddin@...> wrote:
>
> Hi,
>
> I am new to Dimensions. I am using mrStudio/TOM for tabulation
> requirement. I need to report the results in custom chart types, when
> i do that it displays an error message:
> Export error(): Unable to get the MajorUnit Property of the Axis
> Class: Exception Occured.
>
> This error displays only when you access custom chart types created in
> excel.
>
> Please help!
>
> Thanks,
> Zabb
>
Hi Zabb,
Without seeing your script, the C:\Documents and
Settings\username\Application Data\Microsoft\Excel\Xlusrgal.xls file
and knowing what version of Excel you are using, it would be hard to
troubleshoot this.
That being said, can you copy the following code into a mrs script:-
Dim TableDoc,Table
Set TableDoc = Createobject("TOM.Document")
With TableDoc
.DataSet.Load("C:\Program Files\SPSS
Dimensions\DDL\Data\Quanvert\Museum\qvinfo", "mrQvDsc")
With .Tables
set Table= .AddNew("Table" + CText
(TableDoc.Tables.Count), "gender*age")
SetProperty(Table.Properties, "ChartType", "SPSS Demo
Bar")
End With
.Populate()
With .Exports.mrHtmlExport
.Properties["OverwriteOutput"] = True
.Properties["LaunchApplication"] = True
.Export()
End With
End With
Sub SetProperty(Properties, Name, Value)
Dim Property
Set Property = Properties.FindItem(Name)
If IsNullObject(Property) Then
Set Property = Properties.CreateProperty()
Property.Name = Name
Property.Value = Value
Properties.Add(Property)
Else
Property.Value = Value
End If
End Sub
I will email the SPSS Demo Bar custom chart I have and if you can copy
this into your C:\Documents and Settings\username\Application
Data\Microsoft\Excel\Xlusrgal.xls file and, assuming you have the DDL
installed locally, can you run this script and let me know if this
works.
This script does work for me, I am using 5.5 Patch 1 and Excel 2003 SP3.
If this does work for you, switch the custom chart name and see if that
works. If it doesn't then, there must be something wrong with the
custom chart you created. Did you create this from an original export ?
If not follow the DDL link: DDL.chm::/charts_custom.htm to do this (To
use this DDL link, just right click on DDL title bar and paste the URL
into the "Jump to URL".
If this does work (my script with your custom chart), if may be
something to do with your script.
Kind regards
Rich Wilson