The report still showing the same information of previous XML

Stimulsoft Reports.Flex discussion
Locked
rafael.gil
Posts: 1
Joined: Mon Dec 20, 2010 7:25 am
Location: Brazil

The report still showing the same information of previous XML

Post by rafael.gil »

When I convert the data to XML the report shows correctly the passed data. This is an example of a part of my generated XML:

Code: Select all

  
    
      Costura
    
    
      Montagem Peça
    
    
      Gabaritos
    
  
But when I convert new data to XML, for example this:

Code: Select all

  
    
      Corte
    
    
      Separação
    
    
      Estamparia
    
  
  
The report still showing the same information of previous XML.

This is the code that calls the report:

Code: Select all

report.regData("dados", "dados", xml);
	report.dictionary.synchronize();
	report.show(); 
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

The report still showing the same information of previous XML

Post by Jan »

Hello,

Please use following code on second time:

Code: Select all

report.DataStore.Clear()
report.regData("dados", "dados", xml);
report.dictionary.synchronize();
report.show(); 
Thank you.
jorool
Posts: 44
Joined: Wed Dec 08, 2010 1:39 pm
Location: Brazil

The report still showing the same information of previous XML

Post by jorool »

Hello, Jan!

This method "report.DataStore.Clear()" is called just like you told us!
On the first time, the XML we pass to report is showed correctly.
On the second time, we pass another XML to the same instance of the report, but our report shows the first XML at all.
If we open the report designer, see the preview page and call "report.show" again, the report shows the second XML correctly!
"report.DataStore.Clear()" is called every time before "show" and "design" methods!

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

The report still showing the same information of previous XML

Post by Vladimir »

Hello,

We have found a bug: in the second showing of the same report, it was not rendered. We have fixed the error, the update will be available in prerelease build on December, 28.

On the current moment, as a workaround, you can use the following code to clear the render flag of the report:

Code: Select all

report.isRendered = false;
Thank you.
Locked