Search:
Namespaces
Discussions
.NET v1.1
Feedback
What is best technique for dynamically formatted page content
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngarchitecture' list
.
liz kaplan
I am looking for advice on how best to create HTML report pages given
the new features of .net. Ultimately, I'd like to adapt a more object
oriented approach to looping thru rows of data and selectively
formatting particular lines of output. I will have several different
basic report styles so I want to get established with the best
technique. All my trials seem to have problems and I am sure there is a
more robust way to solve the issue.
I am seeking a tabular type report built by looping through a resultset
(from sqldatareader). The code needs to be recognize changes in the
values of certain columns (representing control breaks) and change CSS
styles accordingly, complete the display of the detail line, until done.
Visually, a shell of this might look like:
xxxxxxx (largest font for major
control break)
yyyyyy (secondary control
break)
zzzzzzz (detail line
1)
zzzzzzz (detail line
n)
yyyyyy (change in content of
secondary control column)
... (etc.
xxxxxxx (change in content of major
control column)
I cannot see how a datagrid could handle this (perhaps it could ??), so
I approached it 3 different ways:
My first approach was basically like the old ASP style with the
interleaving of HTML and ASP code (in VB). It works but the visual
designer keeps messing up the format of the page and the resulting code
is a mess to read and to maintain/enhance in the future.
My second approach was to try User Controls (primarily HTML tables
containing ASP labels).
For example:
<TD>
<ASP:LABEL ID="lblDetailColumn1"
RUNAT=SERVER></ASP:LABEL>
</TD>
All the looping was done in the ASPX.VB code behind file. I had problems
with this 2nd approach but it may be my inexperience with .net. From
what I've read tho, this seems the most promising and modern of
techniques.
My 3rd approach was essentially a RESPONSE.WRITE style where all code
was handled in the ASPX.VB code file (no visual components). While this
worked too, it seemed like too much work moving HTML formatting stuff
out to the page.
Ultimately, I'd like to adapt a more object oriented approach to looping
thru rows of data and selectively formatting particular lines of output.
I will have several different basic report styles so I want to get
established with the best technique.
I investigated and played with Crystal Reports a bit and found too many
problems to be confident about investing in that particular learning
curve and eventually I'd like to do quite complicated reports. I am very
interested in your guidance on these issues. Thanks in advance.
Reply to this message...
Dave Cline
Formatting output for HTML - sounds like a job for XSLT.
Is there anyway to get your data into various of XML? And have an XSLT
built for each data layout? I know that a
DataSet
can spit XML. If you
could determine a field naming convention which would allow you to predispose
format you might get away with this.
Hey Dan Wahlin - is this possible?
--
Dave Cline
Click here to reveal e-mail address
www.bangeye.com/
801-796-3413
---- liz kaplan <
Click here to reveal e-mail address
> wrote:
[Original message clipped]
Reply to this message...
Mark Feinholz
XSLT is definitely a solid approach for building HTML reports to either
be displayed in a browser or printed from a hidden iframe. I built an
entire reporting infrastructure for an intranet app using stored procs
that return xml, xslt templates that format reports (page breaks, column
headers repeated at the top of each page, totals, sub totals, sub
reports, etc) and the IE 5.5 Printer Template functionality for
printing.
You have to make a significant inventment in learning XSLT though. To
get truly functional report formatting you can't be a casual XSLT
programmer. This leads of course to a development and ongoing
maintenance cost for this approach - as opposed to using a vendor
reporting tool such as Crystal.
The power of returning XML from stored procedures is limitless when it
comes to designing the data for the report and pulling it from
where-ever it is in the relational db. And of course the xml can come
from any other source outside of the DB as well.
Again, the real problem with this approach is that the declarative XSLT
programming model is kind of a way of life more than just a simple tool
for creating reports and you will probably need to have at least one
person on your team ready to adopt it!
Mark.
-----Original Message-----
From: Dave Cline [mailto:
Click here to reveal e-mail address
]
Sent: Friday, June 07, 2002 10:02 AM
To: aspngarchitecture
Subject: [aspngarchitecture] Re: What is best technique for dynamically
formatted page content
Formatting output for HTML - sounds like a job for XSLT.
Is there anyway to get your data into various of XML? And have an XSLT
built for each data layout? I know that a
DataSet
can spit XML. If you
could determine a field naming convention which would allow you to
predispose
format you might get away with this.
Hey Dan Wahlin - is this possible?
--
Dave Cline
Click here to reveal e-mail address
www.bangeye.com/
801-796-3413
---- liz kaplan <
Click here to reveal e-mail address
> wrote:
[Original message clipped]
| [aspngarchitecture] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngarchitecture.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
System.Data.DataSet
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com