简体   繁体   English

具有水晶报表的C#来自不同表的列

[英]C# with crystal reports columns from different tables

I think this was simple for some C# masters here.. 我认为这对某些C#管理员来说很简单。

Language: VS 2010 C# Windows Application Database: MySQL Workbench CE Reporting: Crystal Reports 语言:VS 2010 C#Windows应用程序数据库:MySQL Workbench CE报告:Crystal Reports

I can generate a report from a single table but when I add a columns from the other table, the data of my report was becoming blank.. only the column name was left in the report... This Was My Screenshots Of My Work and My Source Code .... 我可以从一个表中生成报告,但是当我从另一个表中添加列时,报告的数据将变为空白..在报告中仅保留了列名... 这是我的工作的屏幕截图我的源代码 ....

Advance Thank You To Those Who Wants To Help Me... 预先感谢那些想帮助我的人...

I think your "productioninformation" table is empty from the Crystal Reports point of view. 从Crystal Reports的角度来看,我认为您的“生产信息”表为空。

Your query makes a inner join and returns a projection combining the two tables. 您的查询进行内部联接,并返回结合两个表的投影。 So your dataadapter has only one table. 因此,您的数据适配器只有一个表。

Hence, you need to break your query in two, so that the dataadapter will really have two tables or you need to change the Crystal Reports data schema to complies to your unique table in the dataadapter (if you are using a XSD schema, change it). 因此,您需要将查询分成两部分,以便dataadapter确实有两个表,或者您需要更改Crystal Reports数据模式以使其符合dataadapter中的唯一表(如果使用XSD模式,请对其进行更改)。

You are using inner join between two tables ( productioninformation and warehouseinventory ), so all the data that is same on both table (depending on ProductCode condition) is binding, but i think one of your table does not fill the condition so that your data is showing. 您正在使用两个表( productioninformation和Warehouseinventory )之间的内部联接 ,因此两个表上的所有数据相同(取决于ProductCode条件)是绑定的,但是我认为您的表之一不能满足条件,因此您的数据是显示。

you should use Left inner join in your query where you using inner join. 您应该在使用内部联接的查询中使用Left内部联接。

Maybe it will solve your problem. 也许它将解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM