创建我的新报告(水晶报告新手) [英] creating my new report (new to crystal report)

查看:53
本文介绍了创建我的新报告(水晶报告新手)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是vb.net和MSsql。

1。在我的报告的"标题"字段中,我想显示当前用户的详细信息。 (用户名是db表中的唯一键,当前用户名保存在我的程序中:datamoduleUser.userName,我可以编写数据集,dataadapter可以选择详细信息,只是不提供如何连接到crystal report以便报告可以显示详细信息)

2。在我的报告的"详细信息"部分中,我想显示从多个表中检索的详细信息,其中涉及来自不同表的2个参数。 (这里我想我需要另一个数据集,同样的问题,我无法将它从程序链接到报告,如果我将报告的SetDataSource添加到"标题"部分的数据集中,那么"详细信息"部分呢?
<可以任何人PLZ指导我如何创建这个报告PLZ?

I use vb.net and MSsql.

1. In my report's "header" field, i want to display a details of the current user. (the user name is a unique key in db table and the current user name is held in my program: datamoduleUser.userName, i can code a dataset, dataadapter to select the details, just not suer how to connect to crystal report so that the report can display the details)

2. In my report's "details" section, i want to display a details that are retrieved from multiple tables which involves 2 parameters from different table. ( here i think i need another dataset, same problem, i cant link it from program to report, also, if i SetDataSource of the report to the dataset for "header" section, what about "details" section?

can anyone plz guide me how to create this report plz?

推荐答案

我通过这些代码解决了第1点问题:

'获取标题字段数据
            ModuleUser.frmCRCurTestDetails.SqlSelectCommandGetRptTitleValues.Parameters("@ RID ")。价值= ModuleUser.curResultID
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues.Clear()
&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; ModuleUser.frmCRCurTestDetails.SqlDataAdapterGetRptTitleValues.Fill(ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues)

I solved point 1 problem by these chunk of code:

'get title fields data
            ModuleUser.frmCRCurTestDetails.SqlSelectCommandGetRptTitleValues.Parameters("@RID").Value = ModuleUser.curResultID
            ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues.Clear()
            ModuleUser.frmCRCurTestDetails.SqlDataAdapterGetRptTitleValues.Fill(ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;        crystalRe portCurResult.SetDataSource(ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues)

现在,更令人头疼的是:因为我已经用DsGetRptTitleValues填充了填充报告的数据源,我怎样才能放入另一个包含所需数据的数据源第2点?

            crystalReportCurResult.SetDataSource(ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues)


Now, more headache: since i fill filled report's datasource with the DsGetRptTitleValues already, how can i put in another datasource which contains the data required by point 2?


这篇关于创建我的新报告(水晶报告新手)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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