Page 1 of 1

The report still showing the same information of previous XML

Posted: Mon Dec 20, 2010 7:36 am
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(); 

The report still showing the same information of previous XML

Posted: Mon Dec 20, 2010 1:07 pm
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.

The report still showing the same information of previous XML

Posted: Mon Dec 20, 2010 1:56 pm
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.

The report still showing the same information of previous XML

Posted: Wed Dec 22, 2010 12:58 am
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.