C#水晶报表 [英] C# Crystal Report

查看:91
本文介绍了C#水晶报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

打开报表时,如何从C#应用程序访问Crystal报表而不必每次都写在数据库的用户名和密码开头的情况下?
我有一个Oracle数据库XE.

Hello,

How can I access from a C# application a Crystal Report without writing everytime at the begining the user name and the password of the database when I open the Report ?
I have an Oracle Database XE.

推荐答案

我不确定您的体系结构,但是我永远不建议您从.Net应用程序中的报告直接连接到数据库.确实非常不灵活,尤其是当您要更改服务器时.每次您都需要修复连接详细信息.

一种更好的方法是添加一个中间层,特别是适合于Crystal报表的是键入的数据集,甚至只是一个模式.
这样,您要做的就是根据您的体系结构在项目级别上更改连接字符串.

您在数据集中填写所需的表/视图,然后


< b&report.SetDataSource(您的数据集)</b>
I am not sure about your architecture, but i will never recommend connecting directly to database from your reports in your .Net application. Very inflexible indeed, especially when you will change your server. Everytime you will need to fix connection details.

A way better approach is to add a middle layer, esp suitable for crystal report is a typed data set or even simply a schema.
This way all you will do is change the connection sting on the project level depending on your architecture.

You fill in the required tables/views in the dataset and then


<b>report.SetDataSource(yourdataset)</b>


您好
我有一个.js文件.我已经在网站的主页上引用了它.我需要在内容页面上调用它.我已经在内容页面上调用了它,但是知道null:(((
Hi
I have a .js file.I have referenced it in Master page on my Web site.I need to call that on Content page.I had called that on my content page but it shows an error knowing null :((


这篇关于C#水晶报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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