在数据库已连接时,是否需要添加数据集或数据表才能生成水晶报告? [英] Do I need to add dataset or datatable when a database is already connected, to make crystal reports?

查看:45
本文介绍了在数据库已连接时,是否需要添加数据集或数据表才能生成水晶报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C#做一个VS项目,我正在与Crystal Reports挣扎。我已经有一个连接到该程序的SQL数据库,现在我正在尝试使用该数据库生成报告。我已经阅读了其他论坛,了解如何创建Crystal Reports,他们似乎都提到了添加数据集或数据表。当我使用Crystal Report向导时,它会向我显示我需要的所有表。那么我是否还需要为报告添加数据集才能使用,或者我是否可以使用我在数据库中已经可以在向导中看到的表格?我帮助解决这个问题,因为我的项目是星期一到期的,并且报告确实让我回头了



我尝试了什么:



我试图添加我已经看到的表,而不添加新的数据集或数据表。信息似乎到处都是,但它就在那里。也许我应该直接使用存储过程而不是表格

I'm doing a VS project in C# and I'm struggling with Crystal Reports. I already have an SQL database connected to the program and am now trying to generate reports using the database. I have read through other forums on how to create Crystal Reports and they all seem to mention the addition of a dataset or datatable. When I use the Crystal Report wizard, it shows me all the tables I need. So do I still need to add a dataset for the report to work off of or can I use the tables from my database that I can already see on the wizard? Please assist me with this issue as my project is due Monday and the reporting is really setting me back

What I have tried:

I have tried to add the tables I already see, without adding a new dataset or datatable. The information seems to be all over the place but it is there. Maybe I should use the stored procedures instead of the tables directly

推荐答案

嗯,你可以,但你没必要,因为你可以动态地做到这一点 - 通过代码;)

检查:教程:Visual Studio的Crystal Reports [ ^ ] - 数据连接教程部分。
Well, you can, but you don't have to, because you can do it in dynamic way - via code ;)
Check this: Tutorials: Crystal Reports for Visual Studio[^] - Data Connectivity Tutorials section.


这篇关于在数据库已连接时,是否需要添加数据集或数据表才能生成水晶报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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