Friday, October 17, 2008

flex's multiple module

flash player 9.XXXX.

private function currentMod(uri:String):void{
childMod.url = null;
childMod.url = uri;
childMod.addEventListener(ModuleEvent.ERROR,onLoadError);
}

when i load unload ..... and load unload on multiple module I found this Error

TypeError: Error #1034: Type Coercion failed: cannot convert mx.graphics::Stroke@4b336d1 to mx.graphics.IStroke.
at mx.charts::AxisRenderer/measure()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1091]
at mx.core::UIComponent/measureSizes()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5819]
at mx.core::UIComponent/validateSize()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5765]
at mx.managers::LayoutManager/validateSize()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:559]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:648]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]

with this code I'm found problem
<mx:ModuleLoader id="childMod"></mx:ModuleLoader>

after that , i try this code
<mx:ModuleLoader id="childMod" applicationDomain="{ApplicationDomain.currentDomain}" ></mx:ModuleLoader>


and i can fix that problem Hulaaaaaaaa ^^

Monday, October 13, 2008

CrystalReport pass value to parameter field [C#]

1. create crystalReport1.rpt and add Parameter Field eg. [?INPUT]
2. coding like this

//first create value
ParameterValues currentParameterValues = new ParameterValues();
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
parameterDiscreteValue.Value = 5;
currentParameterValues.Add(paramDiscreteValue);

//set report DataDefinition
crystalReport1 reportDoc = new crystalReport1();
reportDoc.DataDefinition.ParameterFields["INPUT"].ApplyCurrentValues(currentParameterValues);

//set report to CrystalReportViewer
this.crystalReportViewer1.ReportSource = report;


then crystalreportview run without 'Enter param value' Dialog.
I used 10 hour for this solution T-T