Telerik Forums
Reporting Forum
2 answers
333 views
Greetings!

So, a Telerik Reports newbie here and I have a question about all of my charts doing this funny little thing with grouping and returning multiple pie/bar/line charts.

So lets start with the basics, I have a Pie Chart that has two columns from the stored procedure... Age Group, and PeopleServed.  The RecordSet should look something like this:

AgeGroup        PeopleServed
0-4                    3
12-14                85
15-17                55
18-20                26
Age not Know   12 

In SSRS in Visual Studio this is a really simple Pie Chart and completed in seconds.  X= AgeGroup, Y=PeopleSever, done!  One pie chart, not one for every AgeGroup repeating the same data over and over again.  However in the stand alone Report Designer I get the attached photo instead.    

I have to admit in my version of the Report Designer (Report Designer Q2 2014) that when I tried to add the data source of a stored procedure from SQL, I couldn't add it.  It simply would not let me add that data set even after I tested it and it had the same number of columns and was indeed retuning data.  I had to add a 'test' data source with two 'dummy' fields of the same name just to get the pie chart added and change the Data Source after.  So on top of that headache, when I do add the correct live data I get this mess of multiple charts.

So I assumed the issue was with the grouping somewhere, so I followed the instructions found on Telerik's website (http://www.telerik.com/help/reporting/graphhowtocreatepiechart.html) on how to set up the seriesGroup, categoryGroup and Series which can be seen in my second file attached.

So, assuming at this point that one of those groups was causing the issue I started to remove them.  All of them at one point.  I even tried to dumb the report down to just an X and a Y axis and I STILL get this grouping of the pie chart showing up 5 times no matter what settings I fix/change/alter.

So I am calling on the experts here...  why is this happening?  What did I do wrong with this and many reports to get these multiple charts to repeat?

Thanks, 

Ed






  
Mosaix
Top achievements
Rank 1
 answered on 28 Oct 2014
1 answer
159 views
I'm currently trialling Reporting, and am a little confused as to how to export a report with data from C#.

I am using the standalone report designer to save a trdx file using the ObjectDataSource and I'm trying to export to PDF, looking at the KB I have the following code block:

Order tempOrder = new Order("12345", "Mr Test");
 
            Telerik.Reporting.Report report = new Telerik.Reporting.Report();
            report.DataSource = tempOrder;
 
            System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
            UriReportSource reportSource = new UriReportSource();
            reportSource.Uri = @"E:\Program Files (x86)\Telerik\Reporting Q2 2014\Report Designer\Examples\Order.trdx";
            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
 
            string fileName = result.DocumentName + "." + result.Extension;
            string path = System.IO.Path.GetTempPath();
            string filePath = System.IO.Path.Combine(path, fileName);
 
            using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
            {
                fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            }

Which seems to output a pdf using my trxd file however I can find no way to pass in both the data source (or the Report variable with data source defined) and the path to the trdx file. 
Stef
Telerik team
 answered on 28 Oct 2014
1 answer
111 views
Hi,
I am using telerik reporting on my mvc application and wanted to cache my reports per day (my data remains same for whole day and changes only next day). So I wanted to know best cache mechanism and implementation to attain cache for my reports.

This is my report code :
SomePage.aspx :

<tr>
<td style="width: 49%; vertical-align: top;">
<telerik:ReportViewer ID="somereport" runat="server" ToolbarVisible="false">
<typereportsource typename="somenamespace, AgentTrends, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"></typereportsource>
</telerik:ReportViewer>
</td>
</tr>

<div id="somedivid">

@Html.Partial("SomePage")
</div>

               
Stef
Telerik team
 answered on 27 Oct 2014
1 answer
113 views
Hello,

Is there a simple way to create a report from a WPF RadGridView, I dont want to use the export method (pdf, csv...) because I have to add somme other informations. I create my own class but when there are converters or DataTemplate, it doesn't works.

Thanks in adavance

Stef
Telerik team
 answered on 27 Oct 2014
1 answer
129 views
Hi,

I have a report (trdx) file that i've copied from the remote server. i copied it to my local PC. ( i have also restored the database to my PC). i built the report with the same version of Telerik Report Designer. Q2 2014 ver. 8.1.14.804

due to connection and location problem, i have to make a modification with the report locally in my PC, so i copy and open it.

then, the Report Designer goes "loading..", but never finish loading the report. hang, it shows "not responding" in windows task manager, so i have to force close it, again, and again. i've waited for a long time, but it never finish loading it. do i have to build it again from the start? really?

maybe it has something todo with the connectionString. i dont know.

it's happen everytime when i want to change a report that connectionString's is not actually connected at the moment.

its fine when i open a report (trdx) that have connectionString with my local DB in my PC.

so, is there anyway that i can open and modify the report (trdx) ?

Thank you for your kind attention.

-Hariadi-




Nasko
Telerik team
 answered on 24 Oct 2014
1 answer
289 views
When defining the HTML5 report viewer, one can either specify a TypeReportSource or UriReportSource as follows:

[code language="csharp"]
 .ReportSource(new TypeReportSource() { TypeName = typeof(ReportCatalog).AssemblyQualifiedName })
[/code]

When using the TypeReportSource I see all the reports defined within the assembly containing ReportCatalog.

My RESTFul report service is configured to return an instance of ReportTypeResolver as shown below:

[code language="csharp"]
    public class ReportsController : ReportsControllerBase
    {
        // GET: Reports
        //public ActionResult Index()
        //{
        //    return View();
        //}

        protected override IReportResolver CreateReportResolver()
        {
           // var reportsPath = HttpContext.Current.Server.MapPath("~/ReportDefinitions");
            //return new ReportFileResolver(reportsPath);
            //  .AddFallbackResolver(new ReportTypeResolver());

            // use this for Visual Studio reports
           return  new ReportTypeResolver();
        }


[/code]

If I was going to use the standalone report designer to create the reports and drop all report definitions in a folder named ReportDefinitions in my ASP.NET MVC project, how do I present this in the same catalog manner as if I was using the TypeReportSource?

I tried returning an instance of ReportFileResolver(reportsPath) as indicated in the commented section of the code without FallBack, setting the ReportSource of the report viewer to UriReportSource but the report viewer gives an error.



Stef
Telerik team
 answered on 24 Oct 2014
1 answer
277 views
Hi,

I have a report wherein I get data from a datasource. I have a textbox that may sometimes have a null value (see attached file).
Is there a way that the header height will automatically adjust from this textbox?

Thanks
Stef
Telerik team
 answered on 24 Oct 2014
0 answers
261 views
I'm attempting to use a ReportViewer to display reports in my WPF application. My first goal is to get a report viewer working in a new project to gain experience and then implement one in my main project. I've gone through a couple tutorials and have also run the example located at Telerik/Report Q2 2014/Examples/Csharp/WpfDemo. The example ran exactly the way it should and I had no problems with it at all. However when I use the same code in my own project it doesn't work. I don't get any errors or warnings and every builds correctly, but my window never displays the report viewer control. I stripped down the window in both the example and my project so there was only a window, a grid, and the report viewer. As expected the example still worked, but my code did not. I also tried removing all of my references to all telerik assemblies and using the ones used by the example. Nothing changed. Both my project and the example are using the same version of .NET and I cannot find anything different between the two projects. I have no idea what to do!
Anthony
Top achievements
Rank 1
 asked on 24 Oct 2014
1 answer
193 views
Hi,

I am using HTML5 Report Viewer to show a report. My users want to edit a field on the report. Is there way to achieve this using Telerik Reporting?

Thanks
Nasko
Telerik team
 answered on 23 Oct 2014
4 answers
568 views
Hello, I am trying to get my first report working with .NET MVC and the Reporting Q2 2014 HTML5 viewer. I was able to create a report viewer page in my application and view the sample reports, but have been unable to pass a report parameter to my custom report. I used the standalone designer to create the .trdx file, specified a parameter (ClientID) to be passed to the datasource, which is a SQL datasource that calls a stored procedure. That stored procedure has a single parameter, @clientID, which is mapped to the report ClientID parameter. The report parameter is an integer, and will eventually be set to visible = false when I get all of this sorted out.

Using the preview feature of the standalone designer, I got the same error that I see in my web application ('Missing or invalid parameter value. Please input valid data for all parameters.') until I made the parameter visible and entered a value. Once I did that, data was correctly returned. I am passing the report parameters like so:

@{
    var reportSource = new UriReportSource() {
        Uri = Url.Content("EligibilitySummary.trdx")
    };
    reportSource.Parameters.Add(new Parameter("clientID", Clients.GetByAuthenticatedUser().ClientID));
 
    @(Html.TelerikReporting().ReportViewer()
        .Id("reportViewer1")
        .ServiceUrl(Url.Content("/api/reports/"))
        .TemplateUrl(Url.Content("/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.618.html"))
        .ReportSource(reportSource)
        .ViewMode(ViewModes.INTERACTIVE)
        .ScaleMode(ScaleModes.SPECIFIC)
        .Scale(1.0)
        .PersistSession(false));
 }

When the page loads, a breakpoint on the reportSource lines shows that the parameter values are correctly set, and when the report viewer is displayed, the parameter value shows in the parameters pane on the right hand side, but clicking 'Preview' simply repeats the parameter missing message.

I'm not sure where I've gone wrong in the binding on the web side - some older posts mentioned a version of Newtonsoft.JSON being in the GAC might cause a problem - I have verified that's not the case here.

Any ideas where I've mis-stepped? 

Thanks!
Stef
Telerik team
 answered on 22 Oct 2014
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?