473,511 Members | 15,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access reporting problem

Recordsets in my database use 120 fields, but the average recordset uses
only about 20 fields, what leaves 100 fields NULL in each line.
When I use the regular access reporting, I always get shown every field from
my table, but I need a report that shows only fields that are not empty.

Can I get field after field printed, like that:
FIELD1 VALUE1; .. skip empty fields ... FIELD4 VALUE4; .. skip empty fields
... FIELD29 VALUE29 and so on?

Thanks

Nov 13 '05 #1
3 1297
"M. Schroeder" <sc*******@yahoo.de> wrote in
news:cv**********@online.de:
Recordsets in my database use 120 fields, but the average
recordset uses only about 20 fields, what leaves 100 fields
NULL in each line. When I use the regular access reporting, I
always get shown every field from my table, but I need a
report that shows only fields that are not empty.

Can I get field after field printed, like that:
FIELD1 VALUE1; .. skip empty fields ... FIELD4 VALUE4; .. skip
empty fields .. FIELD29 VALUE29 and so on?

Thanks

You can use the wizard to create a report with only twenty
fields.

You can also add code to the report's on format events to make a
field not visible if the contents are null.

e.g. me.field2.visible = not isnull( me.field2.value )

You need to set the can shrink property of the field and of the
section to yes.
--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #2
"Bob Quintal" <rq******@sPAmpatico.ca> schrieb im Newsbeitrag
news:1108910089.cbaad58bbf920cc7c18670311b11d67f@t eranews...
"M. Schroeder" <sc*******@yahoo.de> wrote in
news:cv**********@online.de:
Recordsets in my database use 120 fields, but the average
recordset uses only about 20 fields, what leaves 100 fields
NULL in each line. When I use the regular access reporting, I
always get shown every field from my table, but I need a
report that shows only fields that are not empty.

Can I get field after field printed, like that:
FIELD1 VALUE1; .. skip empty fields ... FIELD4 VALUE4; .. skip
empty fields .. FIELD29 VALUE29 and so on?

Thanks

You can use the wizard to create a report with only twenty
fields.

You can also add code to the report's on format events to make a
field not visible if the contents are null.

e.g. me.field2.visible = not isnull( me.field2.value )

You need to set the can shrink property of the field and of the
section to yes.


Does this mean the skipped fields do not use space on the report?
I found the property can grow/shrink not very reliable.
I think this will not work properly with 70 fields.

I would prefer the report in a textfile. I think the best solution for me
was to go through a VB-recordset and test each field if NULL or not NULL,
and write them into a file?

Nov 13 '05 #3
dim db as database
dim tdf as tabledef (or qdf as querydef if your data is all brought
together/filtered in a query)
dim fld as field
Const cSEP As String = " "
set db=currentdb
set tdf = db.tabledefs("SomeTable") '--use db.QueryDefs() if you're
getting your data from a querydef

for each fld in tdf.fields
write #fileNo, fld.Name& cSEP & fld.value
next fld
set fld=nothing
set tdf=nothing
set db=nothing

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2893
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
4
3883
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following...
3
3621
by: trustme1 | last post by:
I am wanting to be able to write reports against an ms-access database that is part of another package. I only want to report from the database. What I need is a package that will allow me to...
4
11413
by: Rich Moser | last post by:
My organization is in the midst of making a reporting tool decision. On the table are Crystal and the reporting functionality in Access. - Report distribution is not a factor - it's all local -...
6
3651
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
3
1093
by: phil cunningham | last post by:
I am using Access to run a database within the company and also have a website that makes some of the information available to the general public And so far everything is working very well q....
5
3152
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
21
4652
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement...
2
2398
by: jjbnfo | last post by:
Hi all, I'm trying to edit VBA code in my mdb file for a form. Basically, I want to delete and comment out some lines of code. (I'm quite good at VBA, so I don't need help there). I'm...
6
4631
by: crealesmith | last post by:
Firstly, I have no problem with mail merging to Word, VB code for that works perfectly. On one mail merge I need to merge 15 fields of data that are from 3 seperate records. The 3 records are all...
0
7353
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
7418
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...
0
7508
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
4737
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
3222
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...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
446
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.