Hi,
I am evaluating the use of NetAdvantage Reporting in a WPF application run locally.
Currently the file path to the image is stored in a field within an SQL Compact database. How do i bind this field to an Image object?
I have tried but the image is only displaying an 'X'. does this mean it cannot find the image?
I have tested the datasource as well as confirmed the image path is correct.
Any help is greatly appreciated.
pfechner
Hi pfechner,
You can view the Using the Image Control article, long story short, you need to create a SQL Data Source that references the SQL Compact database & desired entity, and when you create the image control, add a binding to the Image field if your data contains the serialized image, or to the ImageUrl field if your data contains a URL with the location of the image.
The X means that there was an error while loading the image, it could be that it did not find the image, or that the image format is not supported (we support only JPG and PNG images).
Let us know if you have any questions.
Regards,Héctor
HI Hector,
thanks for the reply.
I can confirm i have a successful connection to the sql compact database and see data when i press the test query button.
I can also confirm the path is correct by copying the result into windows explorer.
The data being returned looks like:
I am using vs2010 and wpf (vb.net).
I have only just started to look at the infragistics reporting so i will most likely be doing something silly.
I just tried dragging the datasource field onto the report (Expr1) and pressed the preview button and i get the error
"Infragistics.Reports.Engine.EngineException: Error in DataContext =DataSources.sqlDataSource3.An error occurred while binding an expression."
What am i doing wrong?
Do i need to use the Report Viewer object?
What version of Reporting are you using? there were some problems when using SQL Compact 3.5 that were fixed in the latest service releases.
I have the exact same problem when running through this example. http://help.infragistics.com/NetAdvantage/reporting/2011.2/CLR4.0?page=Creating
My aim is to use this in my stand alone application instead of Crystal Reports. Is this possible or does it rely on a web server?
The link provided seems to be incomplete. Nevertheless, the scenario should be able to work.
Can you check if the connection string uses the provider "Microsoft.SqlServerCe.Client.3.5"? (check in your app.config, web.config or in the XML of the report, depending on where you are saving the connection information). If the connection string uses that provider, change it to "System.Data.SqlServerCe.3.5".
Hi
The string did include the "Microsoft....."
As you suggested i changed it to:
<add name="WpfApplication1.MySettings.sqlDataSource3" connectionString="Data Source=C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf;Persist Security Info=True" providerName="System.Data.SqlServerCe.3.5" />
However i still get the same error when i press the "Preview" button.
Infragistics.Reports.Engine.EngineException: Error in DataContext =DataSources.sqlDataSource3.An error occurred while binding an expression.
I have started a blank project to rule out any other conflicts. I have no code populating any data objects, nor do i have any report viewer configured. Do i need to do this or should the "Preview" button "just work"?
run the upgrade utility and all is well again :).
Hi Hector,
I just opened my original WPF project and it will no longer compile since running the service release.
I am receiving alot of errors similar to below:
Warning 15 Could not resolve this reference. Could not locate the assembly "InfragisticsWPF4.Controls.Editors.XamMaskedInput.v12.2, Version=12.2.20122.2022, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. WpfApplication1
How do i resolve this?
No problem, glad I could help. Feel free to post anytime!
:) Happy Days.
Must have been the service release.
Thankyou for your assistance (and patience).
I will no doubt have a few more questions as i start using the reporting tool but i will raise them in separate threads.
thanks again
I am able to properly display the report with the solution provided.
However, I can also see from the solution provided that you have 12.2 Volume Release installed, you need to install the latest service release.