473,379 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Sorting Subreport Problem

29
Hi – I’ll try to explain best I can: I have two tables – Table 1 has two fields ‘ID’ and ‘Employee name’; it’s linked to Table 2 which has three fields ‘ID’, ‘CodeName’ and ‘Hours’. When data is entered it looks like this:
ID Name
1 John Doe
Table 2
ID CodeName Hours
1 Code 20 30.00
1 Code 30 20.00

I created a report with Table 2 so it’s sorted by CodeName. I put Table 1 as subreport. I cannot get the subreport to alphabetize Employee Names can this be done?

Thanks and I hope that made sense!
Oct 18 '07 #1
12 2235
Rabbit
12,516 Expert Mod 8TB
Hi – I’ll try to explain best I can: I have two tables – Table 1 has two fields ‘ID’ and ‘Employee name’; it’s linked to Table 2 which has three fields ‘ID’, ‘CodeName’ and ‘Hours’. When data is entered it looks like this:
ID Name
1 John Doe
Table 2
ID CodeName Hours
1 Code 20 30.00
1 Code 30 20.00

I created a report with Table 2 so it’s sorted by CodeName. I put Table 1 as subreport. I cannot get the subreport to alphabetize Employee Names can this be done?

Thanks and I hope that made sense!
What did you try that didn't work?
Oct 18 '07 #2
RiRo
4
Hi – I’ll try to explain best I can: I have two tables – Table 1 has two fields ‘ID’ and ‘Employee name’; it’s linked to Table 2 which has three fields ‘ID’, ‘CodeName’ and ‘Hours’. When data is entered it looks like this:
ID Name
1 John Doe
Table 2
ID CodeName Hours
1 Code 20 30.00
1 Code 30 20.00

I created a report with Table 2 so it’s sorted by CodeName. I put Table 1 as subreport. I cannot get the subreport to alphabetize Employee Names can this be done?

Thanks and I hope that made sense!
Did you try using the Sorting/Grouping tool for your subreport?
RiRo
Oct 18 '07 #3
rgsw
29
What did you try that didn't work?
I tried in Event on open in the report: Me.Orderby ="Employee Name". Me.OrderByOn=True. I've tried a ComboBox with employee names and to sort by combo box. I have sorted in subreport but when open through the report it doesn't work.
Oct 18 '07 #4
rgsw
29
Did you try using the Sorting/Grouping tool for your subreport?
RiRo
Thanks for your reply - yes I did see below response.
Oct 18 '07 #5
Rabbit
12,516 Expert Mod 8TB
The sorting/grouping tool that Riro mentioned is different than the OrderBy OrderByOn property. The sorting/grouping tool is accessed from View > Sorting and Grouping
Oct 18 '07 #6
rgsw
29
The sorting/grouping tool that Riro mentioned is different than the OrderBy OrderByOn property. The sorting/grouping tool is accessed from View > Sorting and Grouping
Yes, what I meant in reply to Riro was to see reply to you, which showed that I had also tried that in sorting the subreport. Unfortuantely, that didn't work either. It did sort in subreport correctly, but when I openend the report the subreport did not sort correctly.

I have been searching and still can't seem to find answer. Is this something that can't be done?

Thanks for all replies!
Oct 18 '07 #7
Rabbit
12,516 Expert Mod 8TB
Let's get some more info.

How is your main report set up?
How if your sub report set up?
What's in each section of each report?
Oct 19 '07 #8
rgsw
29
Let's get some more info.

How is your main report set up?
How if your sub report set up?
What's in each section of each report?
I wouldn't know how to go about explaining how it's set up - as you can see from my beginning that it didn't make much sense. What I up doing is creating the ID field as text and using last names instead of the auto number - since the ID fields are linked then the subreport alphebetizes the names since the ID code is their last name. Perhaps someone else will have this problem and will write in and will be able to explain better because I would like to know if it's possible. Thanks for your reply!
Oct 20 '07 #9
Rabbit
12,516 Expert Mod 8TB
The reason I ask how it's set up is because it has an impact on how the report is rendered. But if you found a work around, that's good too.
Oct 20 '07 #10
hjozinovic
167 100+
Hi there!

Have you tried to make a new query based on your Table 2. You can then sort records in that query and make it to be the record source for your subreport.

Just a thought....
Hrvoje
Oct 24 '07 #11
rgsw
29
Hi -

Yes I tried that too but didn't work. The fault I think is how it was set up. I just solved it by changing ID to text instead of numbers. Thanks for your reply.
Oct 28 '07 #12
rgsw
29
I'm such an idiot I can't believe I didn't think of this earlier....especially before I changed the ID's and it's so basic...but I created a query with Table2 AND Table1 then used that query for my report and I was able to sort everything in order.
Oct 28 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: dixie | last post by:
I have a report with a subreport. The source object for this subreport varies according to the value of a field in a table. I am trying to programmatically set the object source for the subreport...
4
by: Wayne | last post by:
rr@kristin.school.nz (Wayne) wrote in message news:<7ec36840.0403301824.16f2cd9f@posting.google.com>... > I have a subreport in my report and when it contains exactly one row, > it works fine. In...
9
by: Downstreamer | last post by:
Design is as follows: A form for the user to input criteria to be used as the where part of the report's recordsource. This includes a multiselect list box as part of the criteria selection. ...
6
by: Steve Jorgensen | last post by:
I tried to fix a problem for a client today in which report sections and even individual text controls in some of their reports are being split across page boundaries. Of course, I was thinking...
3
by: lorirobn | last post by:
Hello, I have a report which uses a subreport. When I run the report, I get "Enter Parameter Value" error message for "tblGuestRoom". I click ok and the report seems to work fine. I...
8
by: | last post by:
hi, i have a form on which a user can choose specific criteria such as dates etc, in order to filter the report that is called from the form. i do this by using the Where section of the...
17
by: =?Utf-8?B?SGVyYg==?= | last post by:
I have created a report and subreport in VB/ASP.NET. The report works fine but the subreport will not display. The subreport, when displayed as a standalone report, works fine. Any help I can...
25
by: hjozinovic | last post by:
Hi! I have a MainForm and a SubForm on it. They're linked and can be filtered, sorted etc... I designed MainReport and SubReport that should match filter and sort criteria from MainForm and...
0
by: EManning | last post by:
Using 2003. I've got a main report with a subreport and within that subreport is another subreport, all bound. The detail in the 2nd subreport is repeated multiple times for some reason. The...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.