如何通过从Windows应用程序中的数据库中选择ID在Crystal Report中显示数据 [英] how to show data in crystal report by selecting id from database in windows application

查看:78
本文介绍了如何通过从Windows应用程序中的数据库中选择ID在Crystal Report中显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人告诉我如何通过在Windows应用程序中选择我的代码中的id来显示水晶报表中的数据,

Pls some tell that how to show data in crystal report from database by selecting id in windows application my code is,

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            CrystalReport1 rpt = new CrystalReport1();
            DataSet ds = c.resume(Convert.ToDouble(comboBox1.Text));
            //DataSet ds = c.resume();
          //  DataTable dt = ds.Tables[0];
            rpt.SetDataSource(ds.Tables[0]);
            
           // crystalReportViewer1.ReportSource = dt;
            crystalReportViewer1.ReportSource = rpt;
           
            //All_view_report obj_All_view_report = new All_view_report();
            ////obj_All_view_report.ParentForm = Parent;
            //obj_All_view_report.crystalReportViewer1.ReportSource = rpt;
            //obj_All_view_report.Show();
            
        }


请有人告诉我,我的数据没有从数据库中显示出来,请帮助我......


Pls some one tell, My data is not displaying from database, pls help me......

推荐答案

您将需要提供更多信息如果您需要有关此问题的任何帮助.

您的数据集是否正确填充?调试时,您是否看到数据?如果不是这样,问题可能出在c.resume()函数中,而我们在没有看到该代码的情况下无法帮助您解决问题.

否则,它可能在Crystal Report中.您是否在数据库专家"菜单中正确设置了链接?

您说您的数据没有显示...所有数据?还是只是细节部分?您收到任何错误消息吗?

您可能要先研究 CP文章 [ ^ ].
You''re going to need to provide more information if you want any help on this issue.

Is your dataset filled properly? When you debug it, do you see your data? If not the problem could be in the c.resume() function and we can''t help you fix it without seeing that code.

Otherwise it could be in the Crystal Report. Did you setup your links properly in the Database Expert menu?

You say your data is not displaying...all of the data? Or just the detail section? Do you get any error messages?

You may want to start by researching crystal reports in the CP Articles[^].


这篇关于如何通过从Windows应用程序中的数据库中选择ID在Crystal Report中显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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