Click here to Skip to main content
15,902,492 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: I can't solve following coding~~~ Pin
Richard MacCutchan2-Jun-15 21:34
mveRichard MacCutchan2-Jun-15 21:34 
AnswerRe: I can't solve following coding~~~ Pin
Dave Kreskowiak2-Jun-15 4:32
mveDave Kreskowiak2-Jun-15 4:32 
GeneralRe: I can't solve following coding~~~ Pin
Wathon Aung8-Jul-15 23:34
Wathon Aung8-Jul-15 23:34 
SuggestionRe: I can't solve following coding~~~ Pin
Richard Deeming2-Jun-15 21:54
mveRichard Deeming2-Jun-15 21:54 
QuestionChange Color of VSFlex Grid's Scroll Bar Pin
Mi Khayae Thin1-Jun-15 22:41
Mi Khayae Thin1-Jun-15 22:41 
QuestionHow to call the URL in wcf Pin
K Arunraj1-Jun-15 20:44
K Arunraj1-Jun-15 20:44 
AnswerRe: How to call the URL in wcf Pin
Dave Kreskowiak2-Jun-15 2:41
mveDave Kreskowiak2-Jun-15 2:41 
QuestionMissing parameter value Pin
Member 1172701428-May-15 22:00
Member 1172701428-May-15 22:00 
I have a dropdown name PER-PS 101 report. When I click view report it supposed to show the report if have values and "No records found for the selected criteria" if no data between the selected date. But in my case, if there is no data, its showing missing parameter error.

Below is the code:

Private Function ShowICDReport101() As Boolean
Try
Dim MessageString As String
Const ReportName As String = "ICD_InpatientReturn_Main.rpt"

Dim ReportDocumentObject As New ReportDocument
Dim ReportParametersListObject As List(Of ReportParameters)
Dim CrystalReportHelperObject As New CrystalReportHelper

'Dim ds As New DataSet


Dim ReportFilePath As String

ReportFilePath = CrystalReportHelperObject.DeploymentPath("CrystalReportsFilePath") + ReportName

ReportParametersListObject = SetReportParameters()

'To call the CheckReportData() function
If CheckReportData(ParentFormController.DateByMonthDateTimePicker.Value.Month.ToString(), ParentFormController.ToYearDateTimePicker.Value.Year.ToString(), ApplicationHelper.UserId) = True Then

ReportDocumentObject = CrystalReportHelperObject.GetCrystalReportDocument(ReportName, ReportParametersListObject)

If ReportDocumentObject.HasRecords = True Then
ParentFormController.ShowCrystalReportInViewer(ReportDocumentObject, "ICD Healthcare Facilities for Inpatien Returns", False, String.Empty)
Else
MessageBox.Show(MessageString, "Care21", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If

Else
MessageString = "No records found for the selected criteria"
MessageBox.Show(MessageString, "Care21", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If

Catch ex As Exception
Throw
End Try
End Function

Public Function CheckReportData(ByVal Month, ByVal Year, ByVal Userid) As Boolean
Dim ReturnCode As Boolean = False
Dim ReturnValues As New Dictionary(Of String, Object)
Dim result As Boolean

Try

Dim DbObject As Microsoft.Practices.EnterpriseLibrary.Data.Database = DatabaseFactory.CreateDatabase()
Dim DbCommand As DbCommand = DbObject.GetStoredProcCommand("usp_Rpt_InpatientReturns")

Data.AddInParameter(DbCommand, "@paMonthIn", DbType.String, Month, DbObject)
Data.AddInParameter(DbCommand, "@paYearIn", DbType.String, Year, DbObject)
Data.AddInParameter(DbCommand, "@paUserIdIn", DbType.String, Userid, DbObject)
Dim dt As DataTable
Dim ds As New DataSet("tt")
Dim DataReaderObject As IDataReader = DbObject.ExecuteReader(DbCommand)

dt.Load(DataReaderObject) 'If DataReaderObject.FieldCount = 0 Then
'Else
'End If
If dt.Rows.Count = 0 Then
result = False
Else
result = True
End If

DbCommand.Parameters.Clear()
'If ReturnValues("Result").ToString().Equals("1") Then
'Return True
'Else
' Return False
'End If
Catch ex As Exception
Throw
End Try
Return result
End Function
AnswerRe: Missing parameter value Pin
Simon_Whale28-May-15 23:04
Simon_Whale28-May-15 23:04 
AnswerRe: Missing parameter value Pin
Chris Quinn29-May-15 3:19
Chris Quinn29-May-15 3:19 
Questionprinting datagridview Pin
Member 1172695728-May-15 20:50
Member 1172695728-May-15 20:50 
AnswerRe: printing datagridview Pin
Richard MacCutchan28-May-15 22:12
mveRichard MacCutchan28-May-15 22:12 
QuestionI need a suggestion Pin
satc28-May-15 17:40
satc28-May-15 17:40 
AnswerRe: I need a suggestion Pin
Eddy Vluggen29-May-15 2:19
professionalEddy Vluggen29-May-15 2:19 
GeneralRe: I need a suggestion Pin
Sascha Lefèvre29-May-15 2:38
professionalSascha Lefèvre29-May-15 2:38 
GeneralRe: I need a suggestion Pin
Eddy Vluggen29-May-15 2:47
professionalEddy Vluggen29-May-15 2:47 
GeneralRe: I need a suggestion Pin
Sascha Lefèvre29-May-15 2:59
professionalSascha Lefèvre29-May-15 2:59 
GeneralRe: I need a suggestion Pin
Eddy Vluggen29-May-15 3:06
professionalEddy Vluggen29-May-15 3:06 
GeneralRe: I need a suggestion Pin
Sascha Lefèvre29-May-15 3:23
professionalSascha Lefèvre29-May-15 3:23 
GeneralRe: I need a suggestion Pin
satc29-May-15 8:57
satc29-May-15 8:57 
GeneralRe: I need a suggestion Pin
Dave Kreskowiak29-May-15 9:55
mveDave Kreskowiak29-May-15 9:55 
GeneralRe: I need a suggestion Pin
Sascha Lefèvre29-May-15 12:45
professionalSascha Lefèvre29-May-15 12:45 
GeneralRe: I need a suggestion Pin
satc29-May-15 23:03
satc29-May-15 23:03 
GeneralRe: I need a suggestion Pin
Sascha Lefèvre31-May-15 4:57
professionalSascha Lefèvre31-May-15 4:57 
Questionsearch in datagridview Pin
Member 1171143728-May-15 3:21
Member 1171143728-May-15 3:21 

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.