Skip to main content



      Home
Home » Archived » BIRT » How to get report list?
How to get report list? [message #142013] Thu, 09 March 2006 08:21 Go to next message
Eclipse UserFriend
Originally posted by: attacus.narod.ru

Hello,
Have you any idea how to retreive a list of reports instulled on current
BIRT-viewer web application?
Thanks.
Re: How to get report list? [message #142178 is a reply to message #142013] Thu, 09 March 2006 10:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladperl.semanticprogrammer.org

> Have you any idea how to retreive a list of reports instulled on current
> BIRT-viewer web application?

You need modified index.jsp

Here is example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>Statistics Center</title>

<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1"/>

<meta http-equiv="Content-Language" content="en-us"/>

<link href="style/screen.css" rel="stylesheet" type="text/css"/>

</head>

<body>

<div id="page">

<div id="header" class="clearfix">

<img src="image/logo.jpg" id="logo"/>

<div class="title">Statistics Center</div>

</div>

<div id="body">

<div class="menu-box">

<ul>

<li><a href="<%= request.getContextPath( ) +
"/frameset?__report=report/visits-by-entity.rptdesign" %>">Visits By
Entity</a></li>

<li><a href="<%= request.getContextPath( ) +
"/frameset?__report=report/visits-by-entity-month.rptdesign" %>">Visits By
Entity Monthly</a></li>

<li><a href="<%= request.getContextPath( ) +
"/frameset?__report=report/visits-by-dept-provider.rptdesign " %>">Visits By
Department and Provider</a></li>

<li><a href="<%= request.getContextPath( ) +
"/frameset?__report=report/procedures-by-dept.rptdesign" %>">Procedures By
Department</a></li>

<li><a href="<%= request.getContextPath( ) +
"/frameset?__report=report/hospital-admission.rptdesign" %>">Hospital
Admission</a></li>

<li><a href="<%= request.getContextPath( ) +
"/frameset?__report=report/duplicate-patients.rptdesign" %>">Duplicate
Patients</a></li>

</ul>

</div>

</div>

<div id="footer">

<div id="copyright">&copy; 2006 MedEnterprise Portal</div>

</div>

</div>

</body>

</html>

My reports located under folder "report".
Re: How to get report list? [message #142888 is a reply to message #142178] Fri, 10 March 2006 11:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: attacus.narod.ru

Thank you, but I meant other. Let we have the web application with BIRT
reports. If I add one more *.rptdesign file to the app directory, it would
be great to see this report in the list WITHOUT rewriting any jsp code. Is
it possible to get this info dynamically directly from *.rptdesign files?




"Vladimir" <vladperl@semanticprogrammer.org>
Re: How to get report list? [message #143043 is a reply to message #142888] Fri, 10 March 2006 14:32 Go to previous message
Eclipse UserFriend
Nickolai Ivshin wrote:

> Thank you, but I meant other. Let we have the web application with BIRT
> reports. If I add one more *.rptdesign file to the app directory, it would
> be great to see this report in the list WITHOUT rewriting any jsp code. Is
> it possible to get this info dynamically directly from *.rptdesign files?

Yes. it's possible.
You can find how to do it by link:

http://www.eclipse.org/birt/phoenix/examples/integrating/dyn amicparameters/


ParamServlet.java:

public Vector getFileList() {
Vector fileList = new Vector();

File dir = new File(m_ReportsLocation);

String[] children = dir.list();
if (children == null) {
return fileList;
} else {
for (int i = 0; i < children.length; i++) {
fileList.add(children[i]);
}
}

return fileList;
}

Params.jsp:

//get a list of the reports in the reports folder
Vector fileList = ps.getFileList();
String selectReportHtmlString = "";
selectReportHtmlString = ps.makeReportSelectionComboBox("selectReport",
fileList, request.getParameter("report"));
Previous Topic:Is there any way to view .rptdesign file resides in the war file?
Next Topic:Getting Charts to line up vertically
Goto Forum:
  


Current Time: Sun Jun 08 17:28:13 EDT 2025

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

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

Back to the top