How To Calculate Columns Selectively in MS Access - database

I am creating a Travel Expense Report using Microsoft Access 2007. I am new in creating this. I already created tables and forms in MS Access. I have a meal, transportation, and other allowances in my table. The user of the application will enter his/her expenses for the whole week in the table. I already figured out on how to get the total of each expenses in rows. My problem is how could I get the total of each allowances like the total of all meal, total of all transportation, and total of all other expenses for the entire week..

In the design view of your report add report header and footer sections if you don't already have them (this is on the arrange toolbar).
In the report footer add text boxes (report design toolbar) for each expenses total you wish to calculate. Resize and align the text boxes so they line up with your expenses columns in the detail section.
Change the control source of each expenses total by typing directly into the text box
=sum([expensenamehere])
e.g.
=sum([Meal])
you'll need to change the format of each expenses total to Currency (text box properties).

Related

Form with Subform - find record by updating one of two fields

step by step i am advancing with my Gasoline inventory database and it is actually about to start becoming fun to try out different new things on the database.
However i got stuck on one little issue.
I have a form with a Subform.
May main form has two fields. One is the Gas Station and one is the date of the report that comes in.
Each report of any station contains one or more products with gallons sold, delivered and physical inventory (has to be applied manually as gas expands when warm)
I tried to add a macro to each of the two fields which requeries after update, but that didn't do anything.
Anyways, im looking for a solution that lets me look for past records by just updating one of the two fields in the main form.
I guess you have a table containing the Station details - Station ID, Station Name, etc. Something like the image below.
You'll also have a table or query that shows sales, delivery, etc for each station based on the Station ID (it'll also have a report date - forgot to add that to my example table).
When you place the subform into the main form you need to link the two forms so they stay in sync using the Master/Child fields (your StationID) which are available in the property sheet for the subform container:

SQL Views Multiple Line Entries

I have an interesting one that I have searched for and can't find the solution to.
I am working with a developer who is trying to integrate our incident management tool into Palladium, a finance tool and we're stuck on being able to import invoices correctly.
Scenario
There is a view that contains the invoices but there's several elements to the invoice. The view here shows all the billing parts and includes value amounts for Products and Expenses but it doesn't show details of the products or expenses as there may be multiple line items in that invoice. There are 2 further views one containing the product information and one containing the expense information. There is a common field that can be used to reference the invoice in each of these views called Billing_Log_RecID.
Here's how the default invoice search view looks when exported. I've selected entries where there are products and/or expenses added.
What I need to do is display in a view a line item for each invoice but break out the multiple expense or product items into I guess separate columns so for example
Inv1 COMPANYNAME COMPANYID INVTOT PROD1 PVAL1 PROD2 PVAL2 etc EXP1 EVAL1 EXP2 EVAL2 etc, there's never likely to be more then 2-3 different items but to be safe 5 is a good number.
Here's an example of a query showing products attached to an invoice, I have highlighted where there are multiple lines.
The same exists for the expense items
Hope someone can help.
Dave

Creating a Batch Report

I am trying to create a batch report of multiple invoices using SSRS 2008 R2.
I have created the initial invoice report and have it set up with a parameter; the parameter uses an InvoiceID to populate the data within the invoice report.
I have created another report using lists, inside the list contains the information that was in my original invoice report but using a different parameter (BatchID). The problem I am running into with this is that instead of creating a single invoice for each invoiceID it is creating an invoice for each line item within each invoice. i.e.~ Instead of incorporating multiple items based on the InvoiceID (as the original report did) it is creating a report for each of the items.
What would be the best way of running a batch of these invoices? Am I going about this the wrong way or am I on the right track but missing something?
Thanks in advance!
SELECT i.InvoiceId, i.InvoiceNumber, i.BillTo_Line1, i.BillTo_Line2, i.BillTo_City, i.BillTo_StateOrProvince, i.BillTo_PostalCode, i.CustomerIdName,
i.ce_OutstandingBalance, i.ce_BillToDate, i.ce_BillFromDate, i.TotalAmount, id.ProductIdName, id.ce_customeridName, id.ce_CustomerProductName,
id.InvoiceDetailId, id.BaseAmount, id.PricePerUnit, id.ce_rate
FROM
Invoice AS i RIGHT OUTER JOIN
InvoiceDetail AS id ON i.InvoiceId = id.InvoiceId
Once I enter the invoiceID I get my report
My intent is to be able to run the report against multiple invoicesid numbers without having to select the invoice number itself. I have another table that collects the invoiceid's based on a batchid that they are run in.
So far I have attempted to create a subreport with the original report and Create a separate report that uses a list and attempt to group by InvoiceID for each batchid. Though with each of these I have so far been unsuccessful.
I am new to SSRS and have been pouring over documentation from MSDN about SSRS and the different abilities.
For this sort of repeating list, it's a matter of understanding how a list/grouping works.
Lists, Tables and Matrixes are all the same underlying object - the Tablix.
A List is a Tablix with one detail row (i.e. one Tablix row for each row in the Dataset), one textbox in that row, and a Rectangle in that textbox. The Rectangle can have various embedded elements like more textboxes and as such provides a repeating free-form item for each row in the Dataset.
You can see this when you create a List in the designer:
I assume your report query takes a BatchID and returns a number of invoices and their invoice details. I've taken some liberties with your data and created a simplified sample Dataset:
You want the Rectangle to repeat for every InvoiceNo. Currently the Row Group has no grouping item - change this to InvoiceNo under the Group properties and expand the Rectangle as required.
You can start adding in elements such as textboxes for the Invoice level items, something like:
Note that the left side of the Tablix has changed from lines to a bracket - this is because a grouping item was added to the Row Group.
This will repeat once for each InvoiceNo. Now we want to add the line items - you can do this by dragging a new Table into the Rectangle. Since we have a Row Group in place this table will only display items in that group:
When run for the sample data, this gives an ugly but functional repeating invoice report:
This could be tidied up as required, and page groups inserted between Group items in the Group properties as required.
Hopefully this at least gives you a rough idea of how you might go about your task.

WinForms RDLC Report Monthly Sale Report for all Salesman

I am stuck with this report for more then 10 days, please help. My client have 50 Salesman, he want a Report which can show in header Salesman Name, Area, City and in Report Body his daily sale and in footer total sale, I tried all but not able to work it around. please help.
it must print all 50 Report.
Regards
Moksha
You can use a table and group each row by the field "Salesman". After that you can specify that for the group "Salesman" each new "row group" must insert a page break.
In this way you should have a report with N page where N is the number of Salesman.
If you don't know how to do that I leave here some useful link: table grouping and page break for each row group (last paragraph).
When you have grouped the first table, you can use antoher one table for the "report detail" following the master/detail idea. You can found more example here or here

Salesforce Report Builder: Sorting by Grouped Total

I have a pretty basic scenario: contacts have orders and orders have order line items. An order has a forumla field on it to calculate the entire cost of the order and that is working fine. I'm trying to create a report that shows each customer name and the summed dollar amounts of all orders for that customer. So I drag the customer name onto the fields area and then add the order total field. I group by the customer full name and then I set the group by on the order total column to sum and this works fine...but then I can't sort by that column. I want to sort by total dollar amount so I can quickly see who is a high buying customer. Is there a way to order a report by a summed field or will I just have to export to Excel and manipulate the data there?
Thanks
Josh
I'm sure that this is possible. I've recreated your scenario with the standard Opportunity object and the Amount field. I have grouped on both Opportunity Name and Amount. Clicking on the down arrow button on the group gives a menu that allows you to change the sort order of the group as shown in this image.
I think the fields in your report should behave in the same way.

Resources