The grid as a reportwriter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've planned an app where there's a lot of columns in a table and because of
that I'd like to split up the columns when presenting them in a datagrid.

I'll give you an example. It's always one year between every row

row _type descr amount remAmount rate interest accruedInterest
1 1 Claim1 100000 100000 10 10000 10000
2 1 Claim2 100000 200000 10 20000 30000
row _type descr amount remAmount myRemPart taxRemPart accrInt myAccPart
3 2 Paym1 -200000 30000 119000 51000 0
21000
row _type descr amount remAmount rate interest accruedInt
4 1 Claim3 100000 130000 10 13000 ......

As you can see both claims and payments are in the same table (grid) with
different headers. And in row 3 you can see that total amount is first taken
from accruedinterest and then from remainderamount columns.

I'd like to have both claims( demands ) and payments to show up in the same
grid, so to speak.

Any ideas?

TIA

Kenneth P
 
Hi Kenneth,

You can apply crystal reports to create and show
complicated report.

Elton Wang
(e-mail address removed)
 
Hi Elton,

I know about reports and CR.

They don't apply here in the first place. I need a report to the screen,
most preferable in a grid, perhaps as a drill down gridreport. When that's
ok, I'll go for the report on paper.

Any ideas?

Kenneth P
 
I'm not really clear on exactly what you want to do but here's a couple of
ideas...

First, look at how an ASP.NET DataGrid is actually rendered. It's nothing
more than an HTML table where each <TR> contains data from one row in the
DataGrid's data source and each individual item in that row is rendered as a
<TD> within a given <TR>. You can dress that up quite a bit by using item
templates but that rendering scheme still locks you into a set of <TR> tags,
one for each row of data.

DataLists and DataRepeaters both provide more flexibility. Yet, things work
very
similarly in the sense that they are multiple-value databound controls...so
whatever is rendered is rendered n times, depending on how many row of data
are present in the data source.

The example you gave suggests a Data List. In a DataList, you can put item
values into separate <TR>s, even when they are in the same row of data. This
is because the <TR> and <TD> tags are explicitly coded in the .aspx file;
they are not impied as in the case of a DataGrid. Things are, by default,
still rendered in a <TABLE>.

A DataRepeater is even more chaotic. No tabluar form is implied, it just
pretty much just spits out the .aspx code as is, except that repitition
is still impled and data binding still occurs. Your mention of a drilldown
grid
makes me think you might need a repeater that has one or more of user
controls embedded in it. As the user clicks various options within the user
controls, the display is changed - possibly by client-side scripts that open
new windows, make things visible or not visible...or whatever you need it to
do.

MSDN has more information but honestly, you may want to look elsewhere. I
never found the MSDN info. on DataGrids, DataLiasts, and DataRepeaters to be
especially helpful.

Good Luck.
 
Back
Top