Advanced reporting
and data visualization components for .NET
LIVE CHAT Welcome, guest

 





Image Rendering, Chart Rendering and date time format
Display Posts for:
Invert
Meenakshi Muralidharan 08/23/2010 05:42
Image Rendering, Chart Rendering and date time format

Hi,

I too have error in displaying the date fields. If a format is specified, then SL Report Viewer gives silverlight unhandled exception.

My application is running in SL 4. I have done all the things specified in the sample application.

When I run the SL separately I am able to display images, date format and chart reports. But when I am trying to use it in my application, I am not able to get image, chart reports and date formatting properly.

I am showing images in my report. But it is not appearing in SL Report Viewer.

Please help.

Regards,
Meena
Irina Sabaeva 08/24/2010 23:18
Image Rendering, Chart Rendering and date time format

Hello,

If our example does not work in your application but you can run it separately, please check the settings of your application. Perhaps the resources section is not configured in the web.config file correctly.

<endpoint address="Rest" behaviorConfiguration="webBehavior" binding="webHttpBinding" bindingConfiguration="webHttpBindingConf" contract="PerpetuumSoft.ReportingServices.Viewer.Server.IReportServiceResources" />

If the problem could not be solved, please send us your application to [email protected].

Best regards,
Perpetuum Software Support Team
Meenakshi Muralidharan 08/25/2010 00:07
Image Rendering, Chart Rendering and date time format

Hi,

I have separated the service and the silverlight web application.
The service has all the configurations which is specified by you. Do you mean to say that the silverlight web application too should have the same configuration.

Regards,
Meenakshi
Badal K 08/25/2010 01:24
Image Rendering, Chart Rendering and date time format

Hi Irina,

The scenario is..

We tried this in two applications..
In 1 - We separated service and UI and tetsed the application with no issues.. chart and images are shwon. and even fiddler shows us the two rest calls
/ReportService.svc/Rest/GetResource?Culture=en-US and for images
/ReportService.svc/Rest/GetImageStreamId?id=ft1tyj.....
In this application web.config we dont have any client side end point registered and we just give the service url and it works.

In 2 - The actual implementation - we have a routing service in place and in web.config we just give the service url as the routing service url with specific service contract name and end point name.
What we would like to know is..
1. Is it required to have the client endpoint for REST service calls registered in web application's web.config
2. What if we dont want to hardcode the service url in our application but instead read it from the client endpoint registered with a given name, which i guess is a very typical way of doing things (in practice)

We would like to know these things as soon as possible and hence would appreciate your quick response.

Regards
Badal
Irina Sabaeva 08/26/2010 17:03
Image Rendering, Chart Rendering and date time format

Hello,

1. Yes, in the web.config file must be specified the <endpoint address = "Rest", otherwise the Silverlight Report Viewer will not be able to get resources (Image and Chart) from the service.
2. Yes, you can hardcode the ServiceURL in Silverlight application.

Best regards,
Perpetuum Software Support Team
Badal K 08/26/2010 23:46
Image Rendering, Chart Rendering and date time format

Dera Irina,

For the first point.. can u send me the exact configuration we need to put it in web.config.

For the second point .. if you notice.. was not for hardcoding. I do not want to hardcode the service url in my application.. As this service url will change for each deployment environment and for each of our customers.

Regards
Badal
Sergey Piskov 08/27/2010 07:01
Image Rendering, Chart Rendering and date time format

Hello.
1. The ReportService configuration section should look as follows:

Code:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="SampleApplication.Server.ReportServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service behaviorConfiguration="SampleApplication.Server.ReportServiceBehavior" name="SampleApplication.Server.ReportService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBindingConf" contract="PerpetuumSoft.ReportingServices.Viewer.Server.IReportService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="Rest" behaviorConfiguration="webBehavior" binding="webHttpBinding" bindingConfiguration="webHttpBindingConf" contract="PerpetuumSoft.ReportingServices.Viewer.Server.IReportServiceResources" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConf">
<security mode="None" />
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding name="webHttpBindingConf">
<security mode="None" />
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>


2. In order to use hardcoding setting of links from Silvelright application to Reporting Services you need add the parameter with «initParams» name in the *.aspx file where silvelright component is described. Please see the example below:

Code:
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/SampleApplication.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
<param name="initParams" value='ServiceUrl=<%= String.Format("http://{0}{1}", Request.Url.Authority, ResolveUrl("~/ReportService.svc")) %>;DebugMode=Full' />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
<iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px">
</iframe>
</div>



In order to use the value of this parameter in Silverlight application you should write the following code:

[code]reportViewer.DebugMode = DebugModeEnum.Full;
reportViewer.ReportName = "…";
if (HtmlPage.IsEnabled == false)
{
reportViewer.ServiceUrl = "http://localhost:5555/ReportService.svc";
}
else
{
SilverlightInitParamsHelper initParamsHelper =
new SilverlightInitParamsHelper(
HtmlPage.Plugin.GetProperty("initParams").ToString());
reportViewer.ServiceUrl = initParamsHelper.ServiceUrl;
reportViewer.DebugMode = initParams
Badal K 08/27/2010 08:11
Image Rendering, Chart Rendering and date time format

Hi Irina,

What i want to know is .. if we separate the SL ui from the service

how the configuration looks like for the SL web app (web.config) for this serivce.

And how does it look like at the service end.

If you can send me the whole System.ServiceModel configuration for client and service separately.. that would really great.

I am still struggling to get chart type reports and image rendering to work.

Thanks.
Badal
Badal K 08/30/2010 06:34
Image Rendering, Chart Rendering and date time format

Hi,

What we have noticed is Rest/GetImageStream?... is not at all called from the reporting service when the report is being rendered. We have observed this in fiddler. The report viewer shows rendering and then shows a blank screen. If we try to export the report.. (e.g. in word) it show the chart displayed in the file.. but on screen its not showing it up?
In other sample app where we are calling the same report.. its working fine and Rest/GetImageStreams called.

Any idea if we are doing something wrong ? Are we missing something?

Regards
Badal
Badal K 08/31/2010 00:33
Image Rendering, Chart Rendering and date time format

Hi,

Looks like the problem is because we are rendering the XAML that contains this SL report viewer control using XAML rendering APIs at runtime.. and if the XAML contains images.. there is a different way to handle it i guess..

I dont know how the exact code will look like .. (and please help us if you know this) but i found this below article explaining the same issue..

http://www.netframeworkdev.com/windows-presentation-foundation-wpf/render-image-xaml-at-runtime-72155.shtml

Do you have a solution for this?

Regards
Badal
Vitaliy Korney 09/20/2010 07:09
Image Rendering, Chart Rendering and date time format

Hello,

We have discussed your issue and have no idea why it happens.
Is it possible for you to create a dummy example that will demonstrate the problem you have?
As you can understand it is difficult to help you without example which will help us to detect the cause of the problem.

Best regards,
Vitaliy Korney
Perpetuum Software Team
Badal K 09/23/2010 00:31
Image Rendering, Chart Rendering and date time format

This was because the service was hosted using HTTP endpoint whereas the web site that has SL report viewr control hosted was on HTTPS endpoint.

When we made the service as well on HTTPS endpoint it worked.

Regards
Badal
Vitaliy Korney 09/23/2010 02:26
Image Rendering, Chart Rendering and date time format

Hello,

We are glad that your problem is resolved. If you will have some other problems just let us know.

Best regards,
Vitaliy Korney
Perpetuum Software Team