如何解决Crystal Report中的重复页面问题 [英] How Do I Solve Duplicate Page In Crystal Report

查看:94
本文介绍了如何解决Crystal Report中的重复页面问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在水晶报告中面临重复页面,

我的东西是:

表客户:有1(一)行

表菜单有超过一行,

我使用下面的查询来组合两个表并打印

查询:

I am facing duplicate page in crystal report ,
My Stuff is :
Table Customer : has 1 (one ) row
Table Menu has More then one rows ,
I used the below query to combine Two tables and print
Query:

SELECT a.*,b.* FROM tb_customer a INNER JOIN  tb_Menu b ON a.id=b.Qno WHERE Id = 100 and a.id=b.qno





在crsytal报告中(视觉工作室我创建了一个数据集,我添加了一个数据表并添加了所有列从表A和表B),



并详细设计水晶报告部分i填写客户表信息并添加子报告和填充菜单记录(记录打印a我的愿望)但问题是,如果一个菜单有5个项目意味着它将5页副本(没有记录重复,)页面复制hapens,帮我解决它..我的完整代码如下



In crsytal Report( visual studio I creat one Dataset inside that i add one datatable and add all the column from Table A and Table B ) ,

and design the crystal report in detail section i fill customer table information and add sub report and fill menus Records(Records Print as my wish) but the problem is if a menu has 5 items means it will 5 copy of pages ( no record duplication , ) Page Duplication hapens , Help me to solve it .. my full code as follows

Dim No As String = Request.QueryString("id")
       Dim con As New MySqlConnection(connectionString)
       Dim rptDoc As New ReportDocument
       Dim ds As New customerdataset
       Dim dt As New DataTable

       dt.TableName = "Crystal Report Example"
       Dim da As New MySqlDataAdapter("SELECT a.*,b.* FROM tb_customer a INNER JOIN  tb_Menu b ON a.id=b.Qno WHERE Id='" + No + "' and a.id=b.qno Group by menu  ", con)
       da.Fill(dt)
       ds.Tables(0).Merge(dt)

       rptDoc.Load(Server.MapPath("Confirm Order.rpt"))
       rptDoc.SetDataSource(ds)
       ConfirmOrder.ReportSource = rptDoc
       rptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, Page.Title)
       con.Close()
       con.Dispose()





已修复的代码块



code blocks fixed

推荐答案

可能的原因

Crystal Reports:删除重复值 [ ^ ]

处理重复记录或表格膨胀 [ ^ ]

排除Crystal Reports中的重复记录 [ ^ ]
Possible reasons
Crystal Reports: Remove Duplicate Values[^]
Dealing with duplicate records or "table inflation"[^]
Troubleshooting "Duplicate Records" in Crystal Reports[^]


这篇关于如何解决Crystal Report中的重复页面问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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