473,399 Members | 3,888 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,399 software developers and data experts.

Displaying Refreshed Reports on Screen

All:

I'm looking for a good way to project a series (3) of continuously refreshing reports onto a screen in a work area.
I've written the scrap of code below to handle the generation and display of the reports, but they do not display refreshed data...

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_Load()
  3.  
  4. 'Set the initial value of x to sequence thru reports
  5. x=1
  6.  
  7. 'Check D:\Test Directory exists or not...if not create it
  8. If Len(Dir("d:\test", vbDirectory)) = 0 Then
  9.      MkDir "d:\test\"
  10. End If
  11.  
  12. ' Set timer interval
  13. Me.TimerInterval = 18000
  14.  
  15. End Sub
  16.  
  17. Private Sub Form_Timer()
  18.  
  19. ' select the case to sequence through the reports
  20.  
  21. Select Case x
  22.  
  23. Case 1
  24.      DoCmd.RunMacro "macRptFlow"
  25.      x=x+1
  26.  
  27. Case 2
  28.      DoCmd.RunMacro "macRptBuild"
  29.      x=x+1
  30.  
  31. Case3
  32.      DoCmd.RunMacro "macRptSummary"
  33.      ' set count back to 1 to repeat
  34.      x=1
  35.  
  36. End Select
  37.  
The macros called generate the reports in a .snp format.

I'm welcome to any suggestions on how to accomplish this...just need a way to display refreshed reports continuously on an overhead....

TIA for any help!

CJM
Jan 22 '07 #1
10 1943
ADezii
8,834 Expert 8TB
All:

I'm looking for a good way to project a series (3) of continuously refreshing reports onto a screen in a work area.
I've written the scrap of code below to handle the generation and display of the reports, but they do not display refreshed data...

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_Load()
  3.  
  4. 'Set the initial value of x to sequence thru reports
  5. x=1
  6.  
  7. 'Check D:\Test Directory exists or not...if not create it
  8. If Len(Dir("d:\test", vbDirectory)) = 0 Then
  9.      MkDir "d:\test\"
  10. End If
  11.  
  12. ' Set timer interval
  13. Me.TimerInterval = 18000
  14.  
  15. End Sub
  16.  
  17. Private Sub Form_Timer()
  18.  
  19. ' select the case to sequence through the reports
  20.  
  21. Select Case x
  22.  
  23. Case 1
  24.      DoCmd.RunMacro "macRptFlow"
  25.      x=x+1
  26.  
  27. Case 2
  28.      DoCmd.RunMacro "macRptBuild"
  29.      x=x+1
  30.  
  31. Case3
  32.      DoCmd.RunMacro "macRptSummary"
  33.      ' set count back to 1 to repeat
  34.      x=1
  35.  
  36. End Select
  37.  
The macros called generate the reports in a .snp format.

I'm welcome to any suggestions on how to accomplish this...just need a way to display refreshed reports continuously on an overhead....

TIA for any help!

CJM
I was very pressed for time but here is a rather unprofessional display of code that hopefully will point you in the right direction. It displays a series of 3 Reports, not Snapshots (*.snp), at 10 second Intervals, closing the Report immediately displayed prior to the current one, and ending the entire display after 10 minutes. Please excuse the lack of finesse in this case:

'Preset the Form's Timer Interval to 10000 (10 seconds)
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2. On Error Resume Next
  3.  
  4. Static Counter As Integer
  5.  
  6. Counter = Counter + 1
  7.  
  8. Select Case Counter Mod 3   'Number of Reports
  9.   Case 1
  10.     DoCmd.Close acReport, "rptTest", acSaveNo
  11.     DoCmd.OpenReport "rptJobs", acViewPreview
  12.   Case 2
  13.     DoCmd.Close acReport, "rptJobs", acSaveNo
  14.     DoCmd.OpenReport "rptEmployee", acViewPreview
  15.   Case 0
  16.     DoCmd.Close acReport, "rptEmployee", acSaveNo
  17.     DoCmd.OpenReport "rptTest", acViewPreview
  18. End Select
  19.  
  20. If Counter = 60 Then        '(60 - 10 second Intervals = 10 minutes)
  21.   Me.TimerInterval = 0
  22.   DoCmd.Close acReport, "rptTest", acSaveNo
  23.   DoCmd.Close acReport, "rptJobs", acSaveNo
  24.   DoCmd.Close acReport, "rptEmployee", acSaveNo
  25. End If
  26. End Sub
Jan 23 '07 #2
Thank you...that snippet was a great help in generating and cycling through the reports.

A couple of questions:

1) Will these reports show fresh data each time that they are generated? That is...if an employee creates a new entry in the table that would normally be reported, will it be incorporated into the report results and displayed the very next time that report is called?

2) Do you have any suggestions for displaying the second (or third) page of report results? Right now, the reports will only (without intervention) show the first page of data.

Thanks!

CJM


I was very pressed for time but here is a rather unprofessional display of code that hopefully will point you in the right direction. It displays a series of 3 Reports, not Snapshots (*.snp), at 10 second Intervals, closing the Report immediately displayed prior to the current one, and ending the entire display after 10 minutes. Please excuse the lack of finesse in this case:
Jan 23 '07 #3
NeoPa
32,556 Expert Mod 16PB
1) Will these reports show fresh data each time that they are generated? That is...if an employee creates a new entry in the table that would normally be reported, will it be incorporated into the report results and displayed the very next time that report is called?
This code should recreate the report each time.
2) Do you have any suggestions for displaying the second (or third) page of report results? Right now, the reports will only (without intervention) show the first page of data.
You could look at the timer calling a procedure in your reports module at intervals. This procedure would simply go to the next page.

Let us know if this idea is interesting (or even better) you get it working yourself.
Jan 23 '07 #4
Again...thanks for the replies...

To your last suggestion, I'm definitely interested in the theory behind having a the timer call a procedure that would change the page, I'm just not experience enough to understand how to approach that.

I looked into sending some sort of argument in the DoCmd.OpenReport statement, but I don't see that there is anyway of specifying a page number.

I suppose I could determine the maximum number of results that typically fits in the report and then filter each report to cause the first "x" number of results to display...then the second set of "x" results, and so on. This, then, would be repeated for each report until no more records were available. That seems a bit inefficient, however.

Other thoughts?

Tangentially related, how difficult would it be to push these to a web page? Can it be done without a webserver?
Jan 23 '07 #5
ADezii
8,834 Expert 8TB
This code should recreate the report each time.

You could look at the timer calling a procedure in your reports module at intervals. This procedure would simply go to the next page.

Let us know if this idea is interesting (or even better) you get it working yourself.
NeoPa:
Please tell me if it is me, but this is a little more complicated than initially envisioned, especially since the GoToPage Method is only applicable to Forms. This strange looking code will, however, work. With the Timer Interval preset, the code will open rptJobs, rptEmployee (Page 1), rptEmployee (Page 2), rptEmployee (Page 3), and then rptTest. I'm curious to hear what you think, since there do not seem to be many alternatives to solving this problem and I do not want to throw this out there if a better solution exists. Thanks.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2. On Error Resume Next
  3.  
  4. Static Counter As Integer
  5.  
  6. Counter = Counter + 1
  7.  
  8. Select Case Counter
  9.   Case 1
  10.     DoCmd.Close acReport, "rptTest", acSaveNo
  11.     DoCmd.OpenReport "rptJobs", acViewPreview
  12.   Case 2
  13.     DoCmd.Close acReport, "rptJobs", acSaveNo
  14.     DoCmd.OpenReport "rptEmployee", acViewPreview
  15.   Case 3
  16.     'rptEmployee is already Open - go to Page 2
  17.     SendKeys "{F5}"
  18.     SendKeys "2{ENTER}"
  19.   Case 4
  20.     'rptEmployee is already Open - go to Page 3
  21.     SendKeys "{F5}"
  22.     SendKeys "3{ENTER}"
  23.   Case 5
  24.     DoCmd.Close acReport, "rptEmployee", acSaveNo
  25.     DoCmd.OpenReport "rptTest", acViewPreview
  26. End Select
  27.  
  28. If Counter = 5 Then Counter = 0
  29. End Sub
Jan 23 '07 #6
NeoPa
32,556 Expert Mod 16PB
Again...thanks for the replies...

To your last suggestion, I'm definitely interested in the theory behind having a the timer call a procedure that would change the page, I'm just not experience enough to understand how to approach that.
I checked that last point and unfortunately, there is no Timer facility in the Report object (unusually, this is different from the Form object). Sorry to mislead you.
I looked into sending some sort of argument in the DoCmd.OpenReport statement, but I don't see that there is anyway of specifying a page number.
The OpenArgs parameter could be used here, but you'd have to include code in the OnOpen event to handle selecting the page depending on the OpenArgs value.
I suppose I could determine the maximum number of results that typically fits in the report and then filter each report to cause the first "x" number of results to display...then the second set of "x" results, and so on. This, then, would be repeated for each report until no more records were available. That seems a bit inefficient, however.
Good luck ;) Sooner you than me.
Other thoughts?

Tangentially related, how difficult would it be to push these to a web page? Can it be done without a webserver?
Can't help there I'm afraid. You could ask in one of the web forums.
Jan 23 '07 #7
NeoPa
32,556 Expert Mod 16PB
NeoPa:
Please tell me if it is me, but this is a little more complicated than initially envisioned, especially since the GoToPage Method is only applicable to Forms. This strange looking code will, however, work. With the Timer Interval preset, the code will open rptJobs, rptEmployee (Page 1), rptEmployee (Page 2), rptEmployee (Page 3), and then rptTest. I'm curious to hear what you think, since there do not seem to be many alternatives to solving this problem and I do not want to throw this out there if a better solution exists. Thanks.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2. On Error Resume Next
  3.  
  4. Static Counter As Integer
  5.  
  6. Counter = Counter + 1
  7.  
  8. Select Case Counter
  9.   Case 1
  10.     DoCmd.Close acReport, "rptTest", acSaveNo
  11.     DoCmd.OpenReport "rptJobs", acViewPreview
  12.   Case 2
  13.     DoCmd.Close acReport, "rptJobs", acSaveNo
  14.     DoCmd.OpenReport "rptEmployee", acViewPreview
  15.   Case 3
  16.     'rptEmployee is already Open - go to Page 2
  17.     SendKeys "{F5}"
  18.     SendKeys "2{ENTER}"
  19.   Case 4
  20.     'rptEmployee is already Open - go to Page 3
  21.     SendKeys "{F5}"
  22.     SendKeys "3{ENTER}"
  23.   Case 5
  24.     DoCmd.Close acReport, "rptEmployee", acSaveNo
  25.     DoCmd.OpenReport "rptTest", acViewPreview
  26. End Select
  27.  
  28. If Counter = 5 Then Counter = 0
  29. End Sub
ADezii,
I have to say this isn't an area of great experience for me (as you may have guessed from my posts to date). Your solution seems to be workable and quite ingenious. I prefer to avoid using SendKeys myself where possible (It relies on the context remaining unchanged by the operator) but I can't think of a better method off the top of my head. It would be nice if there is a {Go to Page} procedure from within (or even without) the Report object itself, but I haven't needed it so I don't know.
Jan 23 '07 #8
ADezii
8,834 Expert 8TB
ADezii,
I have to say this isn't an area of great experience for me (as you may have guessed from my posts to date). Your solution seems to be workable and quite ingenious. I prefer to avoid using SendKeys myself where possible (It relies on the context remaining unchanged by the operator) but I can't think of a better method off the top of my head. It would be nice if there is a {Go to Page} procedure from within (or even without) the Report object itself, but I haven't needed it so I don't know.
Thanks for the response.
Jan 24 '07 #9
Thanks, to both of you, for the response! The code snippets have worked well, and I'm trying to do some additional work on them to suit the requirement.

Bottom line: I'm just not sure that Access is designed to provide the type of display that I'm being asked to create. Nevertheless, I sincerely appreciate the expert help!

Clint
Jan 24 '07 #10
NeoPa
32,556 Expert Mod 16PB
You're welcome.
There may be other ways but I'm not aware of them - they'd take a bit of digging to find if they're there I would think.
Good luck.
Jan 24 '07 #11

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

Similar topics

5
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
0
by: Newbie | last post by:
Through our ASP.NET application(C#), I am developing reports in powerpoint v 2003. The reports have graph objects which are refreshed and updated when the data on the web page changes. ...
5
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a...
2
by: Ron | last post by:
Hi everyone. Windows XP Pro/Access2000/2.4gig chip/512meg RAM/200GigDrive. I'm stumped. I've been involved in other things lately, but came back to the program I'm preparing and zipped into a...
1
by: Irfan Akram | last post by:
Hi Guys, I am trying to display a jpeg image of a scanned exam on the screen. I want to be displaying that on some part of the screen, and then on the same screen, I want to display marking...
3
by: hestres | last post by:
Hello, I'm working on some link styles for this page: http://www.house.gov/velazquez/lh0205tres/reports.html I want all the links to always display in red (#CC0000), but in IE6 and 7 they...
1
by: tanya2001 | last post by:
hi all now i have a query on crystal reports in .net.I have to generate a report in my webform by displaying one column vertically and other one horizontally....so how do u suggest...i should use...
7
by: google | last post by:
I am trying to automate the way reports are printed in an Access 2003 database - I have ~200 records (people) who require between 5 and 10 customized reports (depending on values within certain...
3
by: Loogie | last post by:
I want to create reports and I don't care if I use crystal reports or vb.net reports. I am using vb.net 2005 and the app pulls data from user created access db's and compact 2005 sdf's. Here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.