在程序运行时创建报告 [英] create reporte in run time of programme

查看:75
本文介绍了在程序运行时创建报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi ..
即时通讯使用vb.net和sql server作为我的projet.我对此有问题.
在该项目中,用户可以在自己的用户界面中添加或删除表.我尝试为我的项目制作水晶报告.我按照以下步骤操作.
创造新的胜利;形成表格并将其拖动到报表中.然后使用报表向导添加新的Crystal报表,创建新的连接,oledb(ado),sql本机客户端,
然后输入服务器名称并选择数据库,然后我选择table并选择felds.最后完成向导,然后返回到报表查看器并选择datasourse作为Crystal report1.它的工作并将表数据显示为报表.然后我有问题.当用户在此程序中创建新表时,他们无法获取新表的报告.我如何解决这个问题.请帮我.为我可怜的英语和vb knowledgwe感到抱歉.
谢谢!!!

hi..
im using vb.net and sql server for my projet. i got problem on it.
in this project user can add or drop tables in user interface as there own. i try crystal report for my projet. i follow this steps.
create new win; form and drag crystal report veiwer to it. then add new crystal report, using report wizard, create new conection, oledb(ado) ,sql native client,
then type server name and select the database, then i choose table and there felds. finally complete wizard and then back to report viewer and select datasourse as crystal report1. its work and display table data as report. then i got problem.when user create new table in this programe they cant get reports for new table. how i fix this.problem. please help.me. sory for my poor english and vb knowledgwe .
thanks!!!

推荐答案

据我了解您的问题,我可以说您必须为此创建一个通用类,该类将具有水晶报表所需的一切. .

例如...该类应包括以下成员...您可以有更多,但这些是基本成员...

as far as i understood your question i can say that you must create a general class for that which will have everything a crystal report needs...

for example... that class should include the following members... you can have more but these are the basic ones...

CrystalReport (CRPT)
CrystalReportViewer (CRV)
Table
Query



另一方面,您必须具有可以接受以下参数的功能...



on the other hand you must have function which will accept the following parameters...

ShowReport(ByVal TableName As String, ByVal CRV As Object, ByVal CRPT As Object, ByVal Query As String, Optional ByVal ParameterValue As Object = Nothing)



其余的一切由您决定...



and the rest is upto you...


这篇关于在程序运行时创建报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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