Telerik Forums
Reporting Forum
1 answer
135 views
What I am trying to achieve  is simply a cascade parameter report but I am not succeeding.
I have a table where I have several columns and two of these in the same table are the parameters I need to use: Country and Type.
Attached there are pictures showing how I have structured the two parameters and the filters.
The first parameter is populating (Country) but the second parameter (Type) does not show any Type after any of the country gets selected.

Your help will be really appreciated.
Thanks,
Felice
Peter
Telerik team
 answered on 19 Mar 2014
1 answer
284 views
Hi,

I am looking at using Telerik Reporting in ASP.NET MVC and have run into a problem in using the InstanceReportSource.

When loading a basic report into the report viewer, it shows 'Bad Request' (see attached screenshot). I have profiled this using Fiddler and traced this down to a problem in the REST service. On the request '/api/Reports/clients/113112-3522/parameters' it returns the response '{"message":"Missing report name"}'. I have tried setting various name parameters in the InstanceReportSource and on the report, but the problem still occurs.

I have tried exactly the same report in the same project using a TypeReportSource and it works fine! However, I cannot use this because I need to get access to the report to bind the data at runtime. I cannot specify any data sources in the report because the source of data is not known then. The data source must be set programmatically at runtime.

I have created a basic ASP.NET MVC project and am setting the report in the HomeController as follows...

  public class HomeController : Controller
  {
    public ActionResult Index()
    {
      // THIS DOES NOT WORK...
      ViewData["ReportSource"] = CreateInstanceReportSource();

      // THIS WORKS...
      //ViewData["ReportSource"] = CreateTypeReportSource();

      return View();
    }

    private ReportSource CreateTypeReportSource()
    {
      return new TypeReportSource()
      {
        TypeName = "TestTelerikReporting.Reports.Report1, TestTelerikReporting"
      };
    }

    private ReportSource CreateInstanceReportSource()
    {
      return new InstanceReportSource()
      {
        ReportDocument = new Report1()
      };
    }
  }

This is the view for the report viewer...

  @(Html.TelerikReporting().ReportViewer()
   .Id("reportViewer1")
   .ServiceUrl(Url.Content("~/api/Reports/"))
   .TemplateUrl(Url.Content("~/ReportViewer/templates/telerikReportViewerTemplate.html"))
   .ReportSource((Telerik.Reporting.ReportSource)ViewData["ReportSource"])
   .ViewMode(ViewModes.INTERACTIVE)
   .ScaleMode(ScaleModes.SPECIFIC)
   .Scale(1.0)
   .PersistSession(true)
  )

I have read this sample which states the InstanceReportSource should be used...

  http://www.telerik.com/forums/yet-another-reportsource-to-instancereportsource

However, this answer seems to contradict this approach and does not recommend using an InstanceReportSource...

  http://www.telerik.com/forums/asp-net-mvc---telerik-reporting-error-gt-api-reports-clients-returns-missing-report-name

What is the recommended way of getting an instance of a report in an ASP.NET MVC application, to be able to bind data to it? Any assistance is much appreciated!

Kind Regards,

James
Peter
Telerik team
 answered on 17 Mar 2014
1 answer
219 views
HI,

I have a probleme with the reporting designer in Visual Studio 2012 (cf  joined png)
I have 3 reports in my project i can't open the more used one. the others can be opened.
I can modify the failed report in code behind, I can use it in my application but can't update it per the designer.

this report was made with the Q2 2012 dll ( 6.1.12.611), i updated my telerik dlls in Q2 2013(7.1.13.612) 
the problem persists. one of three reports remains unupdatable.


I have this error message:
 Impossible de convertir l'objet de type
'System.Collections.Generic.List`1[Telerik.Reporting.ObjectDataSourceParameter]'
en type
'System.Collections.Generic.IList`1[Telerik.Reporting.ObjectDataSourceParameter]'.

à System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo
culture, Boolean needsSpecialCast)
à System.RuntimeType.CheckValue(Object
value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
à
System.Reflection.RtFieldInfo.UnsafeSetValue(Object obj, Object value,
BindingFlags invokeAttr, Binder binder, CultureInfo culture)
à
System.Runtime.Serialization.SerializationFieldInfo.InternalSetValue(Object obj,
Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
à
System.Runtime.Serialization.FormatterServices.SerializationSetValue(MemberInfo
fi, Object target, Object value)
à
System.Runtime.Serialization.ObjectManager.CompleteObject(ObjectHolder holder,
Boolean bObjectFullyComplete)
à
System.Runtime.Serialization.ObjectManager.DoNewlyRegisteredObjectFixups(ObjectHolder
holder)
à System.Runtime.Serialization.ObjectManager.RegisterObject(Object
obj, Int64 objectID, SerializationInfo info, Int64 idOfContainingObj, MemberInfo
member, Int32[] arrayIndex)
à
System.Runtime.Serialization.Formatters.Binary.ObjectReader.RegisterObject(Object
obj, ParseRecord pr, ParseRecord objectPr, Boolean bIsString)
à
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObjectEnd(ParseRecord
pr)
à
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord
pr)
à
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
à
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain,
IMethodCallMessage methodCallMessage)
à
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck, Boolean
isCrossAppDomain, IMethodCallMessage methodCallMessage)
à
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream)
à
System.Resources.ResXDataNode.GenerateObjectFromDataNodeInfo(DataNodeInfo
dataNodeInfo, ITypeResolutionService typeResolver)
à
System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
à
System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean
isMetaData)
à System.Resources.ResXResourceReader.ParseXml(XmlTextReader
reader) 
  What can I do more?





Nasko
Telerik team
 answered on 17 Mar 2014
2 answers
202 views
I have this weird problem. Please see the attached picture. Th report viewer appears completely messy on the server but they are 100% fine on my local.
What could be the problem?
Peter
Telerik team
 answered on 17 Mar 2014
2 answers
300 views
Hi guys,

I would like to create the dynamic report where the most of UI will be created based on the data source information.
My data source depends on two report parameters which are received from html5 viewer.
I can see that I can use the NeedDataSource event handler to retrieve the report parameter values and then populate the report data source.

Ideally, I would like to programmatically build the report UI during the initialization stage, e.g. in the InitializeComponent() method. But I need to get the report parameter values.
Is it possible to get the values of the report parameters in the report constructor?
Or how can I pass the report parameter values from html5 viewer so I could get them before creating the report UI? 

Thanks,
Sergey. 
Sergey
Top achievements
Rank 1
 answered on 17 Mar 2014
1 answer
140 views
I have a report with a detail section that has a few html textboxes that have the value bound to a field. If that field is empty, I want the html textbox to shrink. I have CanShrink set to true. It works for regular textboxes. Am I missing something?

In the designer code I also set the visibility to false and the height and widths but it still keeps the report spaced out.

        private void detail_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.DetailSection procDetail = sender as Telerik.Reporting.Processing.DetailSection;

Telerik.Reporting.Processing.HtmlTextBox txtSpecialTests = (Telerik.Reporting.Processing.HtmlTextBox)Telerik.Reporting.Processing.ElementTreeHelper.GetChildByName(procDetail, "txtSpecialTests");

            if (txtSpecialTests != null)
            {
                if (txtSpecialTests.Value.ToString() == "")
                {
                    txtSpecialTests.Visible = false;
                    txtSpecialTests.Height = new Unit(0);
                    txtSpecialTests.Width = new Unit(0);
                }
            }
}

Thanks,

Zack
Peter
Telerik team
 answered on 17 Mar 2014
4 answers
127 views


I have a GRAHP bar chart that works graet with 10 records coming from the database, however when thre are 100 records, they are very narrow and hard to read.

This graph is in library and its DataSource is binding directly from the database procedure to the graph so there is no place to check for number of records in the C# code.

Would it be possible to have the width of the bars always the same and if there are 10 records, they would display on first page, if there are 100 records, then the X axis would extend to the right and display on the next pages? Can this be accomplished in the designer settings?

The graph contains cartesian coordinate system, datasource (stored procedure), bar series, category and numerical scale.

(All data has to be displayed, I cannot use filters.)

Joan
Top achievements
Rank 1
 answered on 14 Mar 2014
4 answers
92 views
I just attempted to upgrade all our Telerik controls in our Silverlight application from Q1 2013 to Q1 2014. Everything seems to work OK except the Reporting. When I bring up our report viewer page, the screen is empty - the ReportViewer control does not even appear.

I ran the Report Upgrade Wizard to move our reports from 7.0.13.220 to 8.0.14.225.

When the page loads, it is calling - successfully - to the ReportService.svc on the web side when I attempt to ListAvailableReports. The ListAvailableReportsCompleted event is firing and returning all the reports. My code finds the correct report and then sets the Report property of the ReportViewer control to the FullName property of the appropriate returned Telerik.Reporting.Service.ReportInfo object. (This is the fully qualified name of the object).

However, when the function is left, the ReportViewer does not attempt to communicate with the ReportService.svc service as it did in the previous version of the controls. I have verified this using Fiddler. Fiddler shows that the call to ListAvailableReports is made, but that is the only call. In the old version of the controls, the following methods of the WCF Service are called, in this order:

RenderAndCache
ListAvailableReports
ListRenderingExtensions
RenderAndCache
GetPage

Any idea why this would be broken in the latest release? Is there some property on the ReportViewer I must set to have it automatically generate the report? Is there a method I can call to force the ReportViewer to render the page?
Nasko
Telerik team
 answered on 14 Mar 2014
1 answer
99 views
Hi All,

Is this possible to add the Telerik Q1 2014 Report Viewer Control (Version 8.0.14.225) as Web Part in SharePoint 2010.
If Yes then please send me the details of configuration settings which has to be done.

As per my requirement I should be able to add the Report viewer control as a web part in SharePoint 2010 where I can set the path of the Reports.

Thanks,
Seeshil Kumar
Peter
Telerik team
 answered on 14 Mar 2014
8 answers
623 views
Hi Telerik

Im playing around with a graph with two series. A stacked Bar and a line. (A bit like the demo http://www.telerik.com/help/reporting/graphhowtocreategraphwithcolumnandlineseries.html)
Ive got separate Y axis as well. (http://www.telerik.com/help/reporting/graphhowtoaddsecondaryaxis.html)


At processing time, ie in the itemdatabinding event for the graph,is it possible to hide the Y axis for either or both Yaxis?

I use the following...

var processingGraph = (Telerik.Reporting.Processing.DataItem)sender;
var graph = (Telerik.Reporting.Graph)processingGraph.ItemDefinition;

// Hide the 
 (graph.Series[1].CoordinateSystem as CartesianCoordinateSystem).YAxis.Style.Visible = false;   
and then show it again with ...
 (graph.Series[1].CoordinateSystem as CartesianCoordinateSystem).YAxis.Style.Visible = false;   
But this leaves the major step markers....


Any ideas?


Mike















Ivan Hristov
Telerik team
 answered on 14 Mar 2014
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?