trouble in passing parameter in crystal document
-
Move the call to SetCurrentValuesForParameterField to the line after loading the report. This should fix your problem.
Tosch
now i getting a message error in the next line
Dim myParameterFieldDefinition As ParameterFieldDefinition = myParameterFieldDefinitions(PARAMETER_FIELD_NAME)
this is the error messageAn unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll Additional information: Index non valide. (Exception de HRESULT : 0x8002000B (DISP_E_BADINDEX))
-
now i getting a message error in the next line
Dim myParameterFieldDefinition As ParameterFieldDefinition = myParameterFieldDefinitions(PARAMETER_FIELD_NAME)
this is the error messageAn unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll Additional information: Index non valide. (Exception de HRESULT : 0x8002000B (DISP_E_BADINDEX))
-
You're trying to get an item with the name PARAMETER_FIELD_NAME from your myParameterFieldDefinitions. Does it exist in the collection? Probably not, as the error says 'Index not valid'
Tosch
i fellowed the first part of this tutorial to set myParameterFieldDefinitions : LINK TO THE TUT and i have in my table(the table linked o the crystalReport Document) field called numb that i assigned it to PARAMETER_FIELD_NAME . and still dont know where is the error ???
-
i fellowed the first part of this tutorial to set myParameterFieldDefinitions : LINK TO THE TUT and i have in my table(the table linked o the crystalReport Document) field called numb that i assigned it to PARAMETER_FIELD_NAME . and still dont know where is the error ???
-
Please loop through myParameterFieldDefinitions and check if any member is called numb (your fieldname). I'm not sure what the propertyname is, probably name or fieldname.
Tosch
-
I coudnt find any thing cause the error hapend in this line
Dim myParameterFieldDefinition As ParameterFieldDefinition = myParameterFieldDefinitions(PARAMETER_FIELD_NAME)
i looked for numb or name and fieldname but nothing ???? -
Please check the property
ParameterFieldName
. You may have to loop through all items inParameterFieldDefinitions
and check the value of ParameterFieldName. What are the values for this field?Tosch
sorry to bother you with an other problem,but now that i moved at home and i working on my pc (OS:windows 7)i got an error message with the same code :
An unhandled exception of type 'System.Exception' occurred in CrystalDecisions.CrystalReports.Engine.dll Additional information: Load report failed.
on this lineimpbonrecepReport.Load(reportPath)
-
sorry to bother you with an other problem,but now that i moved at home and i working on my pc (OS:windows 7)i got an error message with the same code :
An unhandled exception of type 'System.Exception' occurred in CrystalDecisions.CrystalReports.Engine.dll Additional information: Load report failed.
on this lineimpbonrecepReport.Load(reportPath)
-
i just found a property called ParamName and it's equal=Nothing. the other probelm happend with me when i work on windows 7 but when i worked with winXp i dont get this message error.