Skip to Content
Former Member
Jan 25, 2013 at 09:47 AM

Error while opening document in WPF application



Im having error while opening CR document in client computer.

I know that I need to install package in this pc, but not really sure what else can help me, becouse far i have installed:


CRRuntime_64bit_13_0_4.msi and nothing really can help me.

My app is wrote in VS2010 pro, this is way im opening document:

ReportDocument rep = new ReportDocument();

rep.Load("../../SzablonyCR/DokumentFV.rpt", OpenReportMethod.OpenReportByDefault);


rep.SetParameterValue("@par", docID);

viewer.ViewerCore.ReportSource = rep;

Of course in client pc i have folder named "SzablonyCR".

For doument im using stored procedure, thats why there is "@par , INT" parameter.

While opening document still getting this error:

Specified cast is not valid



StackTrace: w SAPBusinessObjects.WPF.Viewer.PageNumberDisplayConverter.Convert(Object[] value, Type targetType, Object parameter, CultureInfo culture)

w System.Windows.Data.MultiBindingExpression.TransferValue()

w System.Windows.Data.MultiBindingExpression.Transfer()

w System.Windows.Data.MultiBindingExpression.UpdateTarget(Boolean includeInnerBindings)

w System.Windows.Data.MultiBindingExpression.AttachToContext(Boolean lastChance)

w System.Windows.Data.MultiBindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)

w MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)

w MS.Internal.Data.DataBindEngine.Run(Object arg)

w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

w MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

TargetSite:System.Object Convert(System.Object[], System.Type, System.Object, System.Globalization.CultureInfo)

Data: System.Collections.ListDictionaryInternal

I will be gratefull for any help!