• Quasi-crosstab format? (AXP 10.2627.2625)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Quasi-crosstab format? (AXP 10.2627.2625)

    Author
    Topic
    #365870

    i want to print a grid for hand fill-in using the Report generator.

    The ‘Row headings’ are Names.
    The ‘Column headings’ are weekdays of next month.
    There are NO values in the grid.

    Since I cant figure out how to do this with the Report Generator, i am assuming that i need to use one of the OCXs – i presume FlexGrid would be typical.

    Is there another way to do this? If not, where is the must useful documentation? The MSDN is not helpful to me, a first-time user of an ocx.

    Viewing 1 reply thread
    Author
    Replies
    • #565716

      Peter,

      Make an empty table with one field for each day of the month and one more field with the name ID.
      Make a query with the empty table and the table names linked by name id. Set relation to show all rows of the name table.
      Now you have your grid.
      Create a report based on the query or print the query
      See attachment

    • #565721

      Second thought,
      make the report based on you names, and put 31 rectangles beside the name. In the header put 31 labels with the day number.

      • #565743

        To piggyback on that thought, you could have code in the report to hide labels for days that aren’t used in that month, i.e., hide days 29 throught 31 for February in non-leap years. We do this with some reports in Access 97. Those are based on crosstab queries with column headings, and we simply hide a couple of controls depending on the month selected.

        • #565782

          Thanks Francois & Charlotte for the great ideas!

        • #565911

          i’ve been fumbling with the labels…

          Access names the labels 1_label, 2_label, etc, but trying to do something that begins with a digit in VBA is impossible.

          I renamed 1_label to a1_label, but i still can’t get to the Visible property. Where is it?

          • #565979

            It’s hidden and I can’t remember how to show it, but you can just type it in Me.Something.Visible=False

            • #566031

              It isn’t hidden. Bring up the properties sheet for the control. The Visible property in listed on the Format tab in Access 2k. I haven’t looked to see if that is different in XP.

          • #566032

            These are the labels in the report header? What’s wrong with lblDay1, lblDay2 … or even lbl1, lbl2, etc.? Microsoft still hasn’t figured out that while something_Label is better than just Label137, it still isn’t good. They “encourage” naming conventions but don’t use them in their own products. aflame

            Anyhow, I always rename my labels using the lbl tag to indicate it’s a label and adding a descriptive string that tells me what the label labels! That way, I don’t have to wonder when I look at a list of controls. grin

            The visible property can be set from code or from the properties sheet for the control.

            • #566035

              Yah, those are the label names, but in the detail header! Verrrrry inconvenient, because they have to be changed ere VB can grab them. puke

            • #566043

              The detail header? You have a report header and a page header and you have group headers. Have they added another kind of header in AXP?

              There are add-ins and code samples out there to apply naming conventions to your forms and reports. Helen Feddema has sample code on her site to apply the Leszynski naming conventions, and it has been updated to work with XP. Somebody has one for the Reddick conventions too but I can’t locate that one.

            • #566046

              woops – right! page Header. There are also Sorting and Grouping headers. Whether these are new to XP, shrug i havent been at this business long enough to know what’s new.

              However, I have been at the programming business long enough to reject ‘popular’ naming conventionsas being too too UGLY, and make reading code arduous. Like putting warts on my objects wartgun With all the comboboxes in the Access IDE that display Tables and Queries with ‘Table: Yourtable’, and ‘Query: Yourquery’, and icons all over the lot, I decided to discard the naming conventions in favor of my eyes. I did of course invent my own, which has a lot less ‘noise’.

            • #566159

              Since only a developer should ever *see* those objects, ugly doesn’t enter into it. Eyes don’t work in code, and naming conventions help enormously, especially when someone else has to maintain your code and figure out whether a variable is, in fact an object or a long or even a user-defined class or type.

              Actually, the “popular” naming conventions are NOT popular. It’s only those who have been doing this long enough to recognize the benefits who insist on using them. grin My own boss refuses to name tables using tags … but I’m working on him!

            • #566204

              The naming conventions were developed as a necessary self-defense against the poor design of the languages used for database work. I understand the paranoia involved!

              That your boss wont use them … could be like the situation of cucumbers in brine: the cucumbers get more pickled than the brine gets cucumbered. I assume you know which one you are in that scenario wink

            • #566238

              He uses naming conventions. He just doesn’t use them for tables.

              I prefer to name my tables with tags because that lets me define in the name what kind of a table it is, that is, what it’s used for. For example, I name my lookup tables tlkpWhatever and my join tables trelThisAndThat. That way, they sort together and I don’t have to wonder when I look at a table list and need to pick one to add to a query.

              The apps we maintain (commercial apps) have an extremely complex means of updating the front end, and the design has evolved from Access 2.0 days. He just doesn’t want to have to update all the pieces in order to apply naming conventions to the tables, thus potentially breaks apps running all over the world.

            • #566314

              Actually, naming conventions weren’t developed for database work, they were developed to make more abstruse code maintainable. I believe Hungarian notation, which was the direct ancestor of Leszynski-Reddick, was developed for C, possibly because they’re much easier to read (and remember) than type declaration characters like #, %, $, etc.

            • #566320

              This page has a few brief comments about Hungarian http://ootips.org/hungarian-notation.html and here is Simonyi’s original paper: http://msdn.microsoft.com/library/default…./hunganotat.asp

    Viewing 1 reply thread
    Reply To: Quasi-crosstab format? (AXP 10.2627.2625)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: