生成定期报告.... [英] Generate periodic report....

查看:90
本文介绍了生成定期报告....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发一个winforms应用程序,我想在周末,月,年自动生成月度,周度,年度报告。如果用户更改日期,则不应生成报告。



我可以按钮点击(手动)生成,但我希望它在周末,月份生成,我应该怎么做?



提前致谢。

Hi,
I am developing one winforms application for which i want to generate monthly, weekly, yearly reports automatically at the end of the week, month, year. and if user changes the date it should not generate report.

I can generate on button click(manually) but i want it to generate at the end of week, month, year how should i do it?

Thanks in advance.

推荐答案

1。增强您的程序以接受命令行参数,该参数告诉它生成哪个报告而无需用户交互。



2.对于每种类型的报告,在Windows中创建一个项目任务计划程序以所需频率使用适当的命令行参数运行程序。 Windows任务计划程序可在Windows客户端PC和Windows服务器上使用。您需要与您的客户讨论在哪里运行计划任务是最佳选择。我有一些在服务器上运行。我有一些在客户端上运行。这取决于....



我还有应用程序,用户有责任生成每周,每月,每年的年度报告。为什么?因为在我安排报告自动运行时,可能无法输入该时间段内的所有数据。我的所有报告生成例程都经过精心设计,以便在该时间段期间或之后的任何时间生成所需的时间段。这样,如果他们忘了,他们可以在以后的任何时间生成所需时间段的报告。
1. Enhance your program to accept a commandline parameter that tells it which report to generate without requiring user interaction.

2. For each type of report, create an item in the Windows Task Scheduler to run your program with an appropriate commandline parameter at the required frequency. Windows Task Scheduler is available on Windows client PCs and Windows Servers. You need to discuss with your client where to run the scheduled tasks is the best option. I have some that run on the server. I have some that run on a client. It depends....

I also have applications where it is the user''s responsibility to generate the weekly, monthly, annual reports. Why? Because they may not be done entering all the data for that time period at the time when I would have scheduled the report to run automatically. All of my report generation routines are designed so that they can be generated for a desired time period anytime during or after that time period. That way, if they forget, they can generate the report for the required timeframe at any later time.




您可以在应用程序启动时生成报告。每次申请开始时,都应检查是否已生成上周,月或年的报告。为此,您可以将标记值存储在db或a文件中,以表示周,月和年。生成报告时,请更改相应的标记值。
Hi,
You can generate report when your application starts. Every time the application starts, it should check if report of the last week, month or year has been generated or not. For that you can store a flag values in db or a in a file for week, month and year. When the report is generated, change the respective flag value.


这篇关于生成定期报告....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆