I'm using VB.NET (2005) to set up a 'home page' for what will eventually be a slew of single-page reports on our corporate intranet site.
I don't want to be bogged down with a lot of table editing when I go to put a report up for consumption, so I thought I'd just have a simple DataGrid with report name/description/URL, populated by an XML file.
I've got the mechanics of bringing the XML into the DataGrid down, but I don't like the look of having the URL in a separate column.
How would I go about having a two columns, with the Report Name hyperlinked, and the Description as 'plain text'? Also, if at all possible I would like the report to load in the same window that called it, but all I know how to do is to open a new window. Any pointers on that would also be appreciated.
Here's what I have so far...
(Relevant .aspx code)
And the CodeFile...
And the XML file...
Sorry to be so verbose, I'm just kind of stuck for ideas here.
I don't want to be bogged down with a lot of table editing when I go to put a report up for consumption, so I thought I'd just have a simple DataGrid with report name/description/URL, populated by an XML file.
I've got the mechanics of bringing the XML into the DataGrid down, but I don't like the look of having the URL in a separate column.
How would I go about having a two columns, with the Report Name hyperlinked, and the Description as 'plain text'? Also, if at all possible I would like the report to load in the same window that called it, but all I know how to do is to open a new window. Any pointers on that would also be appreciated.
Here's what I have so far...
(Relevant .aspx code)
Code:
<html>
[...]
<tr >
<td align="center">
<asp:DataGrid
runat="server"
ID="dgGAReports"
SkinID="MainDG"
AutoGenerateColumns="false">
<Columns>
<asp:BoundColumn
DataField="ReportName"
HeaderText="Report Name">
</asp:BoundColumn>
<asp:BoundColumn
DataField="ReportDescription"
HeaderText="Report Description">
</asp:BoundColumn>
<asp:HyperLinkColumn
DataTextField="ReportURL"
DataNavigateURLFormatString="javascript:var w=window.open('details.aspx?id={0}', '', 'width=1280,height=250,left=0,top=25,directories=no,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes');"
DatanavigateURLField="ReportURL"
HeaderText="Link">
</asp:HyperLinkColumn>
</Columns>
</asp:DataGrid></td>
</tr>
[...]
</html>
And the CodeFile...
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim tGADataSet As New DataSet()
tGADataSet.ReadXml("\\ReportServer\GAR\GAReportURLS.xml")
dgGAReports.DataSource = tGADataSet
dgGAReports.DataBind()
lblGA.Text = "Finished Reports"
End Sub
And the XML file...
Code:
<?xml version="1.0" encoding="utf-8" ?>
<ReportList>
<BetaReport>
<ReportName>Summary Overview GA</ReportName>
<ReportDescription>This is an overview of the summary information.</ReportDescription>
<ReportURL>\\ReportServer\GAR\GASummary.aspx</ReportURL>
</BetaReport>
<BetaReport>
<ReportName>Overview Summary GA</ReportName>
<ReportDescription>This is a summary of the overview information.</ReportDescription>
<ReportURL>\\ReportServer\GAR\GAOverview.aspx</ReportURL>
</BetaReport>
</ReportList>
Sorry to be so verbose, I'm just kind of stuck for ideas here.