Drill Through (Hyperlinks) is not working in remote server [message #762088] |
Wed, 07 December 2011 09:28  |
Eclipse User |
|
|
|
Hi,
I am using BIRT 3.7.1 and also BIRT runtime 3.7.1 wiht Apache Tomcat 6.0 for report publishing. It all works fine and I can run my reports from remote servers.
I created a new report which has an hyperlink to another report, I tested it from Eclipse, and locally (I mean in the same server I have everything installed) and it works fine too.
The problem is when I try to execute it from a remote server. If I run the master report the URL looks like this:
http(colon-slash-slash)serverX:XXX/birt/frameset?__report=report/Comp_Mensual.rptdesign&__format=pdf&
(I changed the servername and port for the example and added the colon-slash-slash to avoid the link), this part works ok and the report runs.
The problem is when I click the link the URL looks like this:
http(colon-slash-slash)birt/frameset?__report=report%2FBH_CPU_new.rptdesign&__format=pdf&inicio=2011-06-01&pollid=38772&fin=2011-07-01&__overwrite=true&__locale=es&__designer=false#9080
Notice the "serverX:XXX/" is missing hence the link doesn´t work. If I add it manually to the link the report runs fine.
So my question is if there is a way to automatically add the "serverX:XXX/" string to the hyperlink so it references the server properly.
Regards,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Drill Through (Hyperlinks) is not working in remote server [message #856390 is a reply to message #855843] |
Wed, 25 April 2012 12:04   |
Eclipse User |
|
|
|
BIRT supports html, pdf, doc, xls, ppt, postscript, odp, ods, and odt
formats.
You could like to the viewer but it would have to be running on a Java
EE application server somewhere.
Jason
On 4/25/2012 2:34 AM, devi priyanka wrote:
> Hi Jason,
>
>
> Thank you very much. The code which you have given is working fine. Is
> there any output formats in BIRT API other than pdf or html?
>
> Is it possible to view output as the web viewer instead of pdf or html
> while running BIRT java program?
>
>
> Thanks,
> Priyanka.
|
|
|
|
|
|
Re: Drill Through (Hyperlinks) is not working in remote server [message #859931 is a reply to message #858441] |
Fri, 27 April 2012 17:45   |
Eclipse User |
|
|
|
Try
DataItemHandle data = designFactory.newDataItem( "data1" );
Action ac = structFactory.createAction();
ActionHandle actionHandle = data.setAction( ac );
actionHandle.setLinkType(DesignChoiceConstants.ACTION_LINK_TYPE_DRILL_THROUGH);
actionHandle.setReportName("DetailFileDrill.rptdesign");
actionHandle.setTargetFileType("report-design");
actionHandle.setTargetBookmark("\"\"+row[\"ORDERNUMBER\"]");
actionHandle.setTargetBookmarkType("bookmark");
actionHandle.setTargetWindow("_blank");
actionHandle.setFormatType("pdf");
For table and group look at this snippet:
TableHandle table = elementFactory.newTableItem( null, 3, 1, 1, 1 );
table.setProperty( StyleHandle.TEXT_ALIGN_PROP,
DesignChoiceConstants.TEXT_ALIGN_CENTER );
table.setWidth( "80%" );//$NON-NLS-1$
table.setProperty( TableHandle.DATA_SET_PROP, "Data Set" );//$NON-NLS-1$
PropertyHandle computedSet = table.getColumnBindings( );
cs1.setExpression( "dataSetRow[\"Month\"]" );//$NON-NLS-1$
computedSet.addItem( cs1 );
cs2.setExpression( "dataSetRow[\"Product\"]" );//$NON-NLS-1$
computedSet.addItem( cs2 );
cs3.setExpression( "dataSetRow[\"Amount\"]" );//$NON-NLS-1$
computedSet.addItem( cs3 );
// Table sorter
SortKey key = StructureFactory.createSortKey( );
key.setKey( "row[\"Month\"]" );//$NON-NLS-1$
key.setDirection( "asc" );//$NON-NLS-1$
PropertyHandle sort = table.getPropertyHandle( TableHandle.SORT_PROP );
sort.addItem( key );
// Header
RowHandle header = (RowHandle) table.getHeader( ).get( 0 );
CellHandle tcell = (CellHandle) header.getCells( ).get( 0 );
LabelHandle label = elementFactory.newLabel( null );
label.setText( "Product" );//$NON-NLS-1$
label.setStyleName( "Label" );//$NON-NLS-1$
tcell.getContent( ).add( label );
tcell = (CellHandle) header.getCells( ).get( 1 );
label = elementFactory.newLabel( null );
label.setText( "Month" );//$NON-NLS-1$
label.setStyleName( "Label" );//$NON-NLS-1$
tcell.getContent( ).add( label );
tcell = (CellHandle) header.getCells( ).get( 2 );
label = elementFactory.newLabel( null );
label.setText( "Amount" );//$NON-NLS-1$
label.setStyleName( "Label" );//$NON-NLS-1$
tcell.getContent( ).add( label );
// Table Group
TableGroupHandle group = elementFactory.newTableGroup( );
group.setKeyExpr( "row[\"Product\"]" );//$NON-NLS-1$
table.getGroups( ).add( group );
RowHandle groupHeader = elementFactory.newTableRow( 3 );
tcell = (CellHandle) groupHeader.getCells( ).get( 0 );
tcell.setDrop( DesignChoiceConstants.DROP_TYPE_DETAIL );
DataItemHandle data = elementFactory.newDataItem( null );
data.setStyleName( "Data" );//$NON-NLS-1$
data.setResultSetColumn( cs2.getName( ) );
tcell.getContent( ).add( data );
group.getHeader( ).add( groupHeader );
RowHandle groupFooter = elementFactory.newTableRow( 3 );
tcell = (CellHandle) groupFooter.getCells( ).get( 0 );
tcell.setProperty( StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#FF8000"
);//$NON-NLS-1$
tcell.setProperty( StyleHandle.BORDER_BOTTOM_STYLE_PROP,
DesignChoiceConstants.LINE_STYLE_SOLID );
tcell.setProperty( StyleHandle.BORDER_BOTTOM_WIDTH_PROP,
DesignChoiceConstants.LINE_WIDTH_THIN );
tcell = (CellHandle) groupFooter.getCells( ).get( 1 );
tcell.setProperty( StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#FF8000"
);//$NON-NLS-1$
tcell.setProperty( StyleHandle.BORDER_BOTTOM_STYLE_PROP,
DesignChoiceConstants.LINE_STYLE_SOLID );
tcell.setProperty( StyleHandle.BORDER_BOTTOM_WIDTH_PROP,
DesignChoiceConstants.LINE_WIDTH_THIN );
tcell = (CellHandle) groupFooter.getCells( ).get( 2 );
tcell.setProperty( StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#FF8000"
);//$NON-NLS-1$
tcell.setProperty( StyleHandle.BORDER_BOTTOM_STYLE_PROP,
DesignChoiceConstants.LINE_STYLE_SOLID );
tcell.setProperty( StyleHandle.BORDER_BOTTOM_WIDTH_PROP,
DesignChoiceConstants.LINE_WIDTH_THIN );
group.getFooter( ).add( groupFooter );
// Detail
RowHandle detail = (RowHandle) table.getDetail( ).get( 0 );
tcell = (CellHandle) detail.getCells( ).get( 1 );
data = elementFactory.newDataItem( null );
data.setStyleName( "Data" );//$NON-NLS-1$
data.setProperty( StyleHandle.FONT_FAMILY_PROP,"Arial");
data.setResultSetColumn( cs1.getName( ) );
tcell.getContent( ).add( data );
tcell = (CellHandle) detail.getCells( ).get( 2 );
data = elementFactory.newDataItem( null );
data.setStyleName( "Data" );//$NON-NLS-1$
data.setResultSetColumn( cs3.getName( ) );
tcell.getContent( ).add( data );
cell.getContent( ).add( table )
Jason
On 4/27/2012 2:08 AM, devi priyanka wrote:
> Hi Jason,
> Please give me solution for below mentioned queries:
>
> 1) I have edited rptdesign file through API and creating data source , data set and binding data set to table using java program. PFA for image file named "Master.jpeg" and please let me know how to set Hyperlink property using java api.
>
> 2) In the other attached rpt design file i.e "Detail.jpeg" shown, in that i want to set grouping through java program.
>
> Thanks in advance
> Priyanka
|
|
|
|
|
|
|
|
|
|
Re: Drill Through (Hyperlinks) is not working in remote server [message #870837 is a reply to message #870812] |
Wed, 09 May 2012 15:26  |
Eclipse User |
|
|
|
Is your app web based? Can you give some more detail and post the code?
Jason
On 5/9/2012 2:40 PM, Ope Ademulegun wrote:
>
> Hi, Jason(Everyone)
>
> Please i need help concerning a pdf output file generated by my
> application (integrated with BIRT). the hyperlink in it does not take
> you to the intended page
>
> even though it works fine from eclipse.
>
> Thanks
> Ope
|
|
|