Click here to Skip to main content
       

Visual Basic

 
AnswerRe: Windows admin mode mistries PinmvpDave Kreskowiak30-Jan-13 8:26 
Questionserial number with project Pinmemberolivertechy29-Jan-13 15:33 
AnswerRe: serial number with project PinmvpEddy Vluggen30-Jan-13 8:17 
QuestionParse XML Response String And Get Usable Variables Pinmemberpjgoodis29-Jan-13 4:46 
AnswerRe: Parse XML Response String And Get Usable Variables PinmemberAlan N29-Jan-13 6:05 
GeneralRe: Parse XML Response String And Get Usable Variables Pinmemberpjgoodis29-Jan-13 22:05 
GeneralRe: Parse XML Response String And Get Usable Variables [modified] PingroupStyleTech Solutions Ltd4-Feb-13 6:28 
QuestionMicrosoft ReportViewer PinmemberIgaBaro28-Jan-13 16: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 PinmemberIgaBaro29-Jan-13 15:28 
QuestionHow to detect a Mobile device name PinmemberMoDy kareem28-Jan-13 3:55 
QuestionPLZ any one tell me the program to open an exe file with parallel port using visual basic Pinmemberkspcr26-Jan-13 0:20 
SuggestionRe: PLZ any one tell me the program to open an exe file with parallel port using visual basic PinmvpRichard MacCutchan26-Jan-13 1:25 
Questiondeveloping an software Pinmemberliltil1024-Jan-13 1:28 
AnswerRe: developing an software PinmvpRichard MacCutchan24-Jan-13 1:52 
AnswerRe: developing an software PinmvpDave Kreskowiak24-Jan-13 3:38 
Questioninsert data in single column of table in database fom difftern txtbox Pinmembersupriya93123-Jan-13 19:48 
QuestionRe: insert data in single column of table in database fom difftern txtbox PinmvpEddy Vluggen24-Jan-13 0:49 
AnswerRe: insert data in single column of table in database fom difftern txtbox PinmvpAbhinav S24-Jan-13 1:19 
AnswerRe: insert data in single column of table in database fom difftern txtbox Pinmemberujju.129-Jan-13 20:21 
QuestionEvents PinmemberMember 962135423-Jan-13 18:02 
AnswerRe: Events PinmvpRichard MacCutchan23-Jan-13 23:12 
AnswerRe: Events Pinmember ProgramFOX26-Jan-13 3:52 
QuestionText Box PinmemberMember 962135423-Jan-13 17:56 
AnswerRe: Text Box PinmvpEddy Vluggen24-Jan-13 0:48 
AnswerRe: Text Box PinmemberRichard Deeming24-Jan-13 1:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web01 | 2.8.141022.2 | Last Updated 23 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid