可是要生成如下樣式報表如何用代碼啊??????
_______________________
| 組:AQ | 組
|---------------------|
| A B C D E | 表頭區
|---------------------|
| As 5 10 8 5 | 數
| bd 54 58 89 62| 據
| aw 0 5 2 2 | 區
|---------------------|
| 3 69 73 99 69| 匯總區
|_____________________|
_______________________
| 組:Brrr | 組
|---------------------|
| A B C D E | 表頭區
|---------------------|
| A! 15 10 8 5 | 數
| d@ 54 58 80 2 | 據
| sd 0 5 2 2 | 區
|---------------------|
| 3 69 73 90 9 | 匯總區
|_____________________|
像這我隻有以DataEnvironment加DATAreport中實現吧,但不能重新打開報表,我隻知道這方法,當然大家肯定有好的方法能實現這報表的,還望指點,謝謝!
_______________________
| 組:AQ | 組
|---------------------|
| A B C D E | 表頭區
|---------------------|
| As 5 10 8 5 | 數
| bd 54 58 89 62| 據
| aw 0 5 2 2 | 區
|---------------------|
| 3 69 73 99 69| 匯總區
|_____________________|
_______________________
| 組:Brrr | 組
|---------------------|
| A B C D E | 表頭區
|---------------------|
| A! 15 10 8 5 | 數
| d@ 54 58 80 2 | 據
| sd 0 5 2 2 | 區
|---------------------|
| 3 69 73 90 9 | 匯總區
|_____________________|
像這我隻有以DataEnvironment加DATAreport中實現吧,但不能重新打開報表,我隻知道這方法,當然大家肯定有好的方法能實現這報表的,還望指點,謝謝!
解决方案 »
- 动态创建winsock控件: server端close了连接,但客户端仍然会连接
- 下载RAR文件问题,事关饭碗,,,急死人啊,各位兄弟行行好吧。
- 请教:用程序新创建一个图形image控件,如何对他进行赋上图片?
- 关于超级兔子。。
- 如何在RichtextBox中让选中的行置顶,有点像 mshflexgrid 中的topRow 属性
- 怎样获得一个应用程序当前打开窗口上所有控件的hwnd?
- sql server存储过程问题:(参数返回)
- 紧急求助!水晶报表在数据库加密码后无法使用!
- 怎样比较两个图象是否相同?
- 如何使用SQL语句在表末尾追加一条记录?
- 一个很弱的问题!!@@@@@
- 急~~在线等待~~
Public cnn As New ADODB.Connection
Public rst As New ADODB.Recordset
Public cnnstr As String '联络数据的字符串Sub conn()
cnnstr = "Provider=msdatashape;data provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
cnn.ConnectionString = cnnstr
cnn.Open
End Sub'打印之前运行connsub 打印()Dim rststr As Stringrststr = " SHAPE {select A,B,C,D,E from 表 } as newtab compute newtab by 分组字段1"rst.Open rststr, cnn, adOpenKeyset, adLockOptimistic, adCmdTextWith rep
Set .DataSource = rst
.Sections(2).Controls("text1").DataField = "分组字段1"
.Sections(3).Controls("text2").DataMember = "newtab"
.Sections(3).Controls("text2").DataField = "A"
.Sections(4).Controls("Function1").DataMember = "newtab"
.Sections(4).Controls("Function1").DataField = "A"
...
.Show
End With
end sub
並且是連紙,要是能自動得到針打或能打印出此紙張的打印機就好了
還望幫忙,謝謝!
怎麼樣得到.Sections(4).Controls("Function1").DataField = "A"的記錄數而非匯總請教設置為何值