Telerik Forums
Reporting Forum
4 answers
631 views

Hello,

I'm having some issue connecting to a database. I'm using a Microsoft Access db and the standalone report designer. However, it is a requirement that I overwrite the data source's database connection programatically so that it is always using my WPF application's database ConnectionString in the app.config.  Using the standalone report designer is required because the client will be creating new reports and then previewing them, but ultimately dropping the report files on many machines which may have different db paths.

What DOES work is if embed my db connection in the report designer wizard - then the report will successfully show up in my application. However, this doesn't solve my issue of needing to use the app.config connection string.

My connection string looks like so:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb;

My code to change the datasource:
 

<p>var reportSource = new UriReportSource();<br>            reportSource.Uri = @"Reports/MyReport.trdp";</p><p>//Uses reportPackager.Unpackage<br>            var reportInstance = UnpackageReport(@"Reports/MyReport.trdp");<br>            var dataSource = new SqlDataSource();            <br>            dataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;<br>            dataSource.ProviderName = "Microsoft.Jet.OLEDB.4.0";<br>            reportInstance.DataSource = dataSource;<br>// Creates an InstanceReportSource<br>            var instanceReportSource = CreateInstanceReportSource(reportInstance, reportSource);<br>            this.ReportViewer1.ReportSource = instanceReportSource;      </p>

 

I get the error "Unable to find the required .Net Framework provider. It may not be installed."

How can this be true if I can otherwise access the same database using that connection string elsewhere in the application? And the embedded connection string will work correctly?

I'm hitting a wall here. I have seen other threads mention downloading the newest JET service pack but even Microsoft's support site says I should already have it (https://support.microsoft.com/en-us/kb/239114). I am on a 64 bit Windows 8 machine, and have my solution compiling to a 32 bit application.

Any help would be appreciated. Thank you!!

Katia
Telerik team
 answered on 27 Sep 2016
5 answers
242 views

Hi,
I'm using telerik reporting Q3 2013 sp1 (7.2.14.127) in winform application.
In my report i have a graph control with DateTime scale and month unit:

dateTimeScale1.BaseUnit = Telerik.Reporting.DateTimeScaleUnits.Months;
dateTimeScale1.LabelUnit = Telerik.Reporting.DateTimeScaleUnits.Months;
dateTimeScale1.MajorUnit = Telerik.Reporting.DateTimeScaleUnits.Months;
dateTimeScale1.MinorUnit = Telerik.Reporting.DateTimeScaleUnits.Months;
dateTimeScale1.PositionMode = Telerik.Reporting.AxisPositionMode.OnTicks;

and labels format:

this.graphAxis2.LabelFormat = "{0: MMM yy}";
this.graphAxis2.LabelPlacement = Telerik.Reporting.GraphAxisLabelPlacement.NextToAxis;

Graph was shown, but datetime scale is not corrert, it's shifted back of one month,
for example if date is 14/10/2015
in graph the label date is "sept 2015" instead of "oct 2015".

Graph datasource in the attached image is:

l.Add(new GraphSerie { Data = Convert.ToDateTime("14/10/2015"), Serie = "Andamento cellule", Valore = 100 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("8/11/2015"), Serie = "Andamento cellule", Valore = 150 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("22/12/2015"), Serie = "Andamento cellule", Valore = 130 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("18/01/2016"), Serie = "Andamento cellule", Valore = 256 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("4/02/2016"), Serie = "Andamento cellule", Valore = 500 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("15/03/2016"), Serie = "Andamento cellule", Valore = 0 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("16/04/2016"), Serie = "Andamento cellule", Valore = 600 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("27/05/2016"), Serie = "Andamento cellule", Valore = 199 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("14/06/2016"), Serie = "Andamento cellule", Valore = 247 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("19/07/2016"), Serie = "Andamento cellule", Valore = 445 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("14/10/2015"), Serie = "Soglia", Valore = 150 });
l.Add(new GraphSerie { Data = Convert.ToDateTime("19/07/2016"), Serie = "Soglia", Valore = 150 });

As you can see all dates in graph labels are shifted back of one month.

Where could be the problem?

Thank you very much.
Andrea


Andrea
Top achievements
Rank 1
Veteran
 answered on 26 Sep 2016
2 answers
188 views
Hello all,
I have a reportviewer on aspx page to which i m getting a login report. 
On the report i have a graph named graph_LoginByDate. I have a dataset coming from a stored procedure.
DataSet ds_LoginsCount = Sql.GetDataset("[SP_LoginsByDate]");
graph_LoginByDate_ImpactsByDate.DataSource = ds_LoginsCount ; This dataset has just two columns "Date" and the "count". Can some one explain how i an assign date to the X-axis and Count to the Y-axis. 
I have tried this: (there is not category. All i am trying to to just plot the date vs logins count)
var countDateGroup = new Telerik.Reporting.GraphGroup();
countDateGroup .Name = "seriesGroup1";
countDateGroup.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.Date"));
countDateGroup.Sortings.Add(new Telerik.Reporting.Sorting("=Fields.Date", Telerik.Reporting.SortDirection.Asc));
graph_LoginByDate.SeriesGroups.Add(countDateGroup );


var graphAxisNumericScale = new Telerik.Reporting.GraphAxis();
graphAxisNumericScale.Name = "GraphAxis2";                    
graphAxisNumericScale.Scale = new Telerik.Reporting.NumericalScale();

var cartesianCoordinateSystem1 = new Telerik.Reporting.CartesianCoordinateSystem();
cartesianCoordinateSystem1.Name = "cartesianCoordinateSystem1";
cartesianCoordinateSystem1.XAxis = graphAxisNumericScale;
cartesianCoordinateSystem1.YAxis = graphAxisNumericScale;
graph_LoginByDate.CoordinateSystems.Add(cartesianCoordinateSystem1);

var lineSeries1 = new Telerik.Reporting.LineSeries();

lineSeries1.CoordinateSystem = cartesianCoordinateSystem1;
lineSeries1.LegendItem.Value = "= Fields.Date";
lineSeries1.SeriesGroup = countDateGroup;
lineSeries1.Y = "=Fields.Count";
graph_LoginByDate.Series.Add(lineSeries1);
I cant do this through properties. It has to be done programatically. Please let me know where i m doing the mistake.
Thank you,
Nasko
Telerik team
 answered on 26 Sep 2016
1 answer
306 views

Our application uses Telerik reportviewer to priview  Reports  before export reports to pdf or print it. After update from privious version telerik our Applicatoin crashes during Creating ReportViewer with

System.TypeInitializationException

The type initializer for 'Telerik.Reporting.Processing.RenderingExtensionManager' threw an exception.

here is an Stacktrace:

  at Telerik.Reporting.Processing.RenderingExtensionManager.get_RenderingExtensions()
   at Telerik.ReportViewer.Wpf.ReportViewerModel.GetRenderingExtensions()
   at Telerik.ReportViewer.Wpf.ReportViewerModel..ctor(Size pageViewportSize, Dispatcher dispatcher)
   at Telerik.ReportViewer.Wpf.ReportViewer.CreateModel()
   at Telerik.ReportViewer.Wpf.ReportViewer.Initialize()
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.Controls.TabItem.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

with inner Exception: System.Configuration.ConfigurationErrorException

An error occurred creating the configuration section handler for Telerik.Reporting: Could not load file or assembly 'Telerik.Reporting, Version=10.2.16.614, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

   at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at Telerik.Reporting.Configuration.ReportingConfiguration.get_Current()
   at Telerik.Reporting.Processing.RenderingExtensionManager..cctor()

 

I checked the assembys lying in Application order. the versions seem to be as it written in App section

<section name="Telerik.Reporting" type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=10.2.16.614, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" allowLocation="true" allowDefinition="Everywhere" />

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls" publicKeyToken="5803cfa389c90ce7" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2016.2.613.40" newVersion="2016.3.914.45" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.5.5631.0" newVersion="2.5.5631.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls" culture="neutral" publicKeyToken="5803cfa389c90ce7" />
        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2016.3.914.45" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls.Input" culture="neutral" publicKeyToken="5803cfa389c90ce7" />
        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2016.3.914.45" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Controls.Navigation" culture="neutral" publicKeyToken="5803cfa389c90ce7" />
        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2016.3.914.45" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Windows.Data" culture="neutral" publicKeyToken="5803cfa389c90ce7" />
        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2016.3.914.45" />
      </dependentAssembly>
    </assemblyBinding>

 

We using some our intern assembly in trdp files . They are added in style

 <add name="intern.assembly" version="1.0.0.0" culture="neutral" publicKeyToken="null" />

Have any one Idea what assembly are missing? Or ways to solve the problem.

Alexander
Top achievements
Rank 1
Iron
 answered on 26 Sep 2016
1 answer
89 views

Hello,

we're having a problem with external stylesheets that don't seem to apply on the headers and footers. We have recreated the problem with the following simple scenario:

- create a blank report with 3 textboxes, one in each section(header, footer and detail)

- create an external style sheet with a textbox selector

- add the style sheet to the report after InitializeComponent() in the constructor of the report.

- preview the report

On the preview, the styles defined in the style sheet don't apply to only header and footer but to the detail section. If you press again on the preview, the styles are then set for the header and footer. There also seem to be the same issue with dynamically setting text and images in the header and footer.

Katia
Telerik team
 answered on 26 Sep 2016
9 answers
625 views
Hi,

I have HTML Textbox inside table column . But the text not showing properly. 

I made cangrow=true and canshrink=false. But event then no luck.

Find attachment and please help me
dushyanth
Top achievements
Rank 1
 answered on 23 Sep 2016
2 answers
69 views

Hi Team,

 

We have purchased and using telerikReportViewer-8.2.14.1204.

The issue is when we have more days of data the x-axis labels are unreadable and getting cluttered. (Even zoomIn is not helping to see the X-axis labels)

I am using following settings:

$("#mydiv").telerik_ReportViewer({
        scale: 1,
        scaleMode: "SPECIFIC",  so on   ...

}

 

I verified for API document is there any option available for setting the scale. But I could not find any of those properties

http://docs.telerik.com/reporting/html5-report-viewer-jquery-fn-telerik-reportviewer

 

Is this feature available for the reporting or not ?

Please tell me how to fix this? 

 

Thanks,

Shravan.

Katia
Telerik team
 answered on 22 Sep 2016
4 answers
544 views
I need to add Interactive sorting to my Crosstable report.  Will the new Q2 Interactive functionality allow that to be done?

thanks
-Mike.
Peter
Telerik team
 answered on 22 Sep 2016
1 answer
368 views

We're getting this error in our code. Here's the full stacktrace:

System.ComponentModel.Win32Exception (0x80004005): Your file waiting to be printed was deleted
   at System.Drawing.Printing.StandardPrintController.OnEndPage(PrintDocument document, PrintPageEventArgs e)
   at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
   at System.Drawing.Printing.PrintController.Print(PrintDocument document)
   at System.Drawing.Printing.PrintDocument.Print()
   at Telerik.Reporting.Processing.ReportProcessor.PrintReport(ReportSource reportSource, PrinterSettings printerSettings) in c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Processing.ReportProcessor\ReportProcessor.PrintReport.cs:line 61
   at ABB.QC.ReportPrinter.Telerik.Printer.PrintReport(ReportType reportType, String scannerAlias) in ... \ReportPrinter\Telerik\Printer.cs:line 80

This error only occurs when the report printer application is called from a windows service. If we call it directly it works, which leads me to believe it's a permissions issue. I don't know where the file waiting to be deleted is, can somebody from Telerik cast some light on this for me?

Peter
Telerik team
 answered on 22 Sep 2016
1 answer
235 views

Hi,

I had generated report using Telerik table wizard control.  But i could not able to introduce pagination in the table wizard. How can it be possible?.  

Katia
Telerik team
 answered on 21 Sep 2016
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?