Page 1 of 1

Error #1065

Posted: Tue Jan 11, 2011 2:20 pm
by brianj774
I'm not sure what I'm missing. I've got the viewer trial swc in my libs folder, and the project compiles fine (which it did not do before added the swc).

Any ideas what I can do? I'm just trying to cobble together the simplest sample report as a proof of concept.

I could really use some assistance.

Thanks!

Code: Select all

ReferenceError: Error #1065: Variable StiViewerFx is not defined.
	at global/flash.utils::getDefinitionByName()
	at stimulsoft.report::StiReport/show()[D:\Flex\.BuilderFx\temp\Stimulsoft_Report\stimulsoft\report\StiReport.as:979]
	at dashboard.ui.modules::ModuleReportsFX/module1_creationCompleteHandler()[C:\SVN\webstore\trunk\tmpFlex_RenameMe\Flex\Dashboard\src\dashboard\ui\modules\ModuleReportsFX.mxml:36]
	at dashboard.ui.modules::ModuleReportsFX/___ModuleReportsFX_Module1_creationComplete()[C:\SVN\webstore\trunk\tmpFlex_RenameMe\Flex\Dashboard\src\dashboard\ui\modules\ModuleReportsFX.mxml:13]
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:12528]
	at mx.core::UIComponent/set initialized()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1627]
	at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:759]
	at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]

Error #1065

Posted: Tue Jan 11, 2011 2:37 pm
by brianj774
it started to work after I put in

Code: Select all

	
I thought I'd read from the documentation that that was optional, and you could use report.show() instead...
Also, there is another way to show a report instead of placing Viewer.Fx on the scene of a Flex
application:

But, that didn't work for me. I needed to have the viewer component placed, and then it started to work.

Error #1065

Posted: Wed Jan 12, 2011 1:57 am
by Vladimir
Hello,

In order to resolve this problem, initialization methods exist: StiViewerFx.initialize() and StiDesignerFx.initialize(). They must be called once at initialization of the application. For example,

Code: Select all


. . .

private function onInitialize(): void
{
	StiViewerFx.initialize();
	StiDesignerFx.initialize();
}

Thank you.

Error #1065

Posted: Wed Jan 12, 2011 7:10 am
by brianj774
Yes, that does seem to take care of it, thanks!