473,461 Members | 1,315 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Insert Month

I have a crosstab report with running totals monthwise for a product. However if a product does not have a movement for any month, the cumulative total as at that monthend is not displayed in the report. The report does not bring forward the previous monthend balance. How to solve this issue though the report displays the totals for all the months correctly where there is a movement for that month.
Jun 8 '11 #1
1 1721
Stewart Ross
2,545 Expert Mod 2GB
It depends on what the value you are pivoting upon is. If it is very simple, such as a month number ranging from 1 to 12, you can define static column headers for the pivot field (by going to the pivot field's properties in design view and setting the Column Headings property to a list of all possible headings, like this:

1, 2, 3, 4, 5, 6, 7, 8 , 9, 10, 11, 12

If you use a more complex column heading for the pivot you will need to generate all possible values for that column heading in a separate query, and then left-join those values to the crosstab so that there will always be a row for the particular month you need.

Unfortunately, Access cannot lookup pivot headings dynamically in response to changing circumstances - a weakness with crosstab queries.

There is a slower method to get what you want without using a crosstab at all, but to advise further on this method (which uses a series of manually-defined fields for each month to SUM the relevant value only if a particular month condition is true) I'd need to see the current SQL for the crosstab you are using at present.

-Stewart
Jun 12 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: MAB71 | last post by:
I'm running an ISP database in SQL 6.5 which has a table 'calls'. When the new month starts I create a new table with the same fields and move the data of previous month into that table and delete...
9
by: adi | last post by:
Hi all, Hope there is a quick fix for this: I am inserting data from one table to another on the same DB. The insert is pretty simple as in: insert into datatable(field1, field2, field3)...
0
by: Alexander Vlasenko | last post by:
Please CC me, I am not subscribed. An imaginary SQL statement INSERT INTO table FETCH ... FROM cursor; looks almost the same as currently available INSERT INTO table SELECT ...; I tried it...
6
by: Hasanain F. Esmail | last post by:
Hi all, I sincerly thank you all in advance for your help to solve this problem. I have been trying to find a solution to this problem for sometime now but have failed. I am working on a...
6
by: Laura Stout | last post by:
Please help! I've been spinning my wheels on this one! I am working on a database that tracks future project opportunities. For each opportunity, the data entered includes total project value and...
7
by: Novice Computer User | last post by:
Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a total novice and can't seem to figure it out. Here is a .php script. Right now, the minimum amount of time (i.e. duration)...
3
by: assgar | last post by:
Hi I am having problem with my loping. I don't know if I have chosen the correct approach. GOAL: I need to insert into a table event types for a specific date range. The calendar the event...
4
exedotsree
by: exedotsree | last post by:
Hi Pls help me find out the syntax error in the following stmt... Dim insqry As String = "INSERT INTO AssShift(employeeid,departmentid,day" & curdate.Day & ",month,year,lastupdated) VALUES (" &...
1
by: lyter | last post by:
hi..i'm newbie in sql..i have a big problem..i'm used db access and asp code in my system..hope someone can help me to fix this issue.. here i have two table..1) eachclick 2)month 1st (in table...
0
by: marlberg | last post by:
Platform: Windows2000, WindowsXP, Windows Vista, etc Language: C#, ASP.NET Pre-compiled Libraries: Enterprise Library 3.0 full I have a requirement to implement in and display in C# and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.