Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying eportfolio lite

Status
Not open for further replies.

marefin

Programmer
Apr 21, 2004
1
CA
I'm using eportfolio lite. Is there a way to modify the code
so that when a list of the reports is displayed, "report description" and "created by" is also displayed.

Heres the code where the report list is displayed

Function outputReports(dirItems)
Dim i, item, stopIndex
if (m_nStartIndex + nMaxReportsDisplay < dirItems.count) then
stopIndex = m_nStartIndex + nMaxReportsDisplay
else
stopIndex = dirItems.count
end if
Response.Write "<td>"
For i = m_nStartIndex to stopIndex - 1
'if (i mod nMaxReportsPerRow = 0) then Response.Write "<tr>" + vbCrLf
Set item = dirItems.Item(i)

' Generate the correct link for the viewer
Dim sViewerLink
if (m_Viewer = "0" or m_Viewer = "3") then ' ActiveX Viewer or Java Viewer
sViewerLink = "href='rptServer/Start.asp?ReportName=" + Server.URLEncode(item.UID.StringValue("path")) + "&Viewer=" + m_Viewer + "'"
elseif m_Viewer = "1" then ' Page Viewer
sViewerLink = "href='HTMLViewers/pageViewer.asp?ReportName=" + Server.URLEncode(item.UID.StringValue("path")) + "'"
elseif m_Viewer = "4" then ' Parts Viewer
sViewerLink = "href='HTMLViewers/partsViewer.asp?ReportName=" + Server.URLEncode(item.UID.StringValue("path")) + "'"
else ' Default to interactive viewer
sViewerLink = "href='HTMLViewers/interactiveViewer.asp?ReportName=" + Server.URLEncode(item.UID.StringValue("path")) + "'"
end if

Response.Write "<table><tbody><tr>" + vbCrLf
Response.Write " <td vAlign='top'><a class='list' " + sViewerLink + " TARGET='_blank'>" + vbCrLf
Response.Write " <img class='list' src='include/thumbnail.gif' width='40' align='left' border='1'></a></td>" + vbCrLf
Response.Write " <td vAlign='top'><div class='list'>" + Server.HTMLEncode(item.Name) + "<br>" + vbCrLf
Response.Write " <a class='list' " + sViewerLink + " TARGET='_blank'>"

Response.Write L_VIEW + "</a>"
' Add greyed out links for Schedule and History
Response.Write "</div></td></tr></tbody></table><BR>" + vbCrLf

'if ((i mod nMaxReportsPerRow = nMaxReportsPerRow - 1) and (i <> stopIndex - 1)) then _
' Response.Write "<tr><td colSpan='" + CStr(nMaxReportsPerRow) + "'><hr SIZE='0'></td></tr>" + vbCrLf
next
Response.Write "</td>"
End Function

This is how the function is called
=========================================================
<%
Dim ObjectFactory
Set ObjectFactory = CreateObject("CrystalReports.ObjectFactory.2")

' Create ConnectionDirMgr
Dim m_RptAppSession, m_DirMgr
Set m_RptAppSession = ObjectFactory.CreateObject("CrystalReports.ReportAppSession")
m_RptAppSession.Initialize
Set m_DirMgr = m_RptAppSession.CreateService("CrystalReports.ConnectionDirManager.2")
m_DirMgr.Open crDirectoryItemTypeAllFolders or crDirectoryItemTypeReport

Dim m_Folder, m_Nodes, m_RootItem
m_Folder = Request.QueryString.Item("folder")
Set m_RootItem = ObjectFactory.CreateObject("CrystalReports.ConnectionDirectoryItem")
Set m_Nodes = getReportsAndFolders(m_Folder)

Dim m_ReportNodes, m_FolderNodes
Set m_ReportNodes = ObjectFactory.CreateObject("CrystalReports.DirectoryItems")
Set m_FolderNodes = ObjectFactory.CreateObject("CrystalReports.DirectoryItems")

outputReports(m_ReportNodes) %>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top