473,387 Members | 1,517 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,387 software developers and data experts.

Need Help With Report

I have a report that uses a crosstab query as its data source. The problem is not all of the crosstab values are present every time the report is generated. As a result, I get an error when the report is run. Access is looking for the value of the missing crosstab value. How do I supress the crosstab value from the report when the value is null????
Jan 27 '09 #1
11 1316
NeoPa
32,556 Expert Mod 16PB
Can you be a little more precise?

What error (including message please) are you getting?

Presumably this is about a field which IS defined in the report but is simply missing (Null) in the data?
Jan 27 '09 #2
NeoPa,

The message reads:

The Microsoft Jet database engine does not recognize "my report field" as a valid field name or expression.

Presumably this is about a field which IS defined in the report but is simply missing (Null) in the data? YES
Jan 27 '09 #3
NeoPa
32,556 Expert Mod 16PB
Do you have any control in your report which has "my report field" as its source? If so, what should it be referring to?

That sounds to me like an instruction, or some example code. It would need to be given the name used in your query before it can work correctly.

Does that sound like sense?
Jan 27 '09 #4
Yes, one of the fields in the report is tied to its value is a crosstab query. If the value is the crosstab is null or empty, I get the error. Is there a way to suppress the field on the report if its corresponding value in the crosstab query is null????
Jan 28 '09 #5
NeoPa
32,556 Expert Mod 16PB
I can't tell if your first sentence is important as I cannot find a way to read it whereby it makes sense to me. The second is easy if I change the first "is" to an "in".

If I simply ignore the first sentence I would say that I'm surprised that a report control would fail on a null value. You could try using =Nz([FieldName],"") instead of FieldName, but I wouldn't be confident of success as I would not expect the error in the first place. See what you get when you try that.

PS. I'm assuming a string value. If it should be numeric then try =Nz([FieldName],0) instead.
Jan 28 '09 #6
Let me clarify. I created a report that shows the age of unfilled orders. I have it grouped by region and age (in days) The data for the report comes from a crosstab query that groups by REGION and AGE IN DAYS. The grouping values for AGE IN DAYS are <=30, 31-90, and 90+. It is possible for one of the AGE IN DAYS values in the query results to be null or blank. When this occurs, there is no corresponding value in the query results to pass to the field on the report . I believe this is why I am getting the message I descibed earlier.

Here is a sample of what the report might look like:

A G E I N D A Y S

REGION <=30 31-90 90+

East 2 4 12

West 3 7 9

North 0 6 11

South 2 5 7


Now, the problem occurs when as displayed above, the value for the NORTH region's orders that are <=30 days is NULL. (i.e. the value is null or blank in the corresponding crosstab query.) When this happens, the report bombs!!!!!! So, is there a way to suppress the field on the report if the corresponding value is null or blank?? I am not using VB code to create the report. I have texts boxes on the report that are using the values of the crosstab fields as their control source. Does this help??
Jan 28 '09 #7
NeoPa
32,556 Expert Mod 16PB
In the Control Source property of of the control you're having this problem with, you should see something like "My Report Field" (without the quotes).

To use Nz() you would need to enter "=Nz([My Report Field],0)" instead. The "=" tells it there is a formula to use rather than simply the field as returned by the bound recordset.
Jan 29 '09 #8
I get #ERROR on the report where the value is null....Is this normal??
Jan 29 '09 #9
NeoPa
32,556 Expert Mod 16PB
It's not what I would expect from what you've told us I must admit (although I've almost never used cross-tab queries, and using one for a report is something I cannot imagine ever doing.

If you can attach a zipped copy of the database to the thread I'll look at it for you if you like.

To reduce the size it may be necessary for you to strip out a lot of the database. Leave the minimum actually required to illustrate the situation, so test that it still fails in the same way before sending your example database.
Jan 29 '09 #10
Thanks for the offer, NeoPa, but I took your advice and abandoned the idea of using a crosstab query as the source of the report....All is well now.
Feb 3 '09 #11
NeoPa
32,556 Expert Mod 16PB
Pleased to hear it & good luck going forward :)
Feb 5 '09 #12

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

Similar topics

3
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2...
4
by: Brian Coy | last post by:
I have a database that records a part no, a scrap reason, the cost of scrapping that item, and the date. I need to porduce a report that will show up to a weeks worth of data at a time, but I need...
3
by: CSDunn | last post by:
Hello, I have a situation in which each record on a report has 40 fields, any one of which can contain a value of 'C', or 'I', or 'B'. I need to create one calculated field on the report that will...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
3
by: ChadDiesel | last post by:
Hello everyone. I need some advice on table structure for a new project I've been given. One of our customers sends us an Excel spreadsheet each week containing their order. Currently, someone...
7
by: ChadDiesel | last post by:
Hello everyone, I'm having a problem with Access that I need some help with. The short version is, I want to print a list of parts and part quantities that belong to a certain part group---One...
1
by: tristant | last post by:
Hi All, We want to develope Windows and Web .NET application on Oracle 9i on AIX. Also we will use Crystal Report for reporting. I have question about the what Visual Studio.NET edition do we...
0
by: Crash | last post by:
Hello everyone, I need help creating an asp page to view a crystal report, which requires that that I change the database connection dynamically. I thought I had this problem licked in CR7 (the...
4
by: access baby | last post by:
i have a huge database based on date and time need to create different report we need to measure our work processes how many order received , order cancelled, completed and count of items completed...
1
by: mskapek | last post by:
I need some advise on how to best create an Access 2002 report from multiple "total" queries, each which result in 3- 5 values that I need displayed on my report. Most of the queries do simple...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.