Calculation and conditional display on a report

Parker

Registered User.
Local time
Today, 14:55
Joined
Jan 17, 2004
Messages
316
Time to get my head round reports.

I am building a db for the club my wife runs. As part of the db I have to account for inventory movement of bar stock and she would also like this to be able to produce the legal price list for display.

No problem with a price list as such except for the fact that drinks on draught have to have two price levels displayed (half pint and pint) everything else is displayed with price by one fixed measure.

There are two categories of draught drinks ---- Beer and soft drinks.

The way I would like to do this is with a calculated field on the report that will only show in the two categories concerned but I haven't got a clue how to do it.

It's an easy calculation but I would also need to display labels (1/2 pint & Pint) within these categories.

I have attached a screen shot of the price list if this helps to clarify.

Can someone please help?

Thanks
 

Attachments

  • Archer Suite Price List.JPG
    Archer Suite Price List.JPG
    73.2 KB · Views: 165
  • Archer Suite Price List2.JPG
    Archer Suite Price List2.JPG
    83.7 KB · Views: 161
Not too difficult to do if I understand your needs correctly.

First of all, you have to add the text box control (Pint or 1/2 Pint) to the report and set its control source to the calculation you need. I don't know if you need to add 2 controls or just one. To keep things simple, we'll assume 1 and we'll refer to this control as "txtHalfPint". I'm also referring to the control with the type of beverage as "txtType".

Then in the detail section (I'm making the assumption that your calculated text box is in the detail section), select the On Format event:

Code:
    If Me.txtType = "Draught" Or Me.txtType = "Soda" Then
        Me.txtHalfPint.Visible = True
    Else
        Me.txtHalfPint.Visible = False
    End If

Access will make the calculation for the added text box regardless, but the control will only be visible on the report if it is "Draught" or "Soda".

Hope that helps.
 
Add another grouping level to the Report
 
Sorted

Thanks guys

I knew it would be easy but I’ve never got me 'ead round reports-----always put it off and nicked examples from elsewhere.

I've seriously got to do some work in this area now though 'cause my main db is now at the stage where I need to produce reports that are compatible with the look and layout of ones we produced in other s/ware until I decided to get clever and work up an Access db.

I have included an example of one of our forms. It is a double sided A4 sheet, some information is generated by the db, and other stuff is filled in by the chauffeur.

We have about half a dozen of these 'forms' that need to be produced for various jobs but this one, being the chauffeurs work sheet, is the most critical.

As you can see, it is very detailed and very busy but the information that is (a) given and (b) collected, is both important and necessary. The format took us nearly three years to get right so I don't want to change the look or feel if possible.

Once again, I haven't a clue. I don't even know if its possible to produce a report that would end up looking like this. But I suspect it is if I knew where to start.

Anyone feel like helping me get my head around this? or point me at some reading material that may help?

Cheers
 

Attachments

It's certainly doable, but your table structure would need to be spot on first. It looks as though you would almost certainly have a least one subReport, since it would appear one driver has many calls to make, or could have, correct?
 
Rich said:
It's certainly doable, but your table structure would need to be spot on first. It looks as though you would almost certainly have a least one subReport, since it would appear one driver has many calls to make, or could have, correct?

Thanks Rich

Yes a driver could have many stops. Each work order is dedicated to one job but the form has to handle all eventualities. The job can entail anything from a simple airport pick up to multi stops for meetings etc

However, on the first page, the table for driving and waiting times, comments and signature boxes are for the driver to fill in. Everything else is filled from information in the db. Not all boxes are filled all the time but they still must be printed.

On the second (or reverse side of the sheet) everything is filled in by driver or client. Occasionally there is a supplementary sheet included but the only information this collects from the db is job number and driver ID.

There are 7 tables involved: 5 are to do with client and order details. They are all linked in the appropriate places and work well. As do the two remaining tables that are to do with the Chauffeurs details, payroll etc.

I can get all the relevant details to display in a simple report. My biggest problems are getting the report to print empty fields and formatting the report to look like the example I posted so that the drivers don't moan and we can understand them.

By the way, are you rendered yet?
 
You can use labels for employees to write into

I'm only half rendered so far, it is a holiday after all :D
 
Rich said:
You can use labels for employees to write into

Ok thanks for that.

One more question though. It is easy enough to set the width of a report and work within it. But how do I set the length so that I don't oversize the page?

I'm not going to work on it now............It is a h:D lliday.

Rich said:
I'm only half rendered so far, it is a holiday after all :D

Is that half rendered or half plastered? :D

My last cars just in and I've got to work tommorow but not drive so I'm going to get fully plastered. Hic
 

Users who are viewing this thread

Back
Top Bottom