I've tried everything I can come up with to do this simple task:
Basic line graph with one category and 2 line series. One line shows a sales value and the other shows budgeted sales. Budgeted sales goes to the end of the year and the sales line becomes 0 after the current date. I've tried to use conditional formatting on the line series to hide the line on 0 values but it doesn't work. How do I make the line stop and hide the rest instead of showing a drop down to 0?
Thanks,
Chris.
I have followed the instructions on how to install Telerik Reports into Lightswitch.
http://blogs.telerik.com/blogs/posts/11-04-12/how-to-telerik-reporting-in-microsoft-lightswitch-beta-2.aspx
I am so frustrated I have been working at this in the evenings for two weeks and have not been able to get the darn thing to work.
I guess I do not understand how the magic works in getting the WCF service linked up to the Lightswitch application.
I have a LS app that I placed the WCF service project in. Is that all? Do I need to compile the WCF and install it somewhere?
I starts rendering the report then BOOM
Error: System.Reflection.TargetInvocationException : An exception occurred during the operation, making the result invalid. Check InnerException for exception details.
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Telerik.Reporting.Service.SilverlightClient.RenderAndCacheEventArgs.get_RenderingResult()
at Telerik.ReportViewer.Silverlight.ReportViewerModel.OnRenderAndCacheCompleted(Object sender, RenderAndCacheEventArgs e)
------------- InnerException: -------------
System.ServiceModel.CommunicationException : The remote server returned an error: NotFound.
at System.ServiceModel.Channels.Remoting.RealProxy.Invoke(Object[] args)
at proxy_3.EndRenderAndCache(IAsyncResult )
at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnEndRenderAndCache(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
I have never worked with WCF and need a little hand holding to get this working.
Can someone from the community give me advice?
Thanks
Cliff
Hey smart folks I need your help again.
I have a LightSwitch Application (in browser Silverlight app) that has a Telerik Silverlight report viewer implemented.
I also have a second solution that implements the Reports and WCF Service. I have successfully deployed both the LightSwitch application and the WCF service to two separate websites on Azure.
The application works fine but when I attempt to display the reports in the report viewer I get the following error.
The error occurs after I have set all of the report parameters on the LightSwitch side in the report’s renderbegin event handler.
Exception message
System.ServiceModel.CommunicationException :
There was an error while trying to serialize parameter Telerik.ReportService:parameters.
The InnerException message was 'Type 'System.Int32[]' with data contract name
'ArrayOfint:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected.
Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding
them to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details.
at System.ServiceModel.Channels.Remoting.RealProxy.Invoke(Object[] args)
at proxy_3.BeginRenderAndCache(String , String , NameValueDictionary , NameValueDictionary , AsyncCallback , Object )
at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnBeginRenderAndCache(Object[] invalues, AsyncCallback asyncCallback, Object state)
at System.ServiceModel.ClientBase`1.InvokeAsync(BeginOperationDelegate beginOperationDelegate, Object[] inValues, EndOperationDelegate endOperationDelegate, SendOrPostCallback operationCompletedCallback, Object
userState)
The report needs the following parameters which are set in the LightSwitch application
StudioId Int32
StudentIds Int32[] //* Note this is an Int array*
SortCriteria1 string
SortCriteria2 string
SortCriteria3 string
DisplayName string
What is this telling me and what do I need to do to correct the problem.
Thanks again
Cliff
Code Follows
The WCF service is basically an empty shell
IReportService like this
namespace WcfReportingService1
{
[ServiceContract]
public interface IReportService
{
}
}
ReportService.svc like this
namespace WcfReportingService1
{
public class ReportService : IReportService
{
}
}
WebConfig like this
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<!--Connection String for Production - Azure-->
<add name="Studio_Manager_ConnectionString"
connectionString="Data Source=xxxxxxx.database.windows.net; Initial Catalog=xxxxxxxxxxx; User Id=xxxxxx;Password=xxxxxxxxx "
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service
name="Telerik.Reporting.Service.ReportService"
behaviorConfiguration="ReportServiceBehavior">
<endpoint
address=""
binding="basicHttpBinding"
contract="Telerik.Reporting.Service.IReportService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint
address="resources"
binding="webHttpBinding"
behaviorConfiguration="WebBehavior"
contract="Telerik.Reporting.Service.IResourceService"/>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ReportServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="WebBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>// Any help at all will be greatly appreciated.
// Any help at all will be greatly appreciated.
Hi,
I am using Q2 2014 SP1 of Telerik Reporting. I am creating the entire Graph object in code (and setting it's datasource), and adding a couple of series to it (a line and a bar).
I need to be able to change the color of the individual bars in the bar series. I am graphing monthly measurements (metrics) where the Line Series is a "Planned" (like ar Budget) value and the Bar Series is the "Actual" value. This Actual value will either be above or below the Planned value and if they have hit or exceeded their plan for we want to color the bar Green for that single data point. If they've missed their plan, we want to color the bar Red.
This is very easy to do with your ASP.NET HTML Chart, but I don't see an example of how to do this with the reporting Graph. For now, I'm creating my BarSeries as below.
var actualColumnSeries1 = new Telerik.Reporting.BarSeries();
actualColumnSeries1.CategoryGroup = productCategoryGroup;
actualColumnSeries1.CoordinateSystem = cartesianCoordinateSystem1;
actualColumnSeries1.LegendItem.Value = "Actual";
actualColumnSeries1.SeriesGroup = orderDateGroup;
actualColumnSeries1.Y = "=CDbl(IsNull(Fields.ActualValue, 0))";
But it seems what I really want to do, is to do it like I do it with the ASP.NET HTML Chart. With the HTML Chart I:
Dim actualColumnSeries As New ColumnSeries
For Each bv As MyMetricValue in TheMetricValues
Dim seriesItem As CategorySeriesItem
seriesItem = New CategorySeriesItem(bv.ActualValueCalced)
seriesItem.BackgroundColor = GetDrawingColorFromValueStatus(bv.ActualValueStatusFromDB, False)
actualColumnSeries.SeriesItems.Add(seriesItem)
Next
Is there a way to do this in the Reporting Graph? If not, then I'm in a bad spot because I can't use the ASP.NET HTML Charts due to their poor performance in older browser when there are a lot of them on my page (15 or more, and yes I've followed your article regarding performance optimization for the HTMLChart).
Hi ,
I am working on a POC using Telerik report designer.
I want to generate a html5 or HTML5Interactive and open it in browser or inside an email body without using Telerik report viewer .
In the report I have a .png image as logo. But when i generated the report programmatically image will be converted to a .bmp and image in the html body is broken.
I can fix this by renaming the image in html by adding the extension to the image . How can i fix this issue directly using a configuration or something ?
Hi everyone, in my project I need to create a Graph with custom color for each series. I need to bind the series color to color codes stored in my database.
How can i do this ?
Best regards,
Julien
I have a Web Api project with Telerik reporting, and a client Angular site that hosts the reportviewer.
The reports are triggered by a button on the angular app, which opens a new window which hosts the reportviewer,
The initial call to the report Web Api works as expected, the data is read from the database using an object datasource and the report is displayed.
If I then change the values in the database and click the browser refresh button, or the button that fired the report, I get the report with the old values being displayed. I have also tried modifying the report by adding new labels, recompiling the Wep Api project and refreshing, but I still get the old report showing.
If I click the refresh button on the report viewer, the report is refreshed correctly.
I initially thought this may have something tho do with the ReportsController in the Web Api as described in this thread, but I have the same symptoms irrespective of whether I override CreateCache with a File case or a database cache, or override CreateStorage with a MsSqlServerStorage.
I ran a Fiddler trace and noticed that when I clicked the report button a second time (or clicked the browser refresh button) the call to
GET /api/reports/clients/114416-a7b5/instances/112216-ebd8/documents/113600-3f1a113600-57c1/info returned
{
"documentReady"
:
true
,
"pageCount"
: 1,
"documentMapAvailable"
:
false
,
"bookmarkNodes"
:
null
}
and when I clicked the refresh button on the report viewer it returned
{
"documentReady"
:
false
,
"pageCount"
: 0,
"documentMapAvailable"
:
false
,
"bookmarkNodes"
:
null
}
after this the call was made a second time and returned
{
"documentReady"
:
true
,
"pageCount"
: 1,
"documentMapAvailable"
:
false
,
"bookmarkNodes"
:
null
}
and the report was rendered with the correct data.
I also noticed that if I recycle the app pool, the report is rendered correctly, which points to something being cached in session. This is odd as the Web Api project has session state disabled.
What do I need to do to get the report to be re rendered every time?
Regards
Colin
Hello Telerik Team!
My apologies if this question has already been asked a hundred times, but I am having trouble with the end-user display of report parameters. No matter what value the parameter is given on the end-user side, the report still displays the parameter's default value set in the designer. Is there a step that I am missing?
Thanks so much.
We have a report with a Navigate to Url Action on a cell. The Url generated consists of a time range where the times specified are DateTimeOffsets. We discovered an issue where times with a non-negative time zone offset would result in an incorrect Url string. The root cause of this was due to the '+' in the '+00:00' portion of the DateTimeOffset not being UrlEncoded as it should be and resulted in a space instead of a plus.
I believe this may be a bug/issue in how Telerik's Report Viewer generates the Url when the report is generated. I believe it is not properly escaping all characters that should be escaped in a Url.
Our solution is to create a User Function called UrlEncode which receives a string and returns the results of the C# WebUtility.UrlEncode() function. This standard .Net function properly UrlEncodes all necessary characters in the string. The only limitation I've seen is that it is new as of .NET 4.5. (Here is the MSDN documentation for this method: https://msdn.microsoft.com/en-us/library/system.net.webutility.urlencode.aspx)
I've detailed an example below.
With:
A start date of 04/07/2015 13:29:32 +00:00
An end date of 04/07/2015 13:34:25 +00:00
The following is the original version of the Target Url expression used to generate the Url in the Navigate To Url action. This resulted in the '+' portion of a positive time zone offset being replaced by a space in the resulting Url:
= '../RptExternal?' +
'sDate=' + Fields.StartDate.ToString() +
'&eDate=' + Fields.EndDate.ToString()
This resulted in a Url such as:
http://localhost/RptExternal?sDate=2015/04/07%2013:29:32%20+00:00&eDate=2015/04/07%2013:34:25%20+00:00
While relatively easy to decipher visually, our ASP.NET MVC web app would receive that and translate the URL incorrectly by replacing each occurrence of a '+' with a space.
With the solution described above, the following is the working version of the Target Url expression used to generate the Url in the Navigate To Url action:
= '../RptExternal?' +
'sDate=' + Reporting.Helper.UserFunctions.UrlEncode(Fields.StartDate.ToString()) +
'&eDate=' + Reporting.Helper.UserFunctions.UrlEncode(Fields.EndDate.ToString())
This results in a Url such as:
http://localhost/RptExternal?sDate=2015%2F04%2F07+13%3A29%3A32+%2B00%3A00&eDate=2015%2F04%2F07+13%3A34%3A25+%2B00%3A00
Which our web app receives and properly translates the date times into valid DateTimeOffsets as expected.