Crsytal repot打印多次 [英] Crsytal repot Print multiple Times

查看:75
本文介绍了Crsytal repot打印多次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在水晶报告中遇到问题帮我金心



我需要从两张桌子打印信息

1.客户表

2.Menu表,



这是我的代码...

  Dim 作为 字符串 = Request.QueryString(< span class =code-string>  id
Dim con As MySqlConnection(connectionString)
Dim rptDoc 作为 ReportDocument
Dim ds 作为 customerdataset
Dim dt 作为 DataTable

dt.TableName = Crystal Report示例
Dim da As MySqlDataAdapter( SELECT a。*,b。* FROM tb_customer a INNER JOIN tb_Menu b ON a.id = b.Qno WHERE Id =' + No + '和a.id = b.q< big>< / big> no Group通过菜单,con)
da.Fill(dt)
ds.Tables( 0 )。合并(dt)

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

解决方案

转到 部分专家> 选择详细信息部分>分页标签>点击' New Page After下的End of Section旁边的公式按钮,然后使用以下代码: 

PageNumber = 0 AND
RecordNumber = 5


I am facing Problem in Crystal report help me Gold hearted

I need to print information from Two tables
1.Customer Tables
2.Menu Tables,

in Visual studio i create new dataset , in designer view i add one datable and combine Two table when i load the Report its work nicely ,the problem is if a menu has 10 rows means the report will print 10 times , how to avoid it, i search all the forums , but couldn't solve the problem ( no duplication in Records , only in Pages )

This is my code...

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.q<big></big>no 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()

解决方案

Go to the Section Expert > Select the Details Section > Paging tab > click the formula button beside 'End of Section' under 'New Page After' and use this code:

PageNumber = 0 AND
RecordNumber = 5


这篇关于Crsytal repot打印多次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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