Solved

Capture print date and hide report

Posted on 2011-02-28
9
331 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
[X]
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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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