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..
1 1573
Try to set the specific table to the report instead of setting dataset as the datasource.
Eg:
l.SetDataSource (ds.Tables("Boo kIssueDetail"))
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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.
|
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...
|
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
|
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
| |
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...
|
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
|
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...
|
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".
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |