已答复 Creating report layout

  • Monday, August 20, 2012 7:47 PM
     
     

    Hi all,

    I'm using Access 2007, and I'm experimenting with a private project.
    The problem is that I don't know how to fix the layout so that it looks like I want.
    I've attached two pictures with various detail on how the layout is wrong and how I want to fix it. If anyone could guide me on this, I'd be grateful.

    The images refer to "country," btw, which is essentially the title in the images. All the records in my db contains country, then staty (statue) and some other information.
    The report should basically be structured in such a way that each record contains a country, statue and some other info. Then, each page of the report should contain the country as the page title, then three columns of statues, with associated information.
    You should be able to see the problems I am facing below.
    Hopefully you can make it out what I'm trying to say in the images.

    Any help would be appreciated. If you need to take a peek at the database file, I can attach it (it's an experimentation, btw, so it may not be optimal).

All Replies

  • Monday, August 20, 2012 7:53 PM
     
     

    It would be helpful to see your database; however, you can't attach files in this forum (don't ask me why...)

    You can create a copy of the database, strip away everything that isn't relevant to the problem, as well as all sensitive information, then zip this copy and make it available through one of the websites that let you upload and share a file, such as Windows Live SkyDrive (https://skydrive.live.com) or DropBox (http://www.dropbox.com). Post a link to the uploaded and shared file in a reply here.


    Regards, Hans Vogelaar

  • Monday, August 20, 2012 8:03 PM
     
     

    Link to database: https://dl.dropbox.com/u/2167374/Database1.accdb

    The report should be tentatively named "Länder," the only report in existence.


    • Edited by Natsuki Monday, August 20, 2012 8:06 PM
    •  
  • Monday, August 20, 2012 8:31 PM
     
     Answered

    Thanks. You don't need a query as record source for the report, the Statyer table will do fine: it contains all information that you need.

    The report should be grouped by Land first, then by Staty, with group headers for both. The text box for Land should be bound to the Land field from the Statyer table, and placed in the group header for Land.

    To center the Land title on the page, increase the left margin - with margins of 6.35 mm, the content of the report is not centered vertically but shifted towards the left hand side.

    There is no need for combo boxes on the form - text boxes display the values OK.

    I have uploaded a modified version to SkyDrive: http://sdrv.ms/PyZty7

    Oh wait, I forgot to do something about the duplicated records. Stay tuned.


    Regards, Hans Vogelaar


  • Monday, August 20, 2012 8:44 PM
     
     
    I have uploaded a slightly modified version to SkyDrive (link: see above)

    Regards, Hans Vogelaar

  • Monday, August 20, 2012 8:48 PM
     
     

    Thanks.

    I suppose that takes care of one problem.
    Actually, the report was generated by the wizard, and on another table design, which might explain why it had a query instead of a table. I'm experimenting right now, but I'm going to make the report based on a query, possibly. I want to be able to essentially set criterias on the information queried and then display that as a report.

    Anyway, you fixed the vertical space (so thanks for that!), and if it is as you say, the centering (can't really verify that, though...), but the fundamental problem still exists.
    Each column should be a new record. Right now they're just duplicates of the same record.
    The country sort order is still wrong, too.

    Btw, ugh, Microsoft destroyed SkyDrive, too. First Visual Studio, then Office, and now SkyDrive. It looks bloody horrible. And such a bloody waste of space, too, in SkyDrive. What are they thinking?
    • Edited by Natsuki Monday, August 20, 2012 8:49 PM
    •  
  • Monday, August 20, 2012 8:56 PM
     
     Answered

    Btw, ugh, Microsoft destroyed SkyDrive, too. First Visual Studio, then Office, and now SkyDrive. It looks bloody horrible. And such a bloody waste of space, too, in SkyDrive. What are they thinking?

    I uploaded a modified version.

    I guess Microsoft is trying to give everything a retro 1980's look...


    Regards, Hans Vogelaar

    • Marked As Answer by Natsuki Tuesday, August 21, 2012 8:17 AM
    •  
  • Monday, August 20, 2012 9:22 PM
     
     

    I can see the changes you made, but I don't get how Access is interpreting the design to create the report.
    I see you put "3" into columns for page setup. Can you explain your through process on the page flow, or however to put it? Basically, how do you know Access will do the right thing?

    Also, the page looks a bit sparse now. Thinking a little on it, putting multiple countries on the same page might not be such a bad idea, after all, if it is possible.

  • Monday, August 20, 2012 9:45 PM
     
     Answered

    I set the number of columns to 3, column width to about 6 cm and column layout to across, then down.

    If you want multiple countries on a page, you'll run into the problem that a group header cannot span multiple columns, so it can't be centered on the page. If it would be OK to have narrow country headers, you could create a really compact report.

    Alternatively, you could create a single-column report displaying countries with a three-column subreport. I have added such a report/subreport to the database on SkyDrive.


    Regards, Hans Vogelaar

    • Marked As Answer by Natsuki Tuesday, August 21, 2012 8:17 AM
    •  
  • Tuesday, August 21, 2012 4:26 AM
     
     

    Thanks. One step closer.

    I tried adding more data to the database to see how it reacted, and there are still a few things I'm unhappy about.
    New link: https://dl.dropbox.com/u/2167374/L%C3%A4nder.accdb

    As you can see, it wraps the whole report onto a new page, with the title being left on its own page (what the heck?).
    Also, checking on the last page, is it possible to add a title over the last "staty"?

    Finally, is it possible to use a custom sort order? I'm interested in my specific sorting order for countries, not alphabetical.

  • Tuesday, August 21, 2012 5:44 AM
     
     Answered

    Set the "Keep Together" property of the Detail section of rptLänder to No.

    Do you want to repeat the country name on each page? If so, set the Repeat Section property of the group header to Yes.

    For a custom sort order, add a number field (for example named Sort) to the Länder table, and use this to specify the sort order of the countries.

    Group the report on this number field instead of on the Land field.


    Regards, Hans Vogelaar

    • Marked As Answer by Natsuki Tuesday, August 21, 2012 8:17 AM
    •  
  • Tuesday, August 21, 2012 8:17 AM
     
     

    That clears up every question I had right now.

    Again, a thousand thanks. Now I know where to return when I have more doubts!