简体   繁体   English

在Windows窗体应用程序中重复控件

[英]Repeating controls in windows form application

I am developing a Windows Forms application to generate incentive reports for staff in different groups. 我正在开发Windows窗体应用程序,以为不同组的员工生成激励报告。 In order to match the report template, I need to manually put controls in the form for only one staff. 为了匹配报告模板,我需要手动将控件放入表单中,仅供一名员工使用。 If I finished all the logic inside, how can I make it dynamic so that it could auto generate reports for all the staff by using same template? 如果我完成了所有内部逻辑,如何使其动态化,以便可以使用同一模板为所有员工自动生成报告?

Have you considered using SQL Server Reporting Services? 您是否考虑过使用SQL Server Reporting Services? This plugs into Visual Studio nicely and makes reporting very simple. 这样可以很好地插入Visual Studio,并使报表非常简单。 It is a great option if your business already has a SQL Server license. 如果您的企业已经拥有SQL Server许可证,那么这是一个不错的选择。

Also, it is very difficult to give a detailed technical response without any technical details about the way in which you are implementing these templates/reports/forms. 此外,如果没有有关实现这些模板/报告/表格的方式的任何技术细节,也很难给出详细的技术响应。 Please elaborate. 请详细说明。

If you want to do it dynamically, you can setup a database in which information about the controls required for a staff member will be stored. 如果要动态执行此操作,则可以设置一个数据库,该数据库中将存储有关工作人员所需控件的信息。 Now while the form loads, you can check what alterations need to be done for a particular staff member, over and above the template. 现在,在加载表单时,您可以检查需要在模板上方为特定工作人员进行哪些更改。

Hope this helps ! 希望这可以帮助 ! For more details, you will need to post some code snippets and would be able to help in details. 有关更多详细信息,您将需要发布一些代码段,并且能够提供详细帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM