473,382 Members | 1,545 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,382 software developers and data experts.

Rcdl Report using dataset not displaying report.

Gobindap
Expand|Select|Wrap|Line Numbers
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.     Dim ds as DataSet
  3.     Dim rep As LocalReport = ReportViewer1.LocalReport
  4.     rep.ReportPath = "F:\My Work\VB\Report\Report3.rdlc"
  5.     ds = obj.GetRecords("SELECT * from kar", "Kar")
  6.     Dim RDS As New ReportDataSource()
  7.     RDS.Name = ds.Tables("Kars")
  8.     RDS.Value = ds.Tables("Kar")
  9.     rep.DataSources.Add(RDS)
  10. End Sub
  11.  
  12. Public Function GetRecords(ByVal sql As String, ByVal tblName As String) As DataSet
  13.         ds = New DataSet()
  14.         da = New SqlDataAdapter(sql, cn)
  15.         da.Fill(ds, tblName)
  16.         Return ds
  17. End Function
May 10 '16 #1
0 974

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

Similar topics

0
by: Jag | last post by:
I have got a set of existing crystal report produces by the users with Crystal Report 9. They were created using a oledb connection to a sql server database. I would like to know how can I reuse...
0
by: Tor Inge Rislaa | last post by:
Hi I have designed a report based on an ADO.NET dataset. When previewing the data in the dataset it works OK. When I want to show the data in the CrystalReportViewer (run time) the Database Login...
0
by: Crystal Report - LoadSaveReportException | last post by:
I have a web system which will display a crystal report for clients. It is written in Visual Studio 2003, VB.Net and Crystal Report which comes with VS2003, running on Windows 2000. It works very...
0
by: John | last post by:
Hi, I am using VB in Visual Studio.Net and crystal report inside it. I have a question in creating a dataset to pass to the crystal report. The following is my problem that I need help to...
3
by: David P. Donahue | last post by:
Maybe this is an easy thing to do, but I'm just not seeing how it's done (or at least how it's done properly). I have a web service running on a remote machine which returns a DataSet. I can...
0
by: =?Utf-8?B?QW5nZWw=?= | last post by:
I am using the MS Report Viewer. I created a report (.rdlc) in my website. I set the report up using a datasource. I have the following code: Dim dta As New...
1
by: halaor | last post by:
I have my data filled in a DataTable, generated on runtime. I have a DataSet, into this DataSet i add my DataTable dataSet1.Tables.Add(datatable); Now I would like to show this simple table...
6
Shakss2
by: Shakss2 | last post by:
Hello all, Im displaying a report in excel. below is my code: Dim strPath As String ' Current path strPath = CurrentProject.Path & "\Adhoc_Report.xls" 'New workbook object
0
by: SLauren | last post by:
Hi, I am new to crystal report. Can anyone please suggest how can i generate a crystal report using dataset without a report object? I have a crystal report (.rpt) with a mapped dataset. How can...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.