Click here to Skip to main content
       

Visual Basic

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: Windows admin mode mistriesmvpEddy Vluggen30-Jan-13 7:51 
GeneralRe: Windows admin mode mistriesmembersolankinkdpr30-Jan-13 19:07 
AnswerRe: Windows admin mode mistriesmvpEddy Vluggen30-Jan-13 22:35 
GeneralRe: Windows admin mode mistriesmembersolankinkdpr31-Jan-13 2:29 
GeneralRe: Windows admin mode mistriesmvpEddy Vluggen31-Jan-13 3:21 
AnswerRe: Windows admin mode mistriesmvpDave Kreskowiak30-Jan-13 8:26 
Questionserial number with projectmemberolivertechy29-Jan-13 15:33 
AnswerRe: serial number with projectmvpEddy Vluggen30-Jan-13 8:17 
QuestionParse XML Response String And Get Usable Variablesmemberpjgoodis29-Jan-13 4:46 
AnswerRe: Parse XML Response String And Get Usable VariablesmemberAlan N29-Jan-13 6:05 
GeneralRe: Parse XML Response String And Get Usable Variablesmemberpjgoodis29-Jan-13 22:05 
GeneralRe: Parse XML Response String And Get Usable Variables [modified]groupStyleTech Solutions Ltd4-Feb-13 6:28 
QuestionMicrosoft ReportViewermemberIgaBaro28-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 ReportViewermemberIgaBaro29-Jan-13 15:28 
QuestionHow to detect a Mobile device namememberMoDy kareem28-Jan-13 3:55 
QuestionPLZ any one tell me the program to open an exe file with parallel port using visual basicmemberkspcr26-Jan-13 0:20 
SuggestionRe: PLZ any one tell me the program to open an exe file with parallel port using visual basicmvpRichard MacCutchan26-Jan-13 1:25 
Questiondeveloping an softwarememberliltil1024-Jan-13 1:28 
AnswerRe: developing an softwaremvpRichard MacCutchan24-Jan-13 1:52 
AnswerRe: developing an softwaremvpDave Kreskowiak24-Jan-13 3:38 
Questioninsert data in single column of table in database fom difftern txtboxmembersupriya93123-Jan-13 19:48 
QuestionRe: insert data in single column of table in database fom difftern txtboxmvpEddy Vluggen24-Jan-13 0:49 
AnswerRe: insert data in single column of table in database fom difftern txtboxmvpAbhinav S24-Jan-13 1:19 
AnswerRe: insert data in single column of table in database fom difftern txtboxmemberujju.129-Jan-13 20:21 
QuestionEventsmemberMember 962135423-Jan-13 18:02 
AnswerRe: EventsmvpRichard MacCutchan23-Jan-13 23:12 
AnswerRe: Eventsmember ProgramFOX26-Jan-13 3:52 
QuestionText BoxmemberMember 962135423-Jan-13 17:56 
AnswerRe: Text BoxmvpEddy Vluggen24-Jan-13 0:48 
AnswerRe: Text BoxmemberRichard Deeming24-Jan-13 1:42 
QuestionMasked TextboxmemberMember 962135423-Jan-13 17:50 
AnswerRe: Masked TextboxmvpRichard MacCutchan23-Jan-13 23:09 
QuestionVb 6.0 youtube video downloadermemberNassimch23-Jan-13 8:24 
AnswerRe: Vb 6.0 youtube video downloadermvpDave Kreskowiak23-Jan-13 11:17 
QuestionHow to convert vb.net application to work onlinemembernapolewn22-Jan-13 0:54 
AnswerRe: How to convert vb.net application to work onlinememberDavid Mujica22-Jan-13 3:03 
QuestionHow to Extend the InitializeComponents to my code in VB2008/2010memberQuickBooksDev20-Jan-13 3:06 
AnswerRe: How to Extend the InitializeComponents to my code in VB2008/2010mvpEddy Vluggen21-Jan-13 3:31 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010memberQuickBooksDev21-Jan-13 5:28 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010mvpEddy Vluggen21-Jan-13 5:43 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010memberQuickBooksDev21-Jan-13 6:49 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010memberQuickBooksDev22-Jan-13 0:21 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010mvpEddy Vluggen22-Jan-13 2:21 
AnswerRe: How to Extend the InitializeComponents to my code in VB2008/2010memberMike Meinz21-Jan-13 8:16 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010memberQuickBooksDev21-Jan-13 9:38 
QuestionMS Graph in Access 2007 VBA Applicationmembersatcomengineer19-Jan-13 7:48 
AnswerRe: MS Graph in Access 2007 VBA ApplicationmvpEddy Vluggen20-Jan-13 2:38 
Questionvb6.0memberBarun sengupta18-Jan-13 21:39 
AnswerRe: vb6.0mvpEddy Vluggen20-Jan-13 2:36 
QuestionDecoding USBSTOR Registry Entry in VBmemberSantLou4017-Jan-13 16:06 

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


Advertise | Privacy | Mobile
Web04 | 2.6.130619.1 | Last Updated 19 Jun 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid