Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 14th, 2004, 06:34 PM
J_Schatz J_Schatz is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Lisle, IL
Posts: 1 J_Schatz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Sorting records in a sub-report

Let's say I have a fleet of cars and each car has maintenance events such as oil changes, brakes and
so forth. I want to produce a report (MS Access 2000 as client with SQL Server 7)
that lists all the cars in my fleet. For each car in the report, I also want
a sub-report showing the maintenance actions applied to a given car. I can do this now using a
primary form with an imbedded subform, linking the
car ID between the parent/child reports. This works great when I use a view. The problem is that I would like to sort
the records in the sub-report by the Date field. SQL server does not support the ORDER BY clause in
views. The "Order By" and "Order By On" property for the subform does not sort the records when the form is
acting as a sub-report. If I run the sub-report by itself (not as a sub-report) then the sorting works. I then tried a stored procedure, which does support the ORDER BY clause, as my record source
for the sub-report. When I run this, the entire set of maintenance records is shown for each car. It seems that
the parent/child linking field is being ignored. I am beginning to conclude that SQL server does not fully support
sub-reports when the record source is a stored procedure. I have looked in my reference books and online and am unable
to find a clearly written statement that says that I cannot use a stored procedure for something like this. Sorting
the records in a sub-report seems like a reasonable thing to do. Does SQL server not support someting like this? I am open to suggestions. Thanks for your help.

Jim

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Sorting records in a sub-report


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT