Stimulsoft for dummies

Stimulsoft Reports.Flex discussion
tonysameh
Posts: 10
Joined: Mon Nov 08, 2010 6:09 am
Location: Egypt

Stimulsoft for dummies

Post by tonysameh »

Hi,

I know I post too much but the reason is that no one replies and I continue trying :(

Now, all what I need is to pass xml data in runtime to the report. I tried everything and nothing worked.
I designed a report template, saved it as .mrt, then used loadReportFromString and this showed the same data I used while designing the template. This is obvious since the path of the file exists in the .mrt file.

Now I want to load runtime data.
I tried regDataXML and it showed an empty report. I tried the last FAQ using

Code: Select all

report.dictionary.databases.clear();
var database: StiXmlDatabase = newStiXmlDatabase("Connection1", "reports/data/Demo.xsd", "reports/data/Demo.
xml");
report.dictionary.databases.add(database);
I assumed I has to use the same name "Connection1" as the one I used while designing the template).
And it gave me Error 2032 Stream Error (By the way, StiXmlDatabase does not exist in the new versions !)

I added report.dictionary.synchronize(); but nothing worked.

Now of course I'm missing a step. But I cannot blame myself since it is not written anywhere step by step.
Thanks
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Stimulsoft for dummies

Post by Vladimir »

Hello,

You can use this method for register data in report:

Code: Select all

report.dictionary.databases.clear();
report.regData(.....);
The 2032 error occurs if the file is not found at the specified path or no access to file. Please check the specified path to xml files, for example in the browser.

StiXmlDatabase does not exist in the new versions
Mistakenly, this class has been hidden. To use it, you need to add the import manually:

Code: Select all

import stimulsoft.report.dictionary.databases.StiXmlDatabase;
Thank you.
tonysameh
Posts: 10
Joined: Mon Nov 08, 2010 6:09 am
Location: Egypt

Stimulsoft for dummies

Post by tonysameh »

OK it is now working thanks
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Stimulsoft for dummies

Post by Andrew »

Great!

Have a nice day!
Thank you.
jorool
Posts: 44
Joined: Wed Dec 08, 2010 1:39 pm
Location: Brazil

Stimulsoft for dummies

Post by jorool »

Hello!

I'm trying to make some tests..and i'm getting some troubles..
All I want is to show and design an empty report..
I'm using the code Vladimir told me at the initialization of my .mxml:

Code: Select all

            public function init(): void{
                StiDesignerFx.initialize();
                .
                .
                .
            }
And to call the designer:

Code: Select all

            public function editar():void {
                var report:StiReport = new StiReport();
                report.design();
            }
But it still showing the following error:

Code: Select all

org.granite.reflect::ClassNotFoundError: Class StiButton.as$256::NoTruncationUITextField does not exist in system or registered domains
	at org.granite.reflect::Type$/forName()[C:\workspace_\graniteds\as3\framework\org\granite\reflect\Type.as:172]
	at org.granite.reflect::Type$/forInstance()[C:\workspace_\graniteds\as3\framework\org\granite\reflect\Type.as:214]
	at org.granite.tide::Tide/internalAdd()[C:\workspace_\graniteds\as3\framework\org\granite\tide\Tide.as:472]
	at org.granite.tide::Tide/internalAdd()[C:\workspace_\graniteds\as3\framework\org\granite\tide\Tide.as:503]
	at org.granite.tide::Tide/internalAdd()[C:\workspace_\graniteds\as3\framework\org\granite\tide\Tide.as:503]
	at org.granite.tide::Tide/addedHandler()[C:\workspace_\graniteds\as3\framework\org\granite\tide\Tide.as:466]
	at flash.display::DisplayObjectContainer/addChildAt()
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:7039]
	at mx.core::Container/addChildAt()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:2614]
	at mx.core::Container/addChild()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:2534]
	at stimulsoft.report.design::StiDesignerFx/createChildren()[D:\Flex\.BuilderFx\temp\Stimulsoft_DesignerFx\stimulsoft\report\design\StiDesignerFx.as:504]
	at mx.core::UIComponent/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:7349]
	at mx.core::Container/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:3129]
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:7241]
	at mx.core::UIComponent/addChildAt()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6947]
	at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:1825]
	at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:1416]
	at spark.components::Group/addElementAt()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:1183]
	at spark.components::Group/addElement()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:1141]
	at spark.components::SkinnableContainer/addElement()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:708]
	at stimulsoft.report::StiReport/design()[D:\Flex\.BuilderFx\temp\Stimulsoft_Report\stimulsoft\report\StiReport.as:931]
	at br.com.produtec.pcp.gui.view::RelUtilizacaoMaterialView/editar()[D:\ProjetosJava\desenvolvimento\pcp_flex\src\main\flex\br\com\produtec\pcp\gui\view\RelUtilizacaoMaterialView.mxml:138]
	at br.com.produtec.pcp.gui.view::RelUtilizacaoMaterialView/__btnEditar_click()[D:\ProjetosJava\desenvolvimento\pcp_flex\src\main\flex\br\com\produtec\pcp\gui\view\RelUtilizacaoMaterialView.mxml:188]
Does anyone know how to fix it?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Stimulsoft for dummies

Post by Vladimir »

Hello,

We cannot reproduce the error. Pleae tell us what Flash Builder and Flex SDK do you use? Do the examples from the installation package work correctly?

Thank you.
jorool
Posts: 44
Joined: Wed Dec 08, 2010 1:39 pm
Location: Brazil

Stimulsoft for dummies

Post by jorool »

Vladimir,

Going deeper, we use GRANITE lib for java/flex integration in our application.
The exception occurs because the class "NoTruncationUITextField " is not registered in "StiButton", if I understood correctly.
The the granite class throws the exception:

Code: Select all

    org.granite.reflect::ClassNotFoundError: Class StiButton.as$256::NoTruncationUITextField does not exist in system or registered domains at org.granite.reflect::Type$/forName()[C:\workspace_\graniteds\as3\framework\org\granite\reflect\Type.as:172]
I found and edited some lines of this lib treating the exception. Isn't occuring anymore.
I do not know if you can do something about it, but someone else who use granite will have the same exception, if not "manually" treated.
I hope to be helpfull.

Thank you again!
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Stimulsoft for dummies

Post by Vladimir »

Hello,

Yes, this class is used in the StiButton component. We will modify the structure of code of this component. The update will be available in the next prerelease build on December, 14. You can download and test it.

Thank you.
jorool
Posts: 44
Joined: Wed Dec 08, 2010 1:39 pm
Location: Brazil

Stimulsoft for dummies

Post by jorool »

Hello

How to add and set values to a variable on source code?
Can you show me an example?

Thank you.
Pete
Posts: 10
Joined: Sun Dec 26, 2010 5:09 pm
Location: Chicago, Illinois

Stimulsoft for dummies

Post by Pete »

jorool wrote:Hello

How to add and set values to a variable on source code?
Can you show me an example?

Thank you.
This is something I'm curious about too.
Locked