Skip to main content



      Home
Home » Archived » BIRT » Caching Problem with BIRT Viewer
Caching Problem with BIRT Viewer [message #254458] Tue, 04 September 2007 17:02 Go to next message
Eclipse UserFriend
Originally posted by: uswapnil2000.yahoo.co.in

BIRT-Viewer is caching report values.

Problem:
I am using dynamic Scripted Data Source for BIRT. If I view the report in
Report-viewer, it shows me the old output unless I hit "Run Report with no
parameters" button at the navigation bar which runs the report again.

Is it a caching problem? If yes, then is there a way to turn caching off?

Speedy reponse will be appreciated.

Thanks,
Swapnil.
Re: Caching Problem with BIRT Viewer [message #254462 is a reply to message #254458] Tue, 04 September 2007 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Swapnil,

It is caching the report data, but I do not think there is a way to turn
this off. If you select the preview with the Web Viewer icon in the
toolbar it should rerun every time. It should also run every time when
deployed to viewer unless you specify that you want it to use an
existing report document.

Jason

Swapnil wrote:
> BIRT-Viewer is caching report values.
>
> Problem:
> I am using dynamic Scripted Data Source for BIRT. If I view the report
> in Report-viewer, it shows me the old output unless I hit "Run Report
> with no parameters" button at the navigation bar which runs the report
> again.
>
> Is it a caching problem? If yes, then is there a way to turn caching off?
>
> Speedy reponse will be appreciated.
>
> Thanks,
> Swapnil.
>
Re: Caching Problem with BIRT Viewer [message #254470 is a reply to message #254462] Tue, 04 September 2007 18:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: uswapnil2000.yahoo.co.in

Jason,

Thanks for the speedy reply.

I know I can call getStyle() on RowInstance as depicted in the following
code but how should I call getStyle() on IDataItemInstance, there seems to
be no method associated with it. Sorry if I am missing something here.



import
org.eclipse.birt.report.engine.api.script.eventadapter.RowEv entAdapter;
import org.eclipse.birt.report.engine.api.script.IReportContext;
import org.eclipse.birt.report.engine.api.script.ScriptException;
import org.eclipse.birt.report.engine.api.script.instance.IRowInsta nce;
import org.eclipse.birt.report.engine.api.script.IRowData;
import org.eclipse.birt.report.engine.api.script.element.ICell;


public class RowEH extends RowEventAdapter {
public void onCreate(IRowInstance row, IReportContext context) {

IRowData data = row.getRowData();
double minThresh = 0.0;
double expectedThresh = 100.0;
try {
minThresh =
((Double)data.getColumnValue(("row[\"ServiceValueMinimum\"] "))).doubleValue();
expectedThresh =
((Double)data.getColumnValue(("row[\"ServiceValueExpected\ "]"))).doubleValue();
} catch (ScriptException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try
{
for (int i = 0 ; i <= data.getColumnCount(); i++){
if (data.getColumnName(i).equalsIgnoreCase("ServiceExpected") ||
data.getColumnName(i).equalsIgnoreCase("Minimum")
|| data.getColumnName(i).equalsIgnoreCase("CustomerName"))
if (((Double) data.getColumnValue(i)).doubleValue() >= expectedThresh
&& ((Double) data.getColumnValue(i)).doubleValue() > minThresh ) {
row.getStyle( ).setBackgroundColor("#80FF80");
}else if (((Double) data.getColumnValue(i)).doubleValue() >= minThresh
&& ((Double) data.getColumnValue(i)).doubleValue() < expectedThresh ) {
row.getStyle( ).setBackgroundColor("#FEA342");
}else if (((Double) data.getColumnValue(i)).doubleValue() <
expectedThresh && ((Double) data.getColumnValue(i)).doubleValue() <
minThresh ) {
row.getStyle( ).setBackgroundColor("#FF4040");
}
}

} catch (Exception e) {
e.printStackTrace();
}
}
Re: Caching Problem with BIRT Viewer [message #254478 is a reply to message #254462] Tue, 04 September 2007 18:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: uswapnil2000.yahoo.co.in

Jason,
Thanks for the reply.
Can you please tell how I should specify about not using existing report
document so that report will be run every time?
I have a static designer file but dynamic scripted datasource.

Swapnil.
Re: Caching Problem with BIRT Viewer [message #254482 is a reply to message #254478] Tue, 04 September 2007 20:43 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Using the __overwrite=true in the url when deployed to the viewer will
do this. There is also a setting in the web.xml that does this
automatically. I do not think it is possible in the preview tab.

Jason

Swapnil wrote:
> Jason,
> Thanks for the reply.
> Can you please tell how I should specify about not using existing report
> document so that report will be run every time?
> I have a static designer file but dynamic scripted datasource.
>
> Swapnil.
>
>
Previous Topic:Is 2.2.1 On Schedule for Sept 28?
Next Topic:Crosstab and count problem
Goto Forum:
  


Current Time: Sat May 10 15:04:24 EDT 2025

Powered by FUDForum. Page generated in 0.03258 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top