• Report (2k)

    Author
    Topic
    #1771675

    Hi ;
    Can i do a report contain 4 columns . like ( name- seat no – name – seat no )
    Ashraf

    Viewing 1 reply thread
    Author
    Replies
    • #1815818

      Yes you can, in fact what you are describing is 2 columns with 2 fields per column.

      Go into Page Setup uner the file menu, you will find it under the tab called columns.

      • #1815853

        I try it but not work . u try with my db
        Ashraf

        • #1815859

          See attached version. To create the report, I did the following:

          1. Click New in the Reports section of the database window.
          2. Select the StudentsInfo table and click the “AutoReport: Tabular” option, then click OK.
          3. This creates a report with one column.
          4. Select File | Page Setup…
          5. Activate the Columns tab.
          6. Enter 2 in the “Number of Columns” box.
          7. Enter 11.9 cm in the “Width” box.
          8. Click OK.
          9. You now have a report with two columns, but no header for the second column.
          10. Switch to design view.
          11. Copy the labels and line in the page header, then paste them and move them to the right. They should start at about 12.7 cm.
          12. Switch to print preview to test.

          You can further modify the design to suit your purposes.

          • #1815888

            Thank u hans but i do it work good , and i have another idea in my file
            Ashraf

            • #1815892

              I think this is what you want, see report rptcolumns in the attachment.
              The report is sorted on Sex (descending) and Name.
              After every 50 names, it will go to a new page. I use a pagebreak control that i make visible or not. See code in the on format of the detail section.
              There is a header section for Sex, just to go to a new page when the female begin. If you don’t want this, go to the grouping and sorting window and set the group header property for the sex group to No.

              I had to create a new report as the ones you have, with the arabic characters didn’t work very well on my european configured pc. I hope you can read my report.

            • #1815894

              Thanks Francois , but that not i want . see my report called Rpt1 u will found that contract no 1 contain 2 male (ali- mohamed ) and 2 female ( hesa and sona ) i want them also in the same bus , as i wrote in the word file , i mean ali and mohamed in the seat 1 and 2 of the bus . ok ( hesa and sona ) in the same bus but not beside them in the back of the bus , all the 50 person like that .
              i hope u also understand me
              Ashraf

            • #1815895

              Is these better ?
              I replace the sort on sex by the sort on contractid and suppress the group header.
              I add Contractid to the report to have clear image

            • #1815897

              No also ,
              supoose that the bus contain 50 seat , ok
              supoose also that i have 27 man and 23 women , i want the 27 man seat from 1 : 27 then the women from 28 : 50 .
              ok now
              Ashraf

            • #1815901

              Ashraf,
              I couldn’t do this in the report only. I have to create a query and use some dirty tricks to get a bus nr for each individual in the query. Then in the report I sort the query data on Bus nr and Sex.
              I hope this time I’m right. If not, let me know.

            • #1815907

              yes Francois ,
              That is near what i want i will adjust it to my mdb and tell u about it .
              Thanks
              Ashraf

            • #1815912

              Hello Francois ,
              I check it again it work very good but i see in quer1 u put new tbl1 How i got it . and also can i do index for female only to start from 50 : 23 ( inverse ) insted ofstart from 23 : 50 .
              Ashraf

            • #1815914

              Open the query in design view, go to View / SQL View.
              In the text you see, after FROM tbl1 I add AS NewTbl1.
              For the sorting, I’m still looking for a sollution.

            • #1815922

              Thah ok in SQL i see it . also iam still waiting u .
              Thank u deer .
              Ashraf

            • #1815926

              Iam Still Waiting U .
              Ashraf

            • #1815928

              Please be patient. All Loungers, including WMVPs and Moderators are volunteers, answering questions in their spare time. See Rule 17.

            • #1815932

              U r right Hans , so sorry , i will try also to found the solution .
              Ashraf

            • #1815937

              Sorry Ashraf, but the friday is a day that a can’t spent many time on the lounge and yesterday I try different things to get the sorting in the report itself without result. As I was driving today, the idea came up. bingo I add a new field in the query, if the sex is male, I use ContractID, but if the sex is female, the I use 1000-ContractID so the field is
              SortContracrID: IIf([sex]=”male”;[contractid];1000-[contractid])
              Then in the report I use in the Sort and Grouping window SortContractID and third sorting argument.
              Here is the modified db.

              PS if you have more then 1000 different ContractID in the production db you’ll have to increase the 1000 in the query as this number has to be greater then the greatest ContractID

            • #1815938

              Hello Francois ,
              Really it is fantastic work and iam very heppay with ur cooperation , i know that i tird u with me but i pride with ur firendly .
              Thank u again dear .
              Ashraf

            • #1815940

              Sorry Francois;
              i chansged some names to arabic names and found the the 2nd page of the report started with female u chan chick ir in 3rd page of the report u will found that started with student53 . it is female . i want evry page stared with male .
              Ashraf

            • #1815942

              You’re making it hard. What will be your next question ? smile
              In this version the busses may not be full with 50 people. I hope that’s OK.
              I have to change the strategy, because I didn’t find a manner to do it in the query.
              I added a field in tbl1 named Busnr.
              In the query I delete the fields to calculate the bus nr.
              In the on open event of the report, I call the sub FillBus (in Module1) to populate the field Busnr in the table.
              Can you test it and let me know if it is working for you ?

            • #1815943

              iam so sorry , i know that i tird u with me and also may be iam not explant good to u .
              u say : In this version the busses may not be full with 50 people; yes u r right . i try to explan what i understand from the manager . as u see that evry contract contain at least 2 person ( male or female ) so we want to avoide that one contract is seprated male in bus and female in other bus or inverse . so the bus may be 46 or 48 or 50 not more 50 person .
              i hope that u understand me .
              Ashraf

            • #1815944

              Don’t worry, I was kidding.
              I was meaning to ask you if you looked at the last attachment and see now the I forgot to attach it. blush Perhaps i need a newbrain
              So here it is.

            • #1815945

              Wow , u r very funny Francois , I think that i need exectly i test it with my data it is right , so if any prob i feel that i can not ask u again in that subject . u r funny again my dear ,
              thank u my friend.
              Ashraf

    • #1815946

      My philosophy of the lounge is that I help so long I can. If I can’t help any more, I will tell it and I’m sure some one else will step in. So if there are still problems with the report, I ask you to tell it. It’s not because I need a new brain to not forget to attach the file that I’m unable to search on your problem.

      • #1815948

        Thank u dear , I think so the report will be very good but iam now adjust it to my mdb , if i found any thing problem really i will told u soon .
        my best weishes 4 u .
        Ashraf

        • #1815997

          hello again
          can i do that in tables insted of report .
          Ashraf

          • #1815998

            That is not proper design for a table. Tables should contain independent records, one record per data item, not two separate pieces of data. Nor should you be printing or doing data entry in tables. That’s what reports and forms are for.

    Viewing 1 reply thread
    Reply To: Report (2k)

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

    Your information: