PC Review


Reply
Thread Tools Rate Thread

Datagrid/repeater like a report

 
 
voidfill3d@yahoo.com
Guest
Posts: n/a
 
      9th Aug 2005
I do not know if this is possible with a datagrid or a repeater or some
other object, but I am looking to create a report via a table like
structure similar to that of a report you would create in MS Access.
For example:

Category1
----------------------------
ID Name Field1 Field2
1 Bob Data Data
3 Sally Data Data

Category2
----------------------------
ID Name Field1 Field2
2 Greg Data Data
4 Marge Data Data

Instead of the usual:

ID Name Field1 Field2 CategoryName
-------------------------------------------
1 Bob Data Data Category1
3 Sally Data Data Category1
2 Greg Data Data Category2
4 Marge Data Data Category2

I know how I could program it the long way, but I was wondering if
there was a way to do this with a datagrid or a repeater.

Can anyone help me out?

THANKS!

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
Guest
Posts: n/a
 
      9th Aug 2005
A DataGrid within a Repeater if you intend to move between pages on the
report would work fine: http://www.societopia.net/samples/repeater1.aspx.

If your report is static (no pagination) then you can simply use a repeater
within a repeater. You still need to program the OnItemDataBound event to
select the category.

---
Phillip Williams
http://www.societopia.net
http://www.webswapp.com

"(E-Mail Removed)" wrote:

> I do not know if this is possible with a datagrid or a repeater or some
> other object, but I am looking to create a report via a table like
> structure similar to that of a report you would create in MS Access.
> For example:
>
> Category1
> ----------------------------
> ID Name Field1 Field2
> 1 Bob Data Data
> 3 Sally Data Data
>
> Category2
> ----------------------------
> ID Name Field1 Field2
> 2 Greg Data Data
> 4 Marge Data Data
>
> Instead of the usual:
>
> ID Name Field1 Field2 CategoryName
> -------------------------------------------
> 1 Bob Data Data Category1
> 3 Sally Data Data Category1
> 2 Greg Data Data Category2
> 4 Marge Data Data Category2
>
> I know how I could program it the long way, but I was wondering if
> there was a way to do this with a datagrid or a repeater.
>
> Can anyone help me out?
>
> THANKS!
>
>

 
Reply With Quote
 
voidfill3d@yahoo.com
Guest
Posts: n/a
 
      10th Aug 2005
THANKS. I should have thought of that!

 
Reply With Quote
 
voidfill3d@yahoo.com
Guest
Posts: n/a
 
      10th Aug 2005
Actually, how would I do that since the current CategoryID has to be
thrown into a Stored Procedure (in my case).

 
Reply With Quote
 
=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
Guest
Posts: n/a
 
      10th Aug 2005
The source code is available from the sample I gave to you:
http://www.societopia.net/samples/repeater1.aspx

Basically on dataBinding the Repeater items I access the DataItem (which is
the dataRowView) and retrieve the CategoryID associated with that row. I use
that CategoryID to create a new view of the data for the child datagrid.
--
Phillip Williams
http://www.webswapp.com


"(E-Mail Removed)" wrote:

> Actually, how would I do that since the current CategoryID has to be
> thrown into a Stored Procedure (in my case).
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Datagrid, Repeater, or ??? dougloj Microsoft Access Reports 1 21st Nov 2008 09:01 PM
Add New Row to DataGrid or Repeater rwoo_98@yahoo.com Microsoft ASP .NET 2 4th Feb 2005 08:14 PM
Help with repeater and datagrid News Microsoft ASP .NET 2 30th Jun 2004 06:07 PM
Repeater Vs Datagrid =?Utf-8?B?UHVtcw==?= Microsoft ASP .NET 1 4th Feb 2004 05:25 PM
Repeater Vs Datagrid =?Utf-8?B?UHVtcw==?= Microsoft ADO .NET 1 4th Feb 2004 02:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:06 AM.