Click here to Skip to main content
12,240,874 members (50,723 online)

Visual Basic

 
QuestionWindows admin mode mistries Pin
solankinkdpr30-Jan-13 2:11
membersolankinkdpr30-Jan-13 2:11 
AnswerRe: Windows admin mode mistries Pin
Eddy Vluggen30-Jan-13 8:51
mvpEddy Vluggen30-Jan-13 8:51 
GeneralRe: Windows admin mode mistries Pin
solankinkdpr30-Jan-13 20:07
membersolankinkdpr30-Jan-13 20:07 
AnswerRe: Windows admin mode mistries Pin
Eddy Vluggen30-Jan-13 23:35
mvpEddy Vluggen30-Jan-13 23:35 
GeneralRe: Windows admin mode mistries Pin
solankinkdpr31-Jan-13 3:29
membersolankinkdpr31-Jan-13 3:29 
GeneralRe: Windows admin mode mistries Pin
Eddy Vluggen31-Jan-13 4:21
mvpEddy Vluggen31-Jan-13 4:21 
AnswerRe: Windows admin mode mistries Pin
Dave Kreskowiak30-Jan-13 9:26
mvpDave Kreskowiak30-Jan-13 9:26 
Questionserial number with project Pin
olivertechy29-Jan-13 16:33
memberolivertechy29-Jan-13 16:33 
AnswerRe: serial number with project Pin
Eddy Vluggen30-Jan-13 9:17
mvpEddy Vluggen30-Jan-13 9:17 
QuestionParse XML Response String And Get Usable Variables Pin
pjgoodis29-Jan-13 5:46
memberpjgoodis29-Jan-13 5:46 
AnswerRe: Parse XML Response String And Get Usable Variables Pin
Alan N29-Jan-13 7:05
memberAlan N29-Jan-13 7:05 
GeneralRe: Parse XML Response String And Get Usable Variables Pin
pjgoodis29-Jan-13 23:05
memberpjgoodis29-Jan-13 23:05 
GeneralRe: Parse XML Response String And Get Usable Variables Pin
StyleTech Solutions Ltd4-Feb-13 7:28
groupStyleTech Solutions Ltd4-Feb-13 7:28 
QuestionMicrosoft ReportViewer Pin
IgaBaro28-Jan-13 17:30
memberIgaBaro28-Jan-13 17:30 
Hallo All,

I am having issues with Viewing report that I added to my project and I need your help please.

I am using Access DB, VB 2010, .NET4.5 and As you can tell I am in learning process, so I am new to VB.
Any help given is highly appreciated.

HERE are the Two error I am getting:
1 st one. I want to view Total Profits for all times.
Error "A data source instance has not been supplied for the date source 'AllTimeReportDataset'

I named this on the wizard when I was creating the report wizard but how do I add the data source.

2nd Error: Happens when I want to view Total profits between two Date:
HERE is the Error: The Report definition for the report 'TBS.TotalProfitsBetweenTwoDates.rdlc' has not been specified.



Here is my code:


Private Sub ShowReportBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowReportBtn.Click
If ReportComboBox.Text = "Total Profits for all Times" Then

'Fill the information for the report Selected.

Dim TA As New TBSDSTableAdapters.TotalProfitForALLTimeTableAdapter
Dim SelectedDS As New TBSDS
TA.Fill(SelectedDS.TotalProfitForALLTime)

'Clear previous report run (Data Source) and Display the new report selected

ReportViewer.LocalReport.DataSources.Clear()

'Create a new Data Source now ---selected report from Combo box ---In this case Total report for all time
'Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("TBS_TotalProfitForAllTime", SelectedDS.TotalProfitForALLTime)

Dim rds As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource

rds.Name = "TBSDS_TotalProfitForAllTime"
rds.Value = SelectedDS.TotalProfitForALLTime

'tell the report control to use the data source
'also use the report template created (rds)

ReportViewer.LocalReport.DataSources.Add(rds)
ReportViewer.LocalReport.ReportEmbeddedResource = "TBS.TotalProfitForAllTime.rdlc"
ReportViewer.RefreshReport()

ElseIf ReportComboBox.Text = "Total Profits between two Date" Then

Dim TA As New TBS_RestDSTableAdapters.TotalProfitForALLTimeTableAdapter
Dim SelectedDS As New TBSDS
TA.FillByFilteringBetweenTwoDates(SelectedDS.TotalProfitForALLTime, DateTimePicker1.Value, DateTimePicker2.Value)

'Clear previous report run (Data Source) and Display the new report selected

ReportViewer.LocalReport.DataSources.Clear()

'Create a new Data Source now ---selected report from Combo box ---In this case Total report for all time
''''Dim RDS As New Microsoft.Reporting.WinForms.ReportDataSource("TBS_TotalProfitForAllTime", SelectedDS.TotalProfitForALLTime)

Dim rds As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource
rds.Name = "TBS_TotalProfitForAllTime"
rds.Value = SelectedDS.TotalProfitForALLTime

'tell the report control to use the data source
'also use the report template created (rds)

ReportViewer.LocalReport.DataSources.Add(rds)
ReportViewer.LocalReport.ReportEmbeddedResource = "TBS.TotalProfitsBetweenTwoDates.rdlc"
ReportViewer.RefreshReport()


End If

End Sub

Again, Any help given is highly appreciated.

Thank you in advance.
AnswerRe: Microsoft ReportViewer Pin
IgaBaro29-Jan-13 16:28
memberIgaBaro29-Jan-13 16:28 
QuestionHow to detect a Mobile device name Pin
MoDy kareem28-Jan-13 4:55
memberMoDy kareem28-Jan-13 4:55 
QuestionPLZ any one tell me the program to open an exe file with parallel port using visual basic Pin
kspcr26-Jan-13 1:20
memberkspcr26-Jan-13 1:20 
SuggestionRe: PLZ any one tell me the program to open an exe file with parallel port using visual basic Pin
Richard MacCutchan26-Jan-13 2:25
mvpRichard MacCutchan26-Jan-13 2:25 
Questiondeveloping an software Pin
liltil1024-Jan-13 2:28
memberliltil1024-Jan-13 2:28 
AnswerRe: developing an software Pin
Richard MacCutchan24-Jan-13 2:52
mvpRichard MacCutchan24-Jan-13 2:52 
AnswerRe: developing an software Pin
Dave Kreskowiak24-Jan-13 4:38
mvpDave Kreskowiak24-Jan-13 4:38 
Questioninsert data in single column of table in database fom difftern txtbox Pin
supriya93123-Jan-13 20:48
membersupriya93123-Jan-13 20:48 
QuestionRe: insert data in single column of table in database fom difftern txtbox Pin
Eddy Vluggen24-Jan-13 1:49
mvpEddy Vluggen24-Jan-13 1:49 
AnswerRe: insert data in single column of table in database fom difftern txtbox Pin
Abhinav S24-Jan-13 2:19
mvpAbhinav S24-Jan-13 2:19 
AnswerRe: insert data in single column of table in database fom difftern txtbox Pin
ujju.129-Jan-13 21:21
memberujju.129-Jan-13 21:21 
QuestionEvents Pin
Member 962135423-Jan-13 19:02
memberMember 962135423-Jan-13 19:02 
AnswerRe: Events Pin
Richard MacCutchan24-Jan-13 0:12
mvpRichard MacCutchan24-Jan-13 0:12 
AnswerRe: Events Pin
ProgramFOX26-Jan-13 4:52
member ProgramFOX26-Jan-13 4:52 
QuestionText Box Pin
Member 962135423-Jan-13 18:56
memberMember 962135423-Jan-13 18:56 
AnswerRe: Text Box Pin
Eddy Vluggen24-Jan-13 1:48
mvpEddy Vluggen24-Jan-13 1:48 
AnswerRe: Text Box Pin
Richard Deeming24-Jan-13 2:42
memberRichard Deeming24-Jan-13 2:42 
QuestionMasked Textbox Pin
Member 962135423-Jan-13 18:50
memberMember 962135423-Jan-13 18:50 
AnswerRe: Masked Textbox Pin
Richard MacCutchan24-Jan-13 0:09
mvpRichard MacCutchan24-Jan-13 0:09 
QuestionVb 6.0 youtube video downloader Pin
Nassimch23-Jan-13 9:24
memberNassimch23-Jan-13 9:24 
AnswerRe: Vb 6.0 youtube video downloader Pin
Dave Kreskowiak23-Jan-13 12:17
mvpDave Kreskowiak23-Jan-13 12:17 
QuestionHow to convert vb.net application to work online Pin
napolewn22-Jan-13 1:54
membernapolewn22-Jan-13 1:54 
AnswerRe: How to convert vb.net application to work online Pin
David Mujica22-Jan-13 4:03
memberDavid Mujica22-Jan-13 4:03 
QuestionHow to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev20-Jan-13 4:06
memberQuickBooksDev20-Jan-13 4:06 
AnswerRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Eddy Vluggen21-Jan-13 4:31
mvpEddy Vluggen21-Jan-13 4:31 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev21-Jan-13 6:28
memberQuickBooksDev21-Jan-13 6:28 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Eddy Vluggen21-Jan-13 6:43
mvpEddy Vluggen21-Jan-13 6:43 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev21-Jan-13 7:49
memberQuickBooksDev21-Jan-13 7:49 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev22-Jan-13 1:21
memberQuickBooksDev22-Jan-13 1:21 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Eddy Vluggen22-Jan-13 3:21
mvpEddy Vluggen22-Jan-13 3:21 
AnswerRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Mike Meinz21-Jan-13 9:16
memberMike Meinz21-Jan-13 9:16 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev21-Jan-13 10:38
memberQuickBooksDev21-Jan-13 10:38 
QuestionMS Graph in Access 2007 VBA Application Pin
satcomengineer19-Jan-13 8:48
membersatcomengineer19-Jan-13 8:48 
AnswerRe: MS Graph in Access 2007 VBA Application Pin
Eddy Vluggen20-Jan-13 3:38
mvpEddy Vluggen20-Jan-13 3:38 
Questionvb6.0 Pin
Barun sengupta18-Jan-13 22:39
memberBarun sengupta18-Jan-13 22:39 
AnswerRe: vb6.0 Pin
Eddy Vluggen20-Jan-13 3:36
mvpEddy Vluggen20-Jan-13 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 29 Apr 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid