Solved

Capture print date and hide report

Posted on 2011-02-28
9
329 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

773 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