Telerik Forums
Reporting Forum
2 answers
266 views
Hi,

I am trying to use Telerik.ReportViewer.Wpf for Print Preview functionality in our app. As per the instructions  of "How to: Add report viewer to a WPF application" given at this link: http://www.telerik.com/help/reporting/wpf-report-viewer-embedding-the-viewer.html#BindingRedirects
I did everything and added Telerik.ReportViewer.Wpf.dll ,Telerik.Windows.Controls.dll,Telerik.Windows.Controls.Input.dll,Telerik.Windows.Controls.Navigation.dll and Telerik.Windows.Data.dll references to my project. In my case there is a calling application called EMR.WPF that calls my project which contains ReportViewer and when I try to load my UserControl containing the ReportViewer control I get following exception. Now the strange thing is if I add Telerik dll references to the calling EMR.WPF app then I don't get this exception anymore and the report viewer loads fine. Of course I don't want to add references to the calling app because it's like a third party app that I don't have control over. Any idea whats going on here and how I can fix this? Please need your help soon.

System.Windows.Markup.XamlParseException occurred
  HResult=-2146233087
  Message='Initialization of 'Telerik.ReportViewer.Wpf.ReportViewer' threw an exception.' Line number '11' and line position '72'.
  Source=PresentationFramework
  LineNumber=11
  LinePosition=72
  StackTrace:
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at CPWS.Reporting.PrintPreview.InitializeComponent() in c:\Projects\CardioPerfect\Dev\Continuous\CPWS.Windows\Views\Reporting\PrintPreview.xaml:line 1
       at CPWS.Reporting.PrintPreview..ctor() in c:\Projects\CardioPerfect\Dev\Continuous\CPWS.Windows\Views\Reporting\PrintPreview.xaml.cs:line 26
  InnerException: System.IO.FileNotFoundException
       HResult=-2147024894
       Message=Could not load file or assembly 'Telerik.Windows.Controls.Navigation, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.
       Source=mscorlib
       FileName=Telerik.Windows.Controls.Navigation, PublicKeyToken=5803cfa389c90ce7
       FusionLog==== Pre-bind state information ===
LOG: DisplayName = Telerik.Windows.Controls.Navigation, PublicKeyToken=5803cfa389c90ce7
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Telerik.Windows.Controls.Navigation, PublicKeyToken=5803cfa389c90ce7 | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Projects/CardioPerfect/Dev/Continuous/EMR.WPF/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Projects\CardioPerfect\Dev\Continuous\EMR.WPF\bin\Debug\EMR.WPF.vshost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Projects/CardioPerfect/Dev/Continuous/EMR.WPF/bin/Debug/Telerik.Windows.Controls.Navigation.DLL.
LOG: Attempting download of new URL file:///C:/Projects/CardioPerfect/Dev/Continuous/EMR.WPF/bin/Debug/Telerik.Windows.Controls.Navigation/Telerik.Windows.Controls.Navigation.DLL.
LOG: Attempting download of new URL file:///C:/Projects/CardioPerfect/Dev/Continuous/EMR.WPF/bin/Debug/Telerik.Windows.Controls.Navigation.EXE.
LOG: Attempting download of new URL file:///C:/Projects/CardioPerfect/Dev/Continuous/EMR.WPF/bin/Debug/Telerik.Windows.Controls.Navigation/Telerik.Windows.Controls.Navigation.EXE.

       StackTrace:
            at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
            at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
            at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
            at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
            at System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly bamlAssembly)
            at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType bamlType)
            at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
            at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
            at System.Windows.Baml2006.Baml2006Reader.Process_ElementStart()
            at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
            at System.Windows.Baml2006.Baml2006Reader.ReadObject(KeyRecord record)
            at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
            at System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache)
            at System.Windows.ResourceDictionary.OnGettingValuePrivate(Object key, Object& value, Boolean& canCache)
            at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
            at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
            at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
            at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
            at System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean canCacheAsThemeResource, Boolean& canCache)
            at System.Windows.SystemResources.LookupResourceInDictionary(ResourceDictionary dictionary, Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
            at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
            at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
            at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
            at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
            at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
            at System.Windows.FrameworkElement.TryFireInitialized()
            at System.Windows.FrameworkElement.EndInit()
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)
       InnerException: 

Mandar
Top achievements
Rank 1
 answered on 24 Apr 2014
3 answers
128 views
Not sure if I'm doing this right.  I've been trying out various reporting tools for a pretty big project I'm starting.

I was able to design a report in the designer standalone the way I wanted it.  So now in C# I want to load that report using a parameter for the queries.

I assume I set the reportviewer reportsource property and then create the parameters.  I just can't seem to get it to work.  Says my connection string isn't right though I set that at design time and it works fine in the standalone designer.

Maybe I'm doing this all wrong?
Stef
Telerik team
 answered on 24 Apr 2014
15 answers
1.4K+ views
I'm using the standard font "Bookman Old Style". In my dev machine the report shows OK but in the production server it replaces with Arial, although the font is installed in Windows.

Any ideas? I'm using Asp.net and 2010 Q1.
Thanks!
Stef
Telerik team
 answered on 24 Apr 2014
1 answer
425 views
Hi All,

I have an issue with report quality, Telerik reports is fairly new for me, so I could be missing something obvious. I have an A5 report that has images and text, when it's exported to screen via report viewer it looks fine, however quality goes down (drastically) when exported to PDF or printed to printer. Is there a way to increase quality of exported reports?

Another thing I noticed (and wish to resolve) is the fact that text from textboxes is not output as text within a PDF report (i.e. not selectable). Can this be amended?

Thanks,
Daryl
Stef
Telerik team
 answered on 23 Apr 2014
4 answers
232 views
Hi All,

Does anyone know how NumericalScale.MajorStep works in Graph? I have a Graph with X and Y axis and each axis has a numerical scale with only MajorStep. The width and height of Graph are set to 250mm and 120mm respectively and my requirement is that each axis should always have MajorGridLines at every 5mm. Is there a way I can use MajorStep property for this purpose or is there any other way I can satisfy this requirement?

Thanks,
Mandar
Hinata
Top achievements
Rank 1
 answered on 23 Apr 2014
3 answers
911 views
I have a section of a subreport that I need to force to be a certain height (7.5 inches).  The section contains a Table, which can grow based on the contents.  If the rows do not grow individually, then the section stays 7.5", but if a row grows to fit its contents, it forces the entire section to grow, even though it does not cause the Table to grow beyond 7.5".  Is there a way to set the height of a section AFTER the table is data bound, so that I can force the section to be 7.5", regardless of the height of the Table?
Stef
Telerik team
 answered on 23 Apr 2014
4 answers
318 views
What are the end-user requirements for running the standalone report designer?  

I have the following installed on a new Win 7 machine:
  • .NET Framework 4.0 FULL Profile
  • Microsoft 2010: Primary Interop Assemblies Redistributable

I notice that the designer process runs, but the GUI doesn't draw nor does a window show.  The designer runs fine on my development machine.  What am I missing?

Thanks in advance.
Peter
Telerik team
 answered on 23 Apr 2014
7 answers
509 views
Hi,

I am using the telerik reporting to display reports in my project.
The print works ok locally but the problem is that when I host the website the print button click shows the dialog box to print aftera long period and it does the postback on click too.

What I want is to display the dialog box to print as and when the user clicks on print button on client side only. The click should pop-up the dialog to print on client event only.

I am not able to search the client id of the print button. I have verified the code below:
 string printScript = string.Format("{0}.PrintReport();", this.SearchReportViewer.ClientID);  
            this.ClientScript.RegisterStartupScript(this.GetType(), "ReportPrint", printScript, true); 

I does not solve my purpose as it popu-ups the print dialog at startup of the page. Please help its somthing urgent.

Thanks,
Yuvika
Peter
Telerik team
 answered on 23 Apr 2014
4 answers
441 views
I've created a report containing three different grids on the same report.  I did this by placing three different Table Wizards on the same Details section of the the report designer.  It works great when displayed as an html page. The problem however, is when i export it to pdf, exel, or word.  The report just keeps repeating intself for 49 pages.  Forty nine pages of the same data grids repeating over and over again.  Has anyone had this problem before?  One solution might be to use a BookReport that displays just one grid at a time but I would like not to have to start all over again. 

Thanks, Rick Pace.
Manognya
Top achievements
Rank 1
 answered on 22 Apr 2014
4 answers
325 views
I’m not able to view the report preview in at design time.  I receive an error saying I need to provide valid data for all parameters.  I’m using an objectdatasource with its datasource set to a data class.  I thought there was a way to provide parameter values for use at design time for just this scenario.  When I right click on the report and view report then right click the parameters and click edit parameters, there is a place for each parameter to provide a constant value, I did that and still I receive the error message.  When I configure the datasource there was a pane in the setup wizard that allowed design time parameters to be added, but I cannot seem to get back to that pane anymore for some reason.  If the data method of the data class were being called with no parameters values then I would get an empty dataset, so it appears that it is not getting that far.  I have the connection string hardcoded in the data class. When I had the report setup with a sqldatasource the preview worked fine

So when using a parameterized method in a dataclass with the objectdatasource is there any way to have the report preview work?

Here is the signature of my data method:
 
    <DataObjectMethod(DataObjectMethodType.Select)> _
    Public Function TransferReportList(ByVal sn As String, _
                                       ByVal tz As Single, _
                                       ByVal transferBy As Integer, _
                                       ByVal sortBy As Short, _
                                       ByVal allDates As Boolean, _
                                       ByVal FromDate As Date, _
                                       ByVal ToDate As Date, _
                                       ByVal direction As Short) As List(Of DataTransfer)
 
 
Kenneth
Top achievements
Rank 2
Iron
 answered on 18 Apr 2014
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?