[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.birt] Re: __title does not set document name when using __document

Mark,

Can you try supplying both __report and __document. You can also specify __overwrite=false to make the report engine not regenerate the document.

Jason

Mark Alexander wrote:
Hello,

The following is based on BIRT version 2.2.2, using Report Viewer in Apache Tomcat 6.0.

I'm unable to set the name of an exported document using the __title parameter when rendering a report using __document (as opposed to __report).

The report renders as expected but when it is exported to PDF, XLS, etc. The resulting file is named 'BIRT Report' rather than the value specified in the parameter (or the rptdesign file name).

Our application first executes a frameset call passing the __title, __report and __document parameters to create a .rptdocument from the rptdesign specified in __report. Subsequent to that call the report is rendered using __document (and not __report).
The first call works as advertised: The export yields a document with the name specified in the __title parameter. The second call does not.


I took a quick look at the source code and it looks like this may be a bug.

 From org.eclipse.birt.report.utility.ParameterAccessor:

baseName = attrBean.getReportDesignName( );
    if ( baseName == null || baseName.length( ) == 0 )
    baseName = attrBean.getReportDocumentName( );

 From org.eclipse.birt.report.service.BirtViewerReportDesignHandle:
public String getDocumentName()
   {
       // TODO Auto-generated method stub
       return null;
   }

This means if there is no report design name it looks for the report document name. And the report document name is hard coded to null. if baseName is null it uses the default 'BIRTReport'. That explains why it works with __report and not with __document.

In the meantime, is there another method to set the document name?

Thanks,
Mark Alexander