BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
I try to run your sample example with my cube. I want to visualize the budget value for year 2014 and I wrote this:
private OlapReport CreateOlapReport()
{
OlapReport report = new OlapReport();
report.CurrentCubeName = "MY_CUBE";
KpiElements kpiElement = new KpiElements();
kpiElement.Elements.Add(new KpiElement { Name = "WEIGHTKPI", ShowKPIGoal = true, ShowKPIStatus = true, ShowKPIValue = true, ShowKPITrend = true });
DimensionElement dimensionElement1 = new DimensionElement();
MeasureElements measureElement = new MeasureElements();
measureElement.Elements.Add(new MeasureElement { UniqueName = "[Measures].[FBC WEIGHT]" });
dimensionElement1.Name = "Date";
dimensionElement1.AddLevel("HIER_DATE", "Calendar Year Number");
dimensionElement1.Hierarchy.LevelElements["Calendar Year Number"].Add("2014");
dimensionElement1.Hierarchy.LevelElements["Calendar Year Number"].IncludeAvailableMembers = true;
report.CategoricalElements.Add(new Item { ElementValue = dimensionElement1 });
return report;
}
The OLAPGAUGE that I want to visualize it's very simple, all the value of FBC WEIGHT measure of year 2014.
Where is the error?
In your example, you declare the measureElements object but you don't add to the report, why?
Best regards,
Massimo
Hi Massimo,
The report you have framed adds only dimension elements to the
categories. Please add the KPI elements to series of the report so that data
can be visualized in the Olapgauge
Please find the modified Olapreport:
private OlapReport
CreateOlapReport()
{
OlapReport report =
new OlapReport();
report.CurrentCubeName
= "MY_CUBE";
KpiElements
kpiElement = new KpiElements();
kpiElement.Elements.Add(new
KpiElement { Name = "WEIGHTKPI", ShowKPIGoal = true, ShowKPIStatus =
true, ShowKPIValue = true, ShowKPITrend = true });
DimensionElement
dimensionElement1 = new DimensionElement();
MeasureElements
measureElement = new MeasureElements();
measureElement.Elements.Add(new
MeasureElement { UniqueName = "[Measures].[FBC WEIGHT]" });
dimensionElement1.Name
= "Date";
dimensionElement1.AddLevel("HIER_DATE",
"Calendar Year Number");
dimensionElement1.Hierarchy.LevelElements["Calendar
Year Number"].Add("2014");
dimensionElement1.Hierarchy.LevelElements["Calendar
Year Number"].IncludeAvailableMembers = true;
report.CategoricalElements.Add(new
Item { ElementValue = dimensionElement1 });
report.SeriesElements.Add(new Item { ElementValue = kpiElement });
report.SeriesElements.Add(new Item { ElementValue = measureElement
});
return report;
}
For further information on OlapReport, please
kindly refer our online UG documentation link:
OLAP report:http://help.syncfusion.com/ug/asp.net/olap%20common/documents/43olapreport.htm
Please let us know if you have any further concerns.
Thanks,
Tamilarasu.M
Hi,
Thanks for your reply. I try the code that you send me, but now I have an error in this script:
"
<script type='text/javascript'>$(function($){$("#PlatformChoose").ejDropDownList({boxmodel:true,selectedItem:0,width:"130px",targetId:"samples",change:"viewdemo"});$("#auto").ejAutocomplete({filter:"contains",width:"183px",template:"<a rel='nofollow' href= /${id} class='anchorclass'><div> ${text}</div></a>",watermark:"Search",select:"onSelectSearchItem"});$("#OlapGauge1").ejOlapGauge({showTooltip:true,url:"/wcf/OlapGaugeService.svc",customObject:{},clientSuccess:"loadOLAPGaugeTheme",backgroundColor:"transparent",scales:[{showScaleBar:true,showRanges:true,showIndicators:true,ticks:[{tickColor:"#8c8c8c",distanceFromScale:2,tickWidth:1},{tickColor:"#8c8c8c",distanceFromScale:2,tickHeight:6,tickWidth:1,tickStyle:"Minor"}],ranges:[{distanceFromScale:-5,borderColor:"#fc0606",backgroundColor:"#fc0606"},{distanceFromScale:-5}],labels:[{labelColor:"#8c8c8c"}],pointers:[{showBackNeedle:true,backNeedleLength:20,pointerLength:120},{backgroundColor:"#29A4D9",pointerPosition:"Center",pointerType:"Marker",markerStyle:"Diamond",distanceFromScale:5,pointerLength:25,pointerWidth:15}],customLabel:[{labelColor:"#666666",location:{x:180,y:290},font:{size:"10px",fontFamily:"Segoe UI",fontStyle:"Normal"}},{labelColor:"#666666",location:{x:180,y:320},font:{size:"10px",fontFamily:"Segoe UI",fontStyle:"Normal"}},{labelColor:"#666666",location:{x:180,y:150},font:{size:"12px",fontFamily:"Segoe UI",fontStyle:"Normal"}}],scaleBarSize:1,scaleRadius:150,pointerCapBorderWidth:3,scaleBorderWidth:0,5}]});$("#rangesize").ejSlider({startValue:2,endValue:12,sliderType:"minrange",height:"10",width:"110",value:"5",slide:"onchange",change:"onchange"});$("#distancefromscale").ejSlider({startValue:-20,endValue:0,sliderType:"minrange",height:"10",width:"110",value:"-5",slide:"onchange",change:"onchange"});$("#CodeViewTab").ejTab({disabledItems:[""]});});</script>
"
With this error code: "JavaScript critical error at line 306, column 1480 in http://localhost:55722/OlapGauge/RangeSCRIPT1003: Previsto ':'"
Do you have any suggestions?
HI Massimo,
We couldn’t able to reproduce the reported problem at our end. We would
appreciate if you could provide a sample/dummy cube along with an
appropriate replicating procedure to reproduce the reported problem to
proceed further to resolve them at the earliest.
Please let us know if you have any further concerns.
Thanks,
Tamilarasu.M