473,657 Members | 2,484 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

1)BookIssueDeta il:

fields : grno ,bookno,issueda t

2)studentMaster

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



now i have made a dataset : "bookissuedatas et" 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(st r1, cn)
dr = cmd.ExecuteRead er

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,StudentMa ster.StudentNam e,BookIssueDeta il.BookNo,BookI ssueDetail.Issu eDate from BookIssueDetail inner join studentmaster on studentmaster.g rno=BookIssueDe tail.grno where BookIssueDetail .bookno =" + bookno.ToString


da = New OleDbDataAdapte r(str, cn)
Dim ds As New DataSet
da.Fill(ds, "BookIssueDetai l,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 CrystalDecision s.CrystalReport s.Engine.Report Document)
InitializeCompo nent()
CrystalReportVi ewer1.ReportSou rce = l
CrystalReportVi ewer1.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 1573
balame2004
142 New Member
Try to set the specific table to the report instead of setting dataset as the datasource.

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

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

Similar topics

10
6359
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 records were still there. The data is entered and editted through the web interface in ASP. The web interface is accessed by anyone who has an account in our database. I am more of a web programmer, not a SQL server administrator, so not very...
1
10508
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 from a table in MS SQL 2000 to an Excel spreadsheet. I also need to automate this process so it can run nightly and each new day a new spreadsheet will be on a network share for us to pick-up.
0
1206
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 endingdate(smalldatetime). In crystal the report works fine after the parameters are met, but when loading the report into my c# app using the crystal report viewer, it asks for the parameters but does not show the report after they are met. The viewer shows up but no...
1
1293
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, as i press it, no response, My client complaint that it make them confuse. Can I remove it ? Thanks
2
2219
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 they want to show on the report. It can be anywhere from 1 - 10 columns. I found this Visual Basic code, but I can't convert to c# because I can't found AddFieldObject method in c#!! ¿? Public Sub AddToDetails() Dim crSection As CRAXDRT.Section
3
3044
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 devil of a time doing this. The problem is that my application uses an encapsulated data tier for accessing the database vs. accessing it directly via the client tier. However, EVERY example that I have ever seen for creating a Crystal Report at...
0
1347
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 its SQL Query at design time. Now I want to retrieve this query at run time from the front end using visual studio 2005. Any suggestion? Any code? Thanks in advance
1
17951
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 control. The help files state that in the form the contains the reportviewer control there is a tasks smart tags panel in design view. I don't see any such thing. Where do I need to look to see this panel? So I have been trying to follow...
0
14412
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 be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in access, Column A has the data type "memo".
0
8421
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8325
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8621
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7354
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.