Showing posts with label author. Show all posts
Showing posts with label author. Show all posts

Sunday, March 11, 2012

Displaying Parent / Child / Grandchild data

I am working on an ASP.NET site to display information about authors and books. I'm working on the Author page right now and I'm having trouble getting it to display the data I want.

I'm trying to do everything with declarative controls and as little code-behind as possible.

I have a datasource on the main page that selects the Author data and provides this to a FormView. Inside the FormView is another datasource that takes the AuthorID as a parameter and selects the list of books, which is provided to a DataList.

Inside the DataList I display some limited Book information. I also want to display some child items of the Book (grandchildren of the author), for example other authors who contributed to that book, or alternative titles. I have tried using datasources in each DataList row with a parameter set to the BookID, and it works just great, but the response time is just not acceptable. Each datasource of possible several dozen is making its own call to the database and it's just too slow.

If I use code I can grab all the data in one operation and use relations in the DataBinding event (I believe) to select the data I want, but this is a bit cumbersome and I expect will cause trouble if I want to eventually use an ObjectDataSource.

Incidentally, on a display-only page I use the XMLDataSource and it works great, but I need read-write access on the Edit page.

Is there a good way to do what I'm trying to do?

Thanks,

Graham

Here's an alternative:

Instead of putting the books in a datalist you could put them in a gridview. Handle the row selected event of the gridview and programatically bind only the 'grandchild' details specific to the selected book.

|||

That's probably what I'll end up doing, but I'm trying to avoid code as much as possible. In code it's pretty simple to avoid many trips to the database when fetching information, at the cost of some added complexity. I'm just looking to see if there's an equivalent way to do that declaratively.

It would be nice if you could bind to a datasource, specify a data member, and also throw in some selection criteria - filter it at the bound control, not at the datasource level. That's similar to what you can do with the XMLDataSource and XPathSelect.

|||

Yeah I see what you're saying.I've never managed to getsomething like that working entirely declaratively though with asp.netcontrols. Even so, if you just do the grandchild stuff programaticallyit should only be a couple of lines of code.

You could take a look at some third party grid controls made by ComponentArt, Infragistics, Telerik etc.

Saturday, February 25, 2012

Display XML Hierarchies in Reporting Services

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author
To all,
I have read several posts that say SQL 2005 Reporting Services does not
display hierarchical XML data very well. It must first be flattened.
Is this true?
In my scenario, I capture hierarchical data and store it in an XML
column in a SQL2005 table. Now I need to display it in a Server Side
Report using SQL 2005 Reporting Services. This data will have any
number of descendants that I need to ensure is intact and visible on
the report.
What are my options to get it done?
And if it really can't be done in Reporting Services what other
approach would be worth looking into?
Thanks in advance,
RobI think Asif Sayed has an example on Code Project that may help you. The
dataset is not based on xml data but demonstrates a parent/child
relationship.
http://www.codeproject.com/useritems/RecursiveData.asp
Steve MunLeeuw
"Rob" <rclassen@.IDSTechNet.com> wrote in message
news:1161266421.322891.145750@.i3g2000cwc.googlegroups.com...
> Reply | Reply to Author | Forward | Print | Individual Message | Show
> original | Remove | Report Abuse | Find messages by this author
>
> To all,
> I have read several posts that say SQL 2005 Reporting Services does not
>
> display hierarchical XML data very well. It must first be flattened.
> Is this true?
>
> In my scenario, I capture hierarchical data and store it in an XML
> column in a SQL2005 table. Now I need to display it in a Server Side
> Report using SQL 2005 Reporting Services. This data will have any
> number of descendants that I need to ensure is intact and visible on
> the report.
>
> What are my options to get it done?
>
> And if it really can't be done in Reporting Services what other
> approach would be worth looking into?
>
> Thanks in advance,
>
> Rob
>

Sunday, February 19, 2012

Display Report AUTHOR and DESCRIPTION

What is the syntax to display the report property
fields within a textbox on the report header ?These properties are not exposed in the Report Object Model (which is
accessible from expressions within a report).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> What is the syntax to display the report property
> fields within a textbox on the report header ?|||"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> These properties are not exposed in the Report Object Model (which is
> accessible from expressions within a report).
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Dave" <davidldoyle@.yahoo.com> wrote in message
> news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > What is the syntax to display the report property
> > fields within a textbox on the report header ?
I did not understand your reply in parenthesis....Do you mean
properties are not available, or that they are within expressions
within a report.
Thank you.|||The author and description properties are not available to textboxes. Your
choices are to either hard code the values into a textbox(es) or to add the
information to a table and pull it into the report using a dataset.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.|||I meant that expressions in reports can only access information and metadata
that is exposed in the Report Object Model. This object model contains the
following collections: Fields, Reportitems, Parameters, Globals, User.
The properties for Author and Description are not exposed there. So you
cannot access them.
BTW: these properties are exposed in the Rendering Object Model, but you
would need to write your own custom rendering extension to take advantage of
that and it would still be very hard to solve your initial problem (show
these properties in header / footer).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.