473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

details expressed as ranges of values in a report

I've created a physical inventory database for my company that creates and manages the serialized count sheets used during the inventory process. I'm struggling with an idea for the audit log that gets generated at the very end. Rather than listing all the count sheets by number for each inventory location, I'd prefer to save space and express the the count sheets in ranges. In this way, instead of listing:

00001
00002
00003
00004
00005
00015
00016
00017
00018

I could list:

00001-00005
00015-00018

I was thinking I could save the first sheet of a range, loop through the sheet numbers and compare the last with the next until the two weren't contiguous, save the last, and repeat until all sheets for a given location were processed. One of the issues I see with this approach is having to set static variables for all the possible start/end sheet ranges...is there a way to set variables dynamically to avoid the static route?

Backing up a minute, is there a better way?

Thanks in advance?
Nov 12 '10 #1
1 1050
NeoPa
32,556 Expert Mod 16PB
I would expect this to be done using a Recordset. Queries don't really have any concept of next or previous. They are a set. It could be done in SQL if there were a way to identify each grouping (See example SQL below), but I'm afraid I see no way to identify them as a group.
Expand|Select|Wrap|Line Numbers
  1. SELECT   Min([Value]) & ('' + IIf(Min([Value]) = Max([Value]), Null, Max([Value])) AS [Range]
  2. FROM     [Table]
  3. GROUP BY [Some grouping value]
For want of that grouping, a recordset could be used to determine the output values, but only if they are added to some temporary table, and later queried, can they be output as a query of any sort.

Interesting question though ;-)
Nov 12 '10 #2

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

Similar topics

6
by: David B | last post by:
I have a report with 2 sub reports on it. The report is an invoice and the sub reports are dropping data onto the invoice. This worked fine if generating 1 invoice at a time. I am trying to create...
2
by: dixie | last post by:
Is it possible to set the height of the details section of a report using VBA? I watt to put a value into a table for the height of the report section, so it can be altered by a user. dixie
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
0
by: jaykchan | last post by:
I am looking for a control that allows our users to expand and collapse rows in a report. Currently, the report is being shown in a web page generated from a CGI script. Unfortunately, the...
2
by: cranfan | last post by:
I have a report that has fields more than 10 like comp_id comp_name comp_software etc. I want runtime users to edit this report according to their needs.Here is default report but maybe user wants...
0
by: voroojak | last post by:
Hi I have some problem with report service in sql 2005. what ia mdoing is that when the report is generated first just show some columns and if they wants to see the details they have to click on...
1
by: andy4k | last post by:
i am trying to populate a detailsview insert view date field with todays date and converted 1 to template view and herd ya can do it through data binding in the code be hind and i be damned if i can...
1
by: waltnixon | last post by:
I've got an MS Access query which runs fine when double clicked and returns all of the rows in a test database I'm building. I've set up a multi group report based on the query. I immediately...
4
beacon
by: beacon | last post by:
Is this possible? If not, is there a way I can use IsNull or something like to return zero if there aren't any instances of what my query is returning? Here's what I have in the text box in the...
3
by: yabadabadoo | last post by:
Hi everybody. I would like to add my company details to a report so that my company details remain on the report always. For example all the other text boxes will be bound and changeable except my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.