Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Drill Through (Hyperlinks) is not working in remote server(Drill Through (Hyperlinks) is not working in remote server)
Drill Through (Hyperlinks) is not working in remote server [message #762088] Wed, 07 December 2011 14:28 Go to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
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 #762260 is a reply to message #762088] Wed, 07 December 2011 19:18 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is this using the Viewer? I assume it is? If so the server and port
should be automatically placed based on the master report.

Jason

On 12/7/2011 9:28 AM, Esteban Lus Bietti wrote:
> 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 #762281 is a reply to message #762260] Wed, 07 December 2011 19:57 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Hi Jason,

As you said this happens using the viewer. For some reason it is not being inherited from the master report. Is there any xml file for configuration that I should check?
As I said the master report runs fine, but the when clicking the hyperlink, the server:port is missing.

Regards,
Re: Drill Through (Hyperlinks) is not working in remote server [message #762873 is a reply to message #762281] Thu, 08 December 2011 18:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you post the master report?

Jason

On 12/7/2011 2:57 PM, Esteban Lus Bietti wrote:
> Hi Jason,
>
> As you said this happens using the viewer. For some reason it is not
> being inherited from the master report. Is there any xml file for
> configuration that I should check?
> As I said the master report runs fine, but the when clicking the
> hyperlink, the server:port is missing.
>
> Regards,
Re: Drill Through (Hyperlinks) is not working in remote server [message #765156 is a reply to message #762260] Tue, 13 December 2011 14:26 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Hi Jason,

Here is the master report.

Thanks for your help.

Regards,

Esteban
Re: Drill Through (Hyperlinks) is not working in remote server [message #765866 is a reply to message #762260] Wed, 14 December 2011 20:05 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Hi Jason,

I found the cause of the problem, when I created the URL in the index.jsp file y used the "__format" parameter because I needed the report in pdf. I tried deleting it and now it works ok I can the save it to pdf or word and the link still works, the problem is if you especy another format when running the report (pdf in my case) is this a bug that can be addressed?

Regards
Re: Drill Through (Hyperlinks) is not working in remote server [message #766334 is a reply to message #765866] Thu, 15 December 2011 15:14 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Do you mean you specified the format before you ran the master report?
I would like to try and reproduce this issue. What did the link look like?

Jason

On 12/14/2011 3:06 PM, Esteban Lus Bietti wrote:
> Hi Jason,
>
> I found the cause of the problem, when I created the URL in the
> index.jsp file y used the "__format" parameter because I needed the
> report in pdf. I tried deleting it and now it works ok I can the save it
> to pdf or word and the link still works, the problem is if you especy
> another format when running the report (pdf in my case) is this a bug
> that can be addressed?
>
> Regards
Re: Drill Through (Hyperlinks) is not working in remote server [message #768615 is a reply to message #766334] Tue, 20 December 2011 13:18 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Hi Jason,

This is how I create the link on the index.jsp file:

<a href="<%= request.getContextPath( ) + "/frameset?__report=report/Estado_Srv_Win.rptdesign&__format=pdf%>

I solved the issue by removing the "&__format=pdf" part.

Regards,

Esteban
Re: Drill Through (Hyperlinks) is not working in remote server [message #768702 is a reply to message #768615] Tue, 20 December 2011 16:20 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Esteban,

Is Estado_Srv_Win the master report that contains the drill links?

Jason

On 12/20/2011 8:18 AM, Esteban Lus Bietti wrote:
> Hi Jason,
>
> This is how I create the link on the index.jsp file:
>
> <a href="<%= request.getContextPath( ) +
> "/frameset?__report=report/Estado_Srv_Win.rptdesign&__format=pdf%>
>
> I solved the issue by removing the "&__format=pdf" part.
>
> Regards,
>
> Esteban
Re: Drill Through (Hyperlinks) is not working in remote server [message #768748 is a reply to message #768702] Tue, 20 December 2011 17:47 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Jason,

Yes it is, is the one I attached in a previous reply.

Regards,

Esteban
Re: Drill Through (Hyperlinks) is not working in remote server [message #768829 is a reply to message #768748] Tue, 20 December 2011 22:19 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you try using request.getServerName() and request.getPort() as part
of the original url?

Jason



On 12/20/2011 12:47 PM, Esteban Lus Bietti wrote:
> Jason,
>
> Yes it is, is the one I attached in a previous reply.
>
> Regards,
>
> Esteban
Re: Drill Through (Hyperlinks) is not working in remote server [message #769647 is a reply to message #768829] Thu, 22 December 2011 13:19 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Hi Jason,

I tried the link like this:

<p><a href="<%= request.getServerName() + ":" + request.getPort() + "/frameset?__report=report/Estado_Srv_Win_New.rptdesign&__format=pdf" %>">Test</a>

It´s givin me the following error:

An error occurred at line: 86 in the jsp file: /index.jsp
The method getPort() is undefined for the type HttpServletRequest
83: <p><a href="<%= request.getContextPath( ) + "/frameset?__report=report/Estado_Srv_Win.rptdesign" %>">Reporte Servidores Windows</a>
84: <p><a href="<%= request.getContextPath( ) + "/frameset?__report=report/Estado_Srv_Unix.rptdesign&__format=pdf" %>">Reporte Servidores Unix</a>
85: <p><a href="<%= request.getContextPath( ) + "/frameset?__report=report/Estado_Srv_Win_New.rptdesign&__format=pdf" %>">Uso de CPU</a>
86: <p><a href="<%= request.getServerName() + ":" + request.getPort() + "/frameset?__report=report/Estado_Srv_Win_New.rptdesign&__format=pdf" %>">Test</a>
87: </TD>
88: </TR>
89: </TBODY>

Aparently the methos request.getPort is causing the error?

Regards.
Re: Drill Through (Hyperlinks) is not working in remote server [message #769784 is a reply to message #769647] Thu, 22 December 2011 16:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Try:
getServerPort()

Jason

On 12/22/2011 8:19 AM, Esteban Lus Bietti wrote:
> Hi Jason,
>
> I tried the link like this:
>
> <p><a href="<%= request.getServerName() + ":" + request.getPort() +
> "/frameset?__report=report/Estado_Srv_Win_New.rptdesign&__format=pdf"
> %>">Test</a>
>
> It´s givin me the following error:
>
> An error occurred at line: 86 in the jsp file: /index.jsp
> The method getPort() is undefined for the type HttpServletRequest
> 83: <p><a href="<%= request.getContextPath( ) +
> "/frameset?__report=report/Estado_Srv_Win.rptdesign" %>">Reporte
> Servidores Windows</a>
> 84: <p><a href="<%= request.getContextPath( ) +
> "/frameset?__report=report/Estado_Srv_Unix.rptdesign&__format=pdf"
> %>">Reporte Servidores Unix</a>
> 85: <p><a href="<%= request.getContextPath( ) +
> "/frameset?__report=report/Estado_Srv_Win_New.rptdesign&__format=pdf"
> %>">Uso de CPU</a>
> 86: <p><a href="<%= request.getServerName() + ":" + request.getPort() +
> "/frameset?__report=report/Estado_Srv_Win_New.rptdesign&__format=pdf"
> %>">Test</a>
> 87: </TD>
> 88: </TR>
> 89: </TBODY>
>
> Aparently the methos request.getPort is causing the error?
>
> Regards.
Re: Drill Through (Hyperlinks) is not working in remote server [message #769825 is a reply to message #769784] Thu, 22 December 2011 18:34 Go to previous messageGo to next message
Esteban Lus Bietti is currently offline Esteban Lus BiettiFriend
Messages: 21
Registered: October 2011
Junior Member
Hi Jason,

Finally I set it like this:

<a href="<%= request.getServerName() + ":" + request.getServerPort() + request.getContextPath( ) + "/frameset?__report=report/Estado_Srv_Win_ok.rptdesign&__format=pdf" %>">Uso de CPU</a>

and it´s working fine.

Thank you very much for your help.

Regards,

Esteban
Re: Drill Through (Hyperlinks) is not working in remote server [message #841525 is a reply to message #769784] Wed, 11 April 2012 12:25 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi,

I want to use drilldown option using java api program, but i am not able to do it.

Please help me in this regard.

Thanks in advance.
Re: Drill Through (Hyperlinks) is not working in remote server [message #841693 is a reply to message #841525] Wed, 11 April 2012 16:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is the api program running on the command line or in an application
server? You may need to implement your own ActionHandler which
implements this interface:
implements IHTMLActionHandler

Jason

On 4/11/2012 8:25 AM, devi priyanka wrote:
> Hi,
>
> I want to use drilldown option using java api program, but i am not able
> to do it.
>
> Please help me in this regard.
>
> Thanks in advance.
Re: Drill Through (Hyperlinks) is not working in remote server [message #842270 is a reply to message #841693] Thu, 12 April 2012 06:21 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
I have written java class in which i have to implement drilldown option programatically. I run java program through command line.
Re: Drill Through (Hyperlinks) is not working in remote server [message #842759 is a reply to message #842270] Thu, 12 April 2012 15:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This is a bit difficult, because I am not certain how to call your java
class to run another report from a url. If you have syntax for that you
could implement:

public class MyActionHandler implements IHTMLActionHandler
public String getURL( IAction actionDefn, Object context )
{
if ( actionDefn == null )
{
return null;
}
String url = null;
switch ( actionDefn.getType( ) )
{
case IAction.ACTION_BOOKMARK :
if ( actionDefn.getActionString( ) != null )
{
url = "#" + actionDefn.getActionString( );
}
break;
case IAction.ACTION_HYPERLINK :
url = actionDefn.getActionString( );
break;
case IAction.ACTION_DRILLTHROUGH :
url = buildDrillAction( actionDefn, context );
break;
default :
return null;
}
return url;
}
..
..

where you would implment buildDrillAction to return the url string to
run your class with your detail report.

Jason

On 4/12/2012 2:21 AM, devi priyanka wrote:
> I have written java class in which i have to implement drilldown option
> programatically. I run java program through command line.
Re: Drill Through (Hyperlinks) is not working in remote server [message #850580 is a reply to message #842759] Fri, 20 April 2012 06:38 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi,

I have designed rpt design file by implementing drill down feature. I have called that rpt design file in java program using birt api program.

I am getting exception like "java.lang.IllegalStateException: Unable to determine the default workspace location. Check your OSGi-less platform configuration of the plugin or datatools workspace path.
at org.eclipse.datatools.connectivity.internal.ConnectivityPlugin.getDefaultStateLocation(ConnectivityPlugin.java:154)".

I have uploaded java api program and rpt design files. plz verify this.
Re: Drill Through (Hyperlinks) is not working in remote server [message #850701 is a reply to message #850580] Fri, 20 April 2012 08:48 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi Jason,

The above problem was solved. I am able to save the output in the pdf file also. When i try to click on the inner details for example on the customer number it is showing some error msg. I have uploaded error msg,output of the program, java and rpt design files.

I used dirll down option to get the complete information on customer number.

Plz help me on this.
Re: Drill Through (Hyperlinks) is not working in remote server [message #851109 is a reply to message #850701] Fri, 20 April 2012 16:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Devi,

This was what I was talking about in my last post. The default action
handler is setup for the app to run in an application sever. You can
write your own action handler to build a url but I am not certain what
the url would look like to run a command line app.

Jason

On 4/20/2012 4:48 AM, devi priyanka wrote:
> Hi Jason,
>
> The above problem was solved. I am able to save the output in the pdf file also. When i try to click on the inner details for example on the customer number it is showing some error msg. I have uploaded error msg,output of the program, java and rpt design files.
>
> I used dirll down option to get the complete information on customer number.
>
> Plz help me on this.
Re: Drill Through (Hyperlinks) is not working in remote server [message #854682 is a reply to message #851109] Tue, 24 April 2012 06:41 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi Jason,

I want to use Drill-through option in java program and not in form of scripts which are written in xml of rpt design file. I have two rpt design files. The ouptut of two rpt design files(in pdf format) is showed in images i.e., Cust1.jpg and Cust2.jpg respectively. If i click on customer number which is shown in Cust1.jpg then it will display details in the form which is shown in Cust2.jpg file. This is done using drill down option. Is this possible to write a java program for above scenario using drill through option.

I want to implement drill-through option using java program.


Thanks,
Priyanka.
  • Attachment: cust1.JPG
    (Size: 96.23KB, Downloaded 290 times)
  • Attachment: cust2.JPG
    (Size: 63.62KB, Downloaded 265 times)
Re: Drill Through (Hyperlinks) is not working in remote server [message #855152 is a reply to message #854682] Tue, 24 April 2012 15:05 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you are willing to pre-generate the master and detail pdfs this can
be done very easily. Take a look at the attached example. It contains
two reports, a Java class to pre-generate both reports and another Java
class that creates the links to write into the master pdf. Make sure to
change the paths accordingly.

Jason

On 4/24/2012 2:41 AM, devi priyanka wrote:
> Hi Jason,
>
> I want to use Drill-through option in java program and not in form of scripts which are written in xml of rpt design file. I have two rpt design files. The ouptut of two rpt design files(in pdf format) is showed in images i.e., Cust1.jpg and Cust2.jpg respectively. If i click on customer number which is shown in Cust1.jpg then it will display details in the form which is shown in Cust2.jpg file. This is done using drill down option. Is this possible to write a java program for above scenario using drill through option.
>
> I want to implement drill-through option using java program.
>
>
> Thanks,
> Priyanka.
Re: Drill Through (Hyperlinks) is not working in remote server [message #855160 is a reply to message #854682] Tue, 24 April 2012 15:05 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you are willing to pre-generate the master and detail pdfs this can
be done very easily. Take a look at the attached example. It contains
two reports, a Java class to pre-generate both reports and another Java
class that creates the links to write into the master pdf. Make sure to
change the paths accordingly.

Jason

On 4/24/2012 2:41 AM, devi priyanka wrote:
> Hi Jason,
>
> I want to use Drill-through option in java program and not in form of scripts which are written in xml of rpt design file. I have two rpt design files. The ouptut of two rpt design files(in pdf format) is showed in images i.e., Cust1.jpg and Cust2.jpg respectively. If i click on customer number which is shown in Cust1.jpg then it will display details in the form which is shown in Cust2.jpg file. This is done using drill down option. Is this possible to write a java program for above scenario using drill through option.
>
> I want to implement drill-through option using java program.
>
>
> Thanks,
> Priyanka.
Re: Drill Through (Hyperlinks) is not working in remote server [message #855843 is a reply to message #855160] Wed, 25 April 2012 06:34 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
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 #856390 is a reply to message #855843] Wed, 25 April 2012 16:04 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #857201 is a reply to message #856390] Thu, 26 April 2012 10:35 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi Jason,

Thanks for the above reply. I have one more query. In the uploaded image I am creating hyperlink of Drill through option using UI. Can we create this Drill through option using java program? I want to create everything using java program without doing in UI. Please help me on this.


Thanks,
Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #857675 is a reply to message #857201] Thu, 26 April 2012 19:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The issue with this drill is that you are trying to link to run the
detail report on the fly. I am not certain how that can be done with a
url. In the action handler you have full access to the url that is
created. You may be able to create a bat file that runs the engine and
call it, but I am not certain how to do this.

Jason

On 4/26/2012 6:35 AM, devi priyanka wrote:
> Hi Jason,
>
> Thanks for the above reply. I have one more query. In the uploaded image I am creating hyperlink of Drill through option using UI. Can we create this Drill through option using java program? I want to create everything using java program without doing in UI. Please help me on this.
>
>
> Thanks,
> Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #858441 is a reply to message #857675] Fri, 27 April 2012 06:08 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
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
  • Attachment: Master.JPG
    (Size: 139.19KB, Downloaded 454 times)
  • Attachment: Detail.JPG
    (Size: 158.41KB, Downloaded 345 times)
Re: Drill Through (Hyperlinks) is not working in remote server [message #859931 is a reply to message #858441] Fri, 27 April 2012 21:45 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #868698 is a reply to message #859931] Wed, 02 May 2012 12:23 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi Jason,

Thanks for the above reply. It helped me a lot. Please give solutions for below queries.

I have attached two rptdesign files as Master.jpeg and Detail.jpeg

I want to do this using java program.

1) In the Master.jpeg, i want to implement Drill through option using report parameters in java birt api program.

2) In the Detail.jpeg, as shown in the image i have to create report parameter, and also add filter to the same rptdesign file using java birt api program

Thanks in Advance
Priyanka
  • Attachment: Master.JPG
    (Size: 131.79KB, Downloaded 375 times)
  • Attachment: Detail.JPG
    (Size: 130.81KB, Downloaded 303 times)
Re: Drill Through (Hyperlinks) is not working in remote server [message #869671 is a reply to message #868698] Thu, 03 May 2012 15:34 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

On one once you create the drill through you can add the parameter like:

List<Expression> expressions = new ArrayList<Expression>( );
Expression expr = new Expression("row[\"ORDERNUMBER\"]",
ExpressionType.JAVASCRIPT);
expressions.add(expr);

actionHandle.getMember("paramBindings");
ParamBinding pb = StructureFactory.createParamBinding();
pb.setParamName("order");
pb.setExpression(expressions);
actionHandle.addParamBinding(pb);

You can add a filter to a data set like:


OdaDataSetHandle dsHandle = designFactory.newOdaDataSet( "ds",
"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" );
dsHandle.setDataSource( "Data Source" );
String qry = "Select * from customers";

dsHandle.setQueryText( qry );

addFilterCondition( dsHandle );


designHandle.getDataSets( ).add( dsHandle );




void addFilterCondition(OdaDataSetHandle dh){
try{
FilterCondition fc = structFactory.createFilterCond();
fc.setExpr("row[\"COUNTRY\"]");
fc.setOperator(DesignChoiceConstants.MAP_OPERATOR_EQ);
fc.setValue1("'USA'");

dh.addFilter(fc);

}catch (Exception e){
e.printStackTrace();
}
}

Jason


On 5/2/2012 8:23 AM, devi priyanka wrote:
> Hi Jason,
>
> Thanks for the above reply. It helped me a lot. Please give solutions for below queries.
>
> I have attached two rptdesign files as Master.jpeg and Detail.jpeg
>
> I want to do this using java program.
>
> 1) In the Master.jpeg, i want to implement Drill through option using report parameters in java birt api program.
>
> 2) In the Detail.jpeg, as shown in the image i have to create report parameter, and also add filter to the same rptdesign file using java birt api program
>
> Thanks in Advance
> Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #870168 is a reply to message #869671] Mon, 07 May 2012 06:59 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi Jason,

Thanks. I have tried above one, it's working fine. I want to implement Drill-Through Charts using java birt api. I have gone through eclipse site , but i didn't find any information related to Drill-Through charts. Please give solution.

Thanks in Advance
Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #870329 is a reply to message #870168] Mon, 07 May 2012 16:20 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Are you wanting an example of the DE API that adds a chart with triggers?

Jason

On 5/7/2012 2:59 AM, devi priyanka wrote:
> Hi Jason,
>
> Thanks. I have tried above one, it's working fine. I want to implement
> Drill-Through Charts using java birt api. I have gone through eclipse
> site , but i didn't find any information related to Drill-Through
> charts. Please give solution.
>
> Thanks in Advance
> Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #870401 is a reply to message #870329] Tue, 08 May 2012 04:21 Go to previous messageGo to next message
devi priyanka is currently offline devi priyankaFriend
Messages: 12
Registered: February 2012
Junior Member
Hi Jason,

Yes i want an example to implement Drill-through charts using java BIRT API. I have done Drill-through tables using java BIRT API.


Thanks in Advance
Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #870554 is a reply to message #870401] Tue, 08 May 2012 16:34 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at this:

http://www.birt-exchange.org/org/devshare/designing-birt-reports/1507-de-api-add-chart-with-drill-through/

Jason

On 5/8/2012 12:21 AM, devi priyanka wrote:
> Hi Jason,
>
> Yes i want an example to implement Drill-through charts using java BIRT
> API. I have done Drill-through tables using java BIRT API.
>
>
> Thanks in Advance
> Priyanka
Re: Drill Through (Hyperlinks) is not working in remote server [message #870812 is a reply to message #870554] Wed, 09 May 2012 18:40 Go to previous messageGo to next message
Ope Ademulegun is currently offline Ope AdemulegunFriend
Messages: 1
Registered: May 2012
Junior Member

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
Re: Drill Through (Hyperlinks) is not working in remote server [message #870837 is a reply to message #870812] Wed, 09 May 2012 19:26 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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
Previous Topic:Creating a state matrix in a report need help or example
Next Topic:Birt mavenization
Goto Forum:
  


Current Time: Thu Apr 18 07:45:33 GMT 2024

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

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

Back to the top