multiple column reports

buratti

Registered User.
Local time
Today, 12:50
Joined
Jul 8, 2009
Messages
234
I am trying to create a report with 2 colums of data, but if at all possible, I need each column to be filtered. Example... The report is a dialy sheet of new customers and canceled customers, sorted by the driver that services those customers. In column 1 I need the list of NEW customers and in Column 2 I need the list of CANCELED customers. The reports underlying query includes both new and canceled customers. The end result would need to appear something like this:

John Doe
New Customers: Canceled Customers:
New customer 1 Canceled customer 1
New customer 2 Canceled customer 2
New Customer 3.... Canceled customer 3...

Is something like this possible, and if so, how do I do it?
 
Last edited:
Well thats what I kinda came up with, but can't exactly figure out the 2 column thing with the subreport. But anyway, I've decided to eliminate the 2 column display and just use the subreport and have the second list (canceled customers) under the first (new customers) which works, but now brings up a different problem. I restructured the main reports underlying query to include only NEW customers (grouped by driver), and the subreport to include only CANCELED customers. The subreport is placed in the drivers grouping footer. Everything works and displays great, except for one thing. If a driver has no new customers in the report, then it wont display any canceled customers for that same driver (No record in the main report to display the subreport). Any suggestions around this problem, or suggestions on how to maybe restructure it agian to work the way I need.
 
Actually, I originally meant that you would have a report shell and both of the reports would be subreports on that shell (you could put them side by side that way).

What are you linking on in the Master/Child property of the subform. You should be linking, I would think, on DriverID or something like that, AND the subreport will need to be in just the right section as well.
 
Oh thats a good idea. I never thought of two subreports side by side. Right now you are correct, I am linking master/child on driver ID, and hence if (right now) there is no record in the master report the subreport will not show. I'm gonna try your suggestion now, but will I need to link each subreport to each other somehow, and how can I be sure that example, if Driver A has no NEW customers (column 1 is blank) column 2 will still display data, and every thing under it (the next driver group)lining up correctly?
 
OK if anybody is still following this I figured it out but have an interesting issue, but I think it just might be a bug in access. I got that theory from reading this and my situation is not exactly the same but similar: http://www.utteraccess.com/forums/showthreaded.php?Cat=&Number=1449839&page=&view=&sb=5&o=&vc=1

Like BobLarson's suggestion, I created a main report "shell" based on the drivers table and created two subreports queried to contain new customers in one and canceled customers in the other. Both subreports are linked Child/Master via DriverID. The only way I could figure to filter each day was to add an unbound text box named txtDays to the main report and add second Child/Master link of txtDays and Day ID.
Then on the control to open the report the criteria section selected the driver to open and I passed an openargs value for the day and entered it in the unbound txtDays field in the onOpen event of the report. Theoretically that should/does work, but when I open the report the header displays the correct driver and day information, but the subforms are blank.
Now if I open the report directly from the Access Objects database window everything is displayed perfectly (I have to modify the value of the txtDays field though first).I changed the view from the opening control from acviewPrieview to acviewReport and now it works. Why would that make a difference, and what really is the difference between those two view modes? Could it really be a bug in Access 2007
 
Any chance you can post your database here so we can take a look?
 
Yeas sure give me a little bit to remove personal data and shrink it and I'll post it in a few
 
OK here it is. Open the report from the Daily Driver Reports Daig form to see the issue I was talking about. (and opening straight from the database makes no issue) Then change the afterupdate event of the preview button to acviewreport and then everything works. It doesn't really matter which view I "preview" (acviewreport or acviewpreview) the report in, as long as the Print button prints it to the printer correctly. Unfortunately I have not tested if the print button works or not due to no printer connected to my PC at the moment. Thanks for looking at it!!!
 

Attachments

Users who are viewing this thread

Back
Top Bottom