Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Capture print date and hide report

Posted on 2011-02-28
9
330 Views
Last Modified: 2012-05-11
hi, I am displaying a crystal report that displays record for particular user.

Requirement is like 1. If Print of that report is taken out, then that user should not be visible that for 1 month (30 days to be precise). Hence if i print the report on Jan 1 2011 for user John Smith, that record for John Smith should not appear till Jan 30 2011, On Jan 31, that record should again come up in report.

I'm using

Visual Studio 2005 (C#)
Crystal Report (Crystal Report viewer to view reports)
My Query:

How to capture print date?
How should i proceed to fulfill my requirement?
Please guide me esp in the Logic department :-)
0
Comment
Question by:meispisces
9 Comments
 
LVL 7

Author Comment

by:meispisces
ID: 34997517
no comments..??
0
 
LVL 3

Expert Comment

by:mpeaden2
ID: 34997732
I don't fully understand the question. You want to capture the print date for a user, and display a report for everything that was printed for the previous month?

For starters, I would capture the print event and store the date/time in a db. Use the DateAdd() function to pull the previous months dates and display them in the report.
0
 
LVL 10

Expert Comment

by:John Claes
ID: 34997839
meispisces:

I would suggest the folowing :

1) By calling the Print Event
* Create your report
* Send to printer
* Change Record.ReactiveAt => Record.ReactiveAt .AddDays(30);
* Save the Record

If your using a PrintPreview : you should also try to capture the PrintEvent so do this action Yourself.
The printEvent can be handled ;-)

regards
poor beggar
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 7

Author Comment

by:meispisces
ID: 34998388
@poor_beggar: i guess u are referencing your answer wrt crystal reports..?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34998392
Is this a report limited to 1-month at a time or are you loking at longer periods?

How often are you running the report?

mlmcc
0
 
LVL 7

Author Comment

by:meispisces
ID: 34998817
Report could is limited to 1 month. by 1 month i mean that say on Mar 1 i run a report, printed on mar 1 only for user John.

Now user John's report should not appear when i click "View Report" until Apr 1.

Now on Apr 4 i again printed John Report (some data modifications, if any) then till May 4 i should not see him again... Hence the cycle goes on..

Hope thats clear.let me know if not.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34998962
So you are saying if you run the report today and John appears for 28 Feb then no records for John should appear until the report is run again on 30 Mar?

Reports have no knowledge of previous runs so you will have to somehow capture what was printed then save that information to a database that can be checked when the report is run again.

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35275378
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question