Click here to Skip to main content
15,895,011 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to read and write image informations Pin
Maik Lange20-Nov-09 19:17
Maik Lange20-Nov-09 19:17 
AnswerRe: How to read and write image informations Pin
Johan Hakkesteegt21-Nov-09 1:36
Johan Hakkesteegt21-Nov-09 1:36 
GeneralRe: How to read and write image informations Pin
Maik Lange21-Nov-09 22:19
Maik Lange21-Nov-09 22:19 
GeneralRe: How to read and write image informations Pin
Johan Hakkesteegt22-Nov-09 1:48
Johan Hakkesteegt22-Nov-09 1:48 
GeneralRe: How to read and write image informations Pin
Maik Lange22-Nov-09 21:09
Maik Lange22-Nov-09 21:09 
GeneralRe: How to read and write image informations Pin
Johan Hakkesteegt23-Nov-09 0:26
Johan Hakkesteegt23-Nov-09 0:26 
GeneralRe: How to read and write image informations Pin
Maik Lange23-Nov-09 2:51
Maik Lange23-Nov-09 2:51 
Questiontrouble in passing parameter in crystal document Pin
aguest20-Nov-09 12:05
aguest20-Nov-09 12:05 
i am getting some trouble with a tutorial that i found on msdn web site : http://msdn.microsoft.com/en-us/library/ms227722.aspx.
i would like to pass a parameter to my CrystalReport document,but i would like to send an integer value to my CR document and just one value(because in the tut its sending and array of string values).
the code is the fellowing

Private Const PARAMETER_FIELD_NAME As String = "numb"

    Private impbonrecepReport As ReportDocument

    Private Sub ConfigureCrystalReports()


        Dim myArrayList As ArrayList = New ArrayList()

        myArrayList.Add(999)
        Dim numbrecep As Integer

        numbrecep = 999



        SetCurrentValuesForParameterField(impbonrecepReport, myArrayList)
       
        impbonrecepReport = New ReportDocument()
        Dim reportPath As String = Application.StartupPath & "\" & "ImpBonReception.rpt"

        impbonrecepReport.Load(reportPath)
        CrystalReportViewer1.ReportSource = impbonrecepReport

    End Sub


Private Sub SetCurrentValuesForParameterField(ByVal myReportDocument As ReportDocument, ByVal myArrayList As ArrayList)

        Dim currentParameterValues As ParameterValues = New ParameterValues()


        For Each submittedValue As Object In myArrayList

            <big>Dim myParameterDiscreteValue As ParameterDiscreteValue = New ParameterDiscreteValue()</big>
            myParameterDiscreteValue.Value = myArrayList.ToString()
            currentParameterValues.Add(myParameterDiscreteValue)

        Next


        Dim myParameterFieldDefinitions As ParameterFieldDefinitions = myReportDocument.DataDefinition.ParameterFields
        Dim myParameterFieldDefinition As ParameterFieldDefinition = myParameterFieldDefinitions(PARAMETER_FIELD_NAME)
        myParameterFieldDefinition.ApplyCurrentValues(currentParameterValues)


    End Sub


i got this error message

An unhandled exception of type 'System.NullReferenceException' occurred in GestionStock.exe
Additional information: La référence d'objet n'est pas définie à une instance d'un objet.


in this line

Dim myParameterFieldDefinitions As ParameterFieldDefinitions = myReportDocument.DataDefinition.ParameterFields<br />



can you help me to solve this problem? thank you
ps: i am on VS2005 VB.NET
AnswerRe: trouble in passing parameter in crystal document Pin
tosch22-Nov-09 19:46
tosch22-Nov-09 19:46 
GeneralRe: trouble in passing parameter in crystal document Pin
aguest22-Nov-09 21:21
aguest22-Nov-09 21:21 
GeneralRe: trouble in passing parameter in crystal document Pin
tosch22-Nov-09 21:36
tosch22-Nov-09 21:36 
GeneralRe: trouble in passing parameter in crystal document Pin
aguest23-Nov-09 1:23
aguest23-Nov-09 1:23 
GeneralRe: trouble in passing parameter in crystal document Pin
tosch23-Nov-09 3:01
tosch23-Nov-09 3:01 
GeneralRe: trouble in passing parameter in crystal document Pin
aguest23-Nov-09 4:24
aguest23-Nov-09 4:24 
GeneralRe: trouble in passing parameter in crystal document Pin
tosch23-Nov-09 4:35
tosch23-Nov-09 4:35 
GeneralRe: trouble in passing parameter in crystal document Pin
aguest23-Nov-09 5:42
aguest23-Nov-09 5:42 
GeneralRe: trouble in passing parameter in crystal document Pin
tosch23-Nov-09 19:31
tosch23-Nov-09 19:31 
GeneralRe: trouble in passing parameter in crystal document Pin
aguest23-Nov-09 21:53
aguest23-Nov-09 21:53 
GeneralRe: trouble in passing parameter in crystal document Pin
aguest24-Nov-09 21:47
aguest24-Nov-09 21:47 
Questiontrouble in passing parameter in crystal document Pin
aguest20-Nov-09 12:04
aguest20-Nov-09 12:04 
AnswerRe: trouble in passing parameter in crystal document Pin
Tom Deketelaere22-Nov-09 23:50
professionalTom Deketelaere22-Nov-09 23:50 
QuestionUsing the IDispatch::Invoke interface to return data in ActiveX Control Pin
caeanis20-Nov-09 7:14
caeanis20-Nov-09 7:14 
QuestionWeird behavior in MDI application Pin
EliottA20-Nov-09 4:39
EliottA20-Nov-09 4:39 
AnswerRe: Weird behavior in MDI application Pin
Paramu197321-Nov-09 3:12
Paramu197321-Nov-09 3:12 
QuestionGet system shutdown info. Pin
Gagan.2020-Nov-09 1:07
Gagan.2020-Nov-09 1:07 

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.