473,396 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

data is nt seen in Cyrstal report in VB.net when there are twio or more table in DS..

I am preparing a crystal report for library system...
two tables..

1)BookIssueDetail:

fields : grno ,bookno,issuedat

2)studentMaster

fileds: grno,stdename,(and lots more)..only these filed are req to display...



now i have made a dataset : "bookissuedataset" which have two table which are assign above.

these is my code on print button

**********

Dim str, str1 As String
Dim bookno As Integer

str1 = "Select bookno from bookmaster where bookname = '" + cmbName.Text + "'"
cmd = New OleDbCommand(str1, cn)
dr = cmd.ExecuteReader

If dr.HasRows Then
While dr.Read
bookno = dr(0).ToString
End While
End If

Dim l As New BookIssueDetail //this is my report name

str = "select BookIssueDetail.grno,StudentMaster.StudentName,Boo kIssueDetail.BookNo,BookIssueDetail.IssueDate from BookIssueDetail inner join studentmaster on studentmaster.grno=BookIssueDetail.grno where BookIssueDetail.bookno =" + bookno.ToString


da = New OleDbDataAdapter(str, cn)
Dim ds As New DataSet
da.Fill(ds, "BookIssueDetail,StudentMaster")
l.SetDataSource(ds)


Dim frm As New frmReportVeiwer(l) //this call a new form which have only reportviewer added in it.its code is dislpaly below
frm.Show()
**********


Public Class frmReportVeiwer

Public Sub New(ByVal l As CrystalDecisions.CrystalReports.Engine.ReportDocum ent)
InitializeComponent()
CrystalReportViewer1.ReportSource = l
CrystalReportViewer1.Refresh()
End Sub


End Class
*******


this is my code...this work fine when i have only one table in my dataset but when i have 2 or more table in my dataset then my crystal report cpe blank.no field is displayed..
..all d report dislay all the field when i have only one table in my dataaset..

pleae guide me in this matter..
i dont know i m missing a big ort small point here but this thing is killing me...my almost proj is done but i am stuck on this thing..
May 5 '09 #1
1 1565
balame2004
142 100+
Try to set the specific table to the report instead of setting dataset as the datasource.

Eg:
l.SetDataSource(ds.Tables("BookIssueDetail"))
May 6 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: HB Kim | last post by:
Hello, What could possibly cause data in the SQL server database to be removed, except being deleted manually? We had a couple of situations where data in certain records disappeared although the...
1
by: Alex | last post by:
Hi all, I've seen this noted in many posts, but nothing I've checked out gives me any clue on how to do this. Basically as my topic says, I have a DTS and I simply need to export some data...
0
by: murl | last post by:
I have created a crystal report using crystal9.0, that is linked to a stored procedure in sql2k which requires 2 parameters to be met, a beggining date(smalldatetime) and a...
1
by: Agnes | last post by:
I use vb.net to preview the report (it is designed by cyrstal report), and there is "X" button on the left hand side of "refresh", when I mouse on"X" button , it said "close current view" However,...
2
by: Ümit Kavala | last post by:
Is it possible to design a report at Runtime? What I am trying to do is create a very flexible report to have a different amount of columns. The user can choose the fields from a database table...
3
by: Tyranno.Lex | last post by:
I am using Visual Studio .NET 2003 and have successfully deployed a commercial web application written in C# and ASP.NET. I am now wanting to add reporting using Crystal Reports and am having a...
0
by: anamika | last post by:
Hi We all know its very easy to pass a sql query to Crystal Report from vb.net However, my requirement is that I want something which is exactly opposite to this. My Cyrstal Report has generated...
1
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.