We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

what's wrong?

Thread ID:

Created:

Updated:

Platform:

Replies:

116284 May 9,2014 08:37 AM May 13,2014 08:39 AM ASP.NET MVC 3
loading
Tags: PivotGauge
Massimo
Asked On May 9, 2014 08:37 AM

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



Tamilarasu M [Syncfusion]
Replied On May 10, 2014 02:36 AM

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


Massimo
Replied On May 12, 2014 02:50 AM

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/Range\n\nSCRIPT1003: Previsto ':'"

Do you have any suggestions?



Tamilarasu M [Syncfusion]
Replied On May 13, 2014 08:39 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;