没有数据集架构且仅mysql查询的Crystal报表 [英] crystal reports without dataset schema and only mysql query

查看:59
本文介绍了没有数据集架构且仅mysql查询的Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我是这里的新用户.我想知道无需制作数据集架构就可以制作水晶报表.仅由mysql选择查询.

在此先感谢

hi to all

i am new user here. i want to know that is possible to make crystal reports without making dataset schema. only by mysql select query.

thanks in advance

推荐答案

听起来像您想连接到MySQL以直接获取数据的声音.如果是这样,请查看以下线程对话: Crystal Report是否可以访问MySQL数据库 [^ ]

这也将有所帮助:在Crystal Reports中使用Connector/ODBC [
Sounds like you want to connect to MySQL to get data directly. If so, have a look at the following thread conversation: Can crystal report access MySQL database[^]

This would help too: Using Connector/ODBC with Crystal Reports[^]


使用系统;
使用System.Collections.Generic;
使用System.ComponentModel;
使用System.Data;
使用System.Drawing;
使用System.Linq;
使用System.Text;
使用System.Windows.Forms;
使用CrystalDecisions.Shared;
使用CrystalDecisions.CrystalReports.Engine;
使用System.IO;
使用System.Drawing.Imaging;
使用System.Data.Odbc;

命名空间Mortgage_ERP_1
{
公共局部类DR_Bill:表格
{
DataSet1数据集= new DataSet1();
字符串帐单,ID,名称,添加,日期;
字符串cmdstring;
OdbcDataAdapter da;
cc = new Conncation();
CrystalReport1 myReport = new CrystalReport1();
FirmClass fc =新的FirmClass();
public DR_Bill(int Bill_No,字符串C_Name,字符串C_address,字符串Date,int ID,字符串ex_date)
{
InitializeComponent();
bill = Bill_No.ToString();
id = ID.ToString();
名称= C_Name;
添加= C_address;
日期=日期;

}
私有void DR_Bill_Load(对象发送者,EventArgs e)
{
cmdstring =从`girvi a/c`中选择" ID`,`描述," Girvi金额," GW,`NW`,"帐单日期,其中"帐单编号"=" +帐单+";
da = cc.Report(cmdstring);
dataset.Clear();
da.Fill(dataset,"DR Bill");
myReport.SetDataSource(dataset);
crystalReportViewer1.ReportSource = myReport;
myReport.SetParameterValue("Name",名称);
myReport.SetParameterValue("Address",add);
myReport.SetParameterValue("Bill No",bill);
myReport.SetParameterValue("Date",date);
myReport.SetParameterValue("C_Id",id);
myReport.SetParameterValue("F_Name",fc.F_Name);
myReport.SetParameterValue("F_Address",fc.F_Address);
myReport.SetParameterValue("F_Phone",fc.F_Phone);
myReport.SetParameterValue("F_Mobile",fc.F_Mobile);
myReport.SetParameterValue("F_Email",fc.F_email);
}


}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using System.IO;
using System.Drawing.Imaging;
using System.Data.Odbc;

namespace Mortgage_ERP_1
{
public partial class DR_Bill : Form
{
DataSet1 dataset = new DataSet1();
string bill, id,name,add,date;
string cmdstring;
OdbcDataAdapter da;
Conncation cc = new Conncation();
CrystalReport1 myReport = new CrystalReport1();
FirmClass fc = new FirmClass();
public DR_Bill(int Bill_No, string C_Name, string C_address, string Date, int ID, string ex_date)
{
InitializeComponent();
bill = Bill_No.ToString();
id = ID.ToString();
name = C_Name;
add = C_address;
date = Date;

}
private void DR_Bill_Load(object sender, EventArgs e)
{
cmdstring = "select `ID`,`Discription`,`Girvi Amount`,`GW`,`NW`,`Bill Date` from `girvi a/c` where `Bill No` = " + bill + "";
da = cc.Report(cmdstring);
dataset.Clear();
da.Fill(dataset, "DR Bill");
myReport.SetDataSource(dataset);
crystalReportViewer1.ReportSource = myReport;
myReport.SetParameterValue("Name", name);
myReport.SetParameterValue("Address", add);
myReport.SetParameterValue("Bill No", bill);
myReport.SetParameterValue("Date", date);
myReport.SetParameterValue("C_Id", id);
myReport.SetParameterValue("F_Name", fc.F_Name);
myReport.SetParameterValue("F_Address", fc.F_Address);
myReport.SetParameterValue("F_Phone", fc.F_Phone);
myReport.SetParameterValue("F_Mobile", fc.F_Mobile);
myReport.SetParameterValue("F_Email", fc.F_email);
}


}
}


这篇关于没有数据集架构且仅mysql查询的Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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