exception has been thrown by the target of an invocation
please i need some help

Please post a snippet of the code that is throwing the exception.

This will help us better understand the source of the exception. :)

form4.report2.show()
but the error is in the fastreport itself thank you

i'm a beginner in fastreport

so please tell me what to do

form4.report2.show()
but the error is in the fastreport itself thank you

Could you please be a little more cryptic? Your statement was too easy to understand...

ok i have problems in FR.Net in converting a data base string field to double
and i don't know what to do

Ther is no way to emagine a cause for an exception, if you do not state,how far you went about that matter and how you tried to remove the exception.
Post your snippet, we can try to help you to solve your problems.
To convert a string to double you can use the Val(string argument) function.
If you have any confusion, you can also use it with CDbl(Object As Expression) Like CDbl(Val(String Value)). But in case of Database field before convertion you should check the field is empty or not else it can occur an exception.

If Not String.IsNullOrEmpty(<DatabaseFiledName>.ToString) Then

           <Variable> = CDbl(Val(<DatabaseFiledName>.ToString))

        End If

ok thanks but where i have to put this code ????
in Xml??

this is the report and the exception error messages

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)
at System.Convert.ToDouble(String value, IFormatProvider provider)
at System.String.System.IConvertible.ToDouble(IFormatProvider provider)
at System.Convert.ToDouble(Object value)
at FastReport.ReportScript.CalcExpression(String expression, Variant Value)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at FastReport.Code.ExpressionDescriptor.Invoke(Object[] parameters)
at FastReport.Code.AssemblyDescriptor.CalcExpression(String expr, Variant value)
at FastReport.Report.CalcExpression(String expression, Variant value)
at FastReport.Report.Calc(String expression, Variant value)
at FastReport.Report.Calc(String expression)
at FastReport.Data.Total.AddValue()
at FastReport.Data.TotalCollection.ProcessBand(BandBase band)
at FastReport.Engine.ReportEngine.ProcessTotals(BandBase band)
at FastReport.Engine.ReportEngine.ShowBand(BandBase band, Boolean getData)
at FastReport.Engine.ReportEngine.ShowDataBand(DataBand dataBand, Int32 rowCount)
at FastReport.Engine.ReportEngine.RunDataBand(DataBand dataBand, Int32 rowCount, Boolean keepFirstRow, Boolean keepLastRow)
at FastReport.Engine.ReportEngine.ShowGroupTree(GroupTreeItem root)
at FastReport.Engine.ReportEngine.ShowGroupTree(GroupTreeItem root)
at FastReport.Engine.ReportEngine.RunGroup(GroupHeaderBand groupBand)
at FastReport.Engine.ReportEngine.RunBands(BandCollection bands)
at FastReport.Engine.ReportEngine.RunReportPage(ReportPage page)
at FastReport.Engine.ReportEngine.RunReportPages()
at FastReport.Engine.ReportEngine.RunReportPages(ReportPage page)
at FastReport.Engine.ReportEngine.Run(Boolean runDialogs, Boolean append, Boolean resetDataState, ReportPage page)
at FastReport.Report.Prepare(Boolean append)
at FastReport.Report.Prepare()
at FastReport.Design.ReportTab.Preview()

I wrote you the syntax.

Dim x as Double

If Not String.IsNullOrEmpty(DatabaseFiledName.ToString) Then
           x = CDbl(Val(DatabaseFiledName.ToString))
        End If

hello, please i need some help.I have a vb.net form and a menu strip that contain (choose language).Now,on click of the language the program change the texts of the form but i need a function or something to restore the content of my form .Please any help?????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.