Telerik Forums
Reporting Forum
1 answer
222 views
How do I display x axis column labels on the top and bottom of a report?  I am using the Line chart with a Vertical Series Orientation.
Stef
Telerik team
 answered on 13 Dec 2013
5 answers
372 views
Is it possible to export to .txt ?
Stef
Telerik team
 answered on 13 Dec 2013
1 answer
92 views
When creating the Area Graph and also the bar graph I noticed the tics are actually the space between the data points on the axis.  Is there a way on the area and line graph to have the ticks line up with the data point? 
Ivan Hristov
Telerik team
 answered on 12 Dec 2013
1 answer
185 views
Hello, 

I was changing a pie charts over to the new pie graph (polar) in the latest Reporting (Q3 2013), and I was wondering how can you show the labels as a percentage of the total in the pie graph? Right now I have it showing the dollar value, but we want percent. Do I need to do this in the data before binding?


Thank you. 
NerdBrick
Top achievements
Rank 1
 answered on 12 Dec 2013
1 answer
110 views
I am calling a stored procedure from my report and passing in two parameters.  The first parameter is a SQL tinyiny, the second parameter is a SQL user defined data type named [OMS].[Lot_Number].  The data type is actually of type char(10).  In any case, when I attempted to programically set the parameter of the lot_number, and end users attempt to view the report, the query disregards the parameter.

To make this even more strange, when the developers run the exact code, the report functions as designed.

So after spending several, SEVERAL hours looking into the issue and passing blame amongst others in my IT department, I removed the user defined data type and defined it as char(10).  When the end users ran the report, the report finally produced the correct data.

This here is where I ask, does the report engine accept user defined data types and if so, how to pass the parameter to the stored procedure?

I appreciate  your help.

Regards,
Bob
Stef
Telerik team
 answered on 12 Dec 2013
1 answer
205 views
I am calling a stored procedure from my report and passing in two parameters.  The first parameter is a SQL tinyiny, the second parameter is a SQL user defined data type named [OMS].[Lot_Number].  The data type is actually of type char(10).  In any case, when I attempted to programically set the parameter of the lot_number, and end users attempt to view the report, the query disregards the parameter.

To make this even more strange, when the developers run the exact code, the report functions as designed.

So after spending several, SEVERAL hours looking into the issue and passing blame amongst others in my IT department, I removed the user defined data type and defined it as char(10).  When the end users ran the report, the report finally produced the correct data.

This here is where I ask, does the report engine accept user defined data types and if so, how to pass the parameter to the stored procedure?

I appreciate  your help.

Regards,
Bob
Stef
Telerik team
 answered on 12 Dec 2013
3 answers
464 views
I'm using the latest release - the designer will pull up for an instant, then close again.

Even though I save before previewing, after the designer closes there is an asterisk (*) displayed in the report's tab within Visual Studio.

The Error List has the following Message:

Message 39 You must rebuild your project for the changes to Core.Reports.Customers.CustomerSummaryReport to show up in any open designers. 0 0

I've cleaned and rebuilt the solution.

Using Visual Studio 2012, targeting .NET 4.0.

As per best practices, the report is hosted within its own assembly.

The report was working fine up until I added additional columns to a table within the report detail (increased from 3 to 5).

Any idea how to get this working again?

Thanks in advance,

Zack
Nasko
Telerik team
 answered on 12 Dec 2013
1 answer
87 views
Hello.

After you helped me in this thread, I was able to get nested tables working using a custom object.

I then revisited the topic, reread the links you provided and got it working with a dataset with datarelations established on the dataset.  However, the solution I arrived at was so convoluted, I'm fairly certain that it isn't the intended way to accomplish that goal.

Could someone please look at the code below, tell me if it's the way we're intended to do this, and if not, provide an example of the correct method?  I suspect I'm doing this incorrectly because of the all the casting going on down in the getChildItem f(x).

The workers class is for making the dataset, including the datarelations and some randomly generated data.  To save typing I'm just grabbing the custom object from when I was testing that approach, and turning it into a dataset.

The createReportFromDS and getChildItem are in the actual report object.  There are two table objects on the report: tblParent, and nested within it, tblChild.

Public Function createReportFromDS() As Byte()
    Dim ods As New ObjectDataSource
 
    ods.DataSource = cboSample.workers.getWorkers
    ods.DataMember = "workers" 'casing has to match
    tblParent.DataSource = ods
    tblChild.Bindings.Add(New Telerik.Reporting.Binding("DataSource", "=getChildItem(ReportItem.DataObject)"))
 
    Return generateReportObj()
End Function
 
Public Shared Function getChildItem(sender As Object) As DataTable
    Dim dataObject = DirectCast(sender, Telerik.Reporting.Processing.IDataObject)
    Dim dt As DataTable = CType(CType(dataObject.RawData, DataRowView).Row, DataRow).GetChildRows("WtoT").CopyToDataTable()
 
    Return dt
End Function




Public Class workers
    Public Shared Function getWorkers() As DataSet
        Dim ds As DataSet = getDS()
        Dim myCbo As New dataItems
        Dim myWorkers As IEnumerable(Of parentItem) = myCbo.GetData 'to save typing just grab the custom object previously created and turn it into tables in a dataset
        Dim i As Integer
 
 
        'process the items
        For Each w As parentItem In myWorkers
            ds.Tables("workers").Rows.Add(i, w.worker, w.age)
            For Each t As childItem In w.tasks
                ds.Tables("tasks").Rows.Add(i, t.taskName, t.timeRequired, t.difficulty.ToString)
            Next
            i += 1
        Next
 
        Return ds
    End Function
 
    ''' <summary>
    ''' Returns a ds with columns and datarelations established
    ''' </summary>
    ''' <returns></returns>
    Private Shared Function getDS() As DataSet
        Dim dtP, dtC As DataTable
        Dim ds As New DataSet
 
        dtP = New DataTable("workers")
        dtP.Columns.Add("pk", GetType(Integer))
        dtP.Columns.Add("worker")
        dtP.Columns.Add("age")
        dtP.PrimaryKey = New DataColumn() {dtP.Columns("pk")}
 
        dtC = New DataTable("tasks")
        dtC.Columns.Add("fk", GetType(Integer))
        dtC.Columns.Add("taskName")
        dtC.Columns.Add("timeRequired")
        dtC.Columns.Add("difficulty")
 
        ds.Tables.AddRange(New DataTable() {dtP, dtC})
 
        ds.Relations.Add("WtoT", ds.Tables("workers").Columns("pk"), ds.Tables("tasks").Columns("fk"))
 
        Return ds
    End Function
End Class
Nasko
Telerik team
 answered on 12 Dec 2013
21 answers
462 views
I'm guessing the answer will be to upgrade my reporting, but I'd rather not upgrade telerik reporting right now.  I just don't want to have to copy over all those dlls.

I'm getting:
System.Windows.Markup.XamlParseException occurred
  HResult=-2146233087
  Message='Initialization of 'Telerik.ReportViewer.Wpf.ReportViewer' threw an exception.' Line number '23' and line position '27'.
  Source=PresentationFramework
  LineNumber=23
  LinePosition=27
  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 LawtimeMain.ReportWindow.InitializeComponent() in c:\source\VSApps\LawtimeMainWPF\LawtimeMain\LawtimeMain\ReportOptions\ReportWindow.xaml:line 1
       at LawtimeMain.ReportWindow..ctor(String reportType, ParameterCollection pc) in c:\source\VSApps\LawtimeMainWPF\LawtimeMain\LawtimeMain\ReportOptions\ReportWindow.xaml.cs:line 20
  InnerException: System.Xaml.XamlObjectWriterException
       HResult=-2146233088
       Message=Set property 'System.Windows.ResourceDictionary.Source' threw an exception.
       Source=System.Xaml
       LineNumber=0
       LinePosition=0
       StackTrace:
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
            at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
            at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
            at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
            at System.Xaml.XamlObjectWriter.WriteEndMember()
            at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
            at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)
            at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
            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 MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)
       InnerException: System.Windows.Markup.XamlParseException
            HResult=-2146233087
            Message=Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.
            Source=PresentationFramework
            LineNumber=0
            LinePosition=0
            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.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
                 at MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
                 at System.Windows.ResourceDictionary.set_Source(Uri value)
                 at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
            InnerException: System.NotImplementedException
                 HResult=-2147467263
                 Message=The method or operation is not implemented.
                 Source=PresentationFramework
                 StackTrace:
                      at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
                      at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
                      at System.Windows.Baml2006.Baml2006Reader.Process_PropertyTypeReference()
                      at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
                      at System.Windows.Baml2006.Baml2006Reader.ReadKeys()
                      at System.Windows.ResourceDictionary.SetDeferrableContent(DeferrableContent deferrableContent)
                      at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<Create_BamlProperty_ResourceDictionary_DeferrableContent>b__168(Object target, Object value)
                      at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
                 InnerException: 

Stef
Telerik team
 answered on 12 Dec 2013
10 answers
537 views
Hi,

I have managed to get all report functionality working with a SQL Express database (in web application), but when I try to connect to a SQL Server Compact database, I get the following error: 

An error has occurred while processing Report 'OutstandingPayments':
Unable to establish a connection to the database. Please, verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application.
------------- InnerException -------------
Unable to find the requested .Net Framework Data Provider. It may not be installed.


The code behind the report designer is this:

this.sqlDataSource1.ConnectionString = "Data Source=\"C:\\Users\\Amecily\\Desktop\\Wits\\DFP v2.1\\Latest\\DFPProductions_Default" +
   "\\DFPProductions_Default\\App_Data\\DFP.sdf\"";
           this.sqlDataSource1.Name = "sqlDataSource1";
           this.sqlDataSource1.ProviderName = "Microsoft.SqlServerCe.Client.4.0";
           this.sqlDataSource1.SelectCommand = resources.GetString("sqlDataSource1.SelectCommand");

Is there something I need to do to the connection string?

Thanks,
Amy
Hinata
Top achievements
Rank 1
 answered on 11 Dec 2013
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?