473,508 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reporting

266 Contributor
I have a database that i use for hydrant inspections. There are about 15 different items per hydrant that need to be inspected. About 2000 total hydrants. I have every item that needs to be inspected as a separate field in my master table. My problem is, i need to compile a report for every hydrant. I would like some type of list view with like 20 hydrants per page but that is impossible with how many different fields there are. I really only need to show a field if there is a problem. Im kind of lost on how to handle this and was curious if anyone had any suggestions. One thought i had was if a field had a problem, it could send some custom text to a text box stating the problem. Then on my report i would only have to display that text box. But there are so many fields and more that one thing can be wrong with the same hydrant and i am not an advanced enough user to code that properly... sorry if this is confusing and if i need to clarify anything, just ask and i will.
Sep 18 '12 #1
13 1602
zmbd
5,501 Recognized Expert Moderator Expert
A long shot for me; however, have you tried a cross tab query/report? You might be able to fit the columns as the headers and the hydrants as the rows? Or are you looking for a different format?
Sep 18 '12 #2
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
It would make it alot easier for us to present help and for you to undersaid said help it we speak from the same context. Could you please show us your table layout (Field names and types) as well as a few example records?
Sep 18 '12 #3
didacticone
266 Contributor



example records is challenging because they vary.... for the asset_id its obviously just a number, the other fields are mostly ok, not ok, or yes or no... pretty basic.
Sep 18 '12 #4
zmbd
5,501 Recognized Expert Moderator Expert
Apparently, the firewalls here are blocking the image... I've tried to fix it so that is shows. Hopefully, TheSmileyCoder can see it :)

As for the records... just a simple CSV format would be good:
[field1],[field2],[field3],[field4]
1, some record info, Y, N
2, another record, N, N
3, YAR, Y, Y

Table format such as:
tbl_name
[field1] primary key, autonumber
[field2] text(50), required, no duplicates
[field3] boolean
[field4] boolean

-z
Sep 18 '12 #5
didacticone
266 Contributor
Ok ive attached the csv
Attached Files
File Type: txt table.txt (1.4 KB, 327 views)
Sep 18 '12 #6
didacticone
266 Contributor
http://i4.photobucket.com/albums/y14...olx/fields.jpg that is a link to the fields... perhaps you can see it then
Sep 18 '12 #7
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Weird I could see the image earlier, and now I can't. Odd.

One approach could be to have code that checks each field, and if "negative" adds text to a combined string, and the report then shows said combined string.
Sep 18 '12 #8
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Start by placing all the fields you want visible into your report. Then add in all the fields you want to combine onto your report and set their visibility to False. You can make them as small as you want and delete their labels too if required.

Finally add a textbox where you want the "summary" status to be printed on your report. In this case I callde it tb_Combined. Make sure it has its "CanGrow" property set to true.

Then in the reports Detail Format event:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2.    Dim strC As String
  3.  
  4.    If Me.Drainage & "" <> "OK" Then
  5.       strC = strC & "Drainage: " & Me.DrainageComments & vbNewLine
  6.    End If
  7.  
  8.    If Me.Drip & "" <> "OK" Then
  9.       strC = strC & "Drip: " & Me.DripComments & vbNewLine
  10.    End If
  11.  
  12.    'Add more field checks in here if needed
  13.    If strC <> "" Then
  14.       Me.tb_Combined = Mid(strC, 1, Len(strC) - 2) 'The -2 is to remove the last vbNewline.
  15.       Else
  16.       Me.tb_Combined = "OK" 'Nothing wrong at all.
  17.  
  18.    End If
  19.  
  20.  
  21. End Sub
  22.  
  23.  
Sep 18 '12 #9
didacticone
266 Contributor
ok going to try this tomorrow... thanks for the help and i'll let you know how it goes. i really appreciate the help guys.
Sep 19 '12 #10
didacticone
266 Contributor
tried it and it works awesome! i have on extra question though. for the drainage category i have 2 options, "OK", "Drains Slowly", "Doesn't Drain". I want if it says "ok" or "Drains slowly" for it to be considered "ok"... if your following... i want to know if it drains slowly but as far as the report goes i want it to be considered ok and am not quite sure how to manipulate the code to get the required results.
Sep 19 '12 #11
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
You have 2 possibilites either check that its different from both ok and Drains slowly, or check that it is equal to Doesn't drain.
Expand|Select|Wrap|Line Numbers
  1. 'Example condition one
  2. If Me.Drainage & "" <> "OK" AND me.Drainage & ""<>"Drains slowly" Then
  3. 'Example condition 2
  4. IF ME.Drainage & ""="Doesn't Drain" Then 
With that said, do you control the entry of data so that user(s) cannot put "not draining" or "Drain not working" and such?

A good part of UI design is ensuring uniformity and ensuring that users cannot take wrong actions (cause they inevitable do, and when they do, they blame you the developer)
Sep 19 '12 #12
didacticone
266 Contributor
i actually used your second example right after i posted the message and it worked perfectly. and yes users can only input the data a specific way. thanks so much for your help!
Sep 20 '12 #13
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Thats nice to hear, and I am glad to hear you know to limit your users to pre-defined entry values.
Sep 20 '12 #14

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

Similar topics

3
2445
by: Jonathan | last post by:
We have a production database, but due to the crippling load of some reporting tools, we are looking to have a separate reporting database. Due to it's nature, the reporting database doesn't need...
3
1962
by: Mohammad S Khan | last post by:
I am currently doing some research on reporting features provided / compatible with dotnet features. Our current application has excel reprots that are emailed both with an without scheduling...
3
4896
by: jez123456 | last post by:
Hi My users, use ms access for querying and reporting on a backend database, however they need to replace ms access with a new reporting tool. I’m thinking of developing my own reporting...
3
1915
by: Paul Say | last post by:
I have a asp.net application that will need to create a document/report from data in a database. The user will fill out a form supplying various criteria for parameters. I would like the...
8
2730
by: Woody Splawn | last post by:
I am asking this question here because I asked this question in the Reporting Services Newsgroup and did not get an answer. Does anyone know if Reporting Services is intended to work in a...
5
1870
by: John | last post by:
Hi How do .net reporting tools (including in vs2005) compare to reporting in ms access? I am moving over from access and hoping that all my reporting needs will be fulfilled. Thanks Regards
1
6461
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
0
2238
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
0
2967
by: JTP PR | last post by:
Business Intelligence software company, Yellowfin today announced its successful foray into the Asia Pacific telecommunications sector through its expanding partner network. Two organisations,...
0
7223
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
7115
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
7321
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,...
1
7036
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
7489
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...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4705
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
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 ...

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.