Telerik Forums
Reporting Forum
8 answers
590 views
I have a MVC application where I have a bunch of reports.  I want the user to be able to select a report they want to view, select the parameters and then display the selected report when they click a button.  How do I go about doing this?
Stef
Telerik team
 answered on 16 Sep 2014
3 answers
877 views
I am downloading Telerik as we speak to evaluate. I have spent a couple of weeks battling with SSRS.

Can you please point me to a simple report using VB.net, WinForms and SQL Server?

Also, if you know, if I buy a license for creating reports can I use it on my desktop and laptop, or do I need to buy two licenses?

Thanks,
John
Stef
Telerik team
 answered on 15 Sep 2014
3 answers
509 views
Hi,

I am new to Telerik Reporting and is currently like what I am seeing.
However,  I have this scenario where I have subreports. I would like to hide these sub reports when there is no data on it.
Currently, if there's no data it will show the reportHeadersection of that subreport to my master.

Thanks
Stef
Telerik team
 answered on 15 Sep 2014
1 answer
124 views
Hello.  I have a fairly simple problem with an ASP.NET application, and I'm hoping there is a simple solution.

I've created a class in my Visual Studio 10 solution called RFO_Output.cs.  I chose to not create a separate class library for two reasons (1) the reports I'm creating are not going to be shared in other applications (2) I couldn't find an example of how to call those external reports from an ASP.Net application.  Including it in my solution was easy enough, so I went that route.

The report is a simple banded report, but in my case I only want to show a single record at a time. The RFO_Output.cs class has a Telerik SQLdatasource component with the following SQL code in it (a very simple select):

SELECT [DCN_Outage_Ticket]
      ,[Event_Start_Time]
      ,[Event_End_Time]
      ,[Duration_Days]
      ,[Duration_Hours]
      ,[Duration_Minutes]
      ,[Duration_Seconds]
      ,[Summary]
      ,[Root_Cause]
      ,[Preventative_Measures]
  FROM tblMOPReason_For_Outage

I've created an ASP Panel on one of the .aspx pages in my solution, and included a Telerik ReportViewer component in the panel, with a button provided so that the end-user can have the panel be hidden or visible. The ReportViewer component has its ReportSource property set to the RFO_Output class mentioned above.  So far, no problems.  The Telerik examples are clear and helpful to this point.

My question involves how to limit my report to the desired records.  In my case, I want to select a particular row from the table above, based on a column in the same table.  I can add a WHERE clause, of course, then either pass a parameter ("WHERE KeyCol = @KeyVal") or modify the SQL at runtime to include the value ("WHERE KeyCol = 5").  But this is where things get murky.

The "Using Parameters with the SqlDataSource" component help page shows how to add a new SqlDataSource object in the C# code itself, but doesn't give an example of how to update an existing SqlDatasource already in the report class, or how to assign this new SqlDataSource to an existing reportsource.

I tried the following code:
            Telerik.Reporting.SqlDataSource thisSource = new Telerik.Reporting.SqlDataSource();
            thisSource.ConnectionString = "DCNConnectionString";
            thisSource.SelectCommand = "SELECT [DCN_Outage_Ticket], [Event_Start_Time] ,[Event_End_Time] ,[Duration_Days] " +
                                     "      ,[Duration_Hours] ,[Duration_Minutes] ,[Duration_Seconds] ,[Summary] " +
                                     "      ,[Root_Cause] ,[Preventative_Measures] FROM tblMOPReason_For_Outage " +
                                     "WHERE RFO_UID = " + HidRFOID.Value.ToString();
            Telerik.Reporting.Report thisReport = ReportViewer1.ReportSource as Telerik.Reporting.Report;
            thisReport.DataSource = thisSource;

But this doesn't compile, as the conversion from ReportSource to Report fails.  (An interesting side note is that the Telerik add-in doesn't show this as an error, but it shows up at compile time.)

Any suggestions on how to make this happen would be appreciated.  I'm not clear on how to update the SQL code for an in-place SQLDataSource, or how to reference the in-place report so that I can point it at a new SQLDataSource.

Thanks for your input on this.
Stef
Telerik team
 answered on 15 Sep 2014
1 answer
90 views
Since we have a number of common things in our reports we like to create a base class (derived from report). We put all the common stuff in the base class, including a few custom properties.

The Telerik report designer does not like this, after changing the base class from "Report" to "BaseReport" the designer does not render the report correctly any more, it only shows the report items (tables etc), not the report itself.

This behaviour is contrary to how VS normally handles this. This method of having a customised base class works for other VS components such as forms and datasets. 
Stef
Telerik team
 answered on 15 Sep 2014
3 answers
89 views
Currently reports work fine if everything is designed in the designer or if the full report is generated using code. However, we use design time reports which are extended at run time based on certain parameters. Two very basic use cases for this are:
1) Adding dynamic columns to a table
2) Adding a standard fixed header / footer to the report (with contents depending on the specific report instance)

The issue we have is that the report items we need to add to the report (header or extra columns) depend on data from the database.

It is possible (with a lot of restrictions and workarounds) to get the above working, but it would really make it a lot simpler if the following were available on the report class:
a) An event  / virtual method which can be overridden in a base class which gets called after the design time definition of the report has been created (similar to form loaded in other applications).
b) A way to get access at runtime to the column definitions of the SqlDataSource linked to a table (if it is a Sql source).

Our current partial solution is to set the data source of the table at design time and design the table accordingly. In our report's constructor we clear the data source of the table. In the "need data source" event of the table we create a new data source in code (duplicating the parameters etc. which were already defined during the design), open the dataset, inspect the column list and add the table columns as required. (Actually we return two result sets, one of which is a list of columns to add as selected by the user).



Stef
Telerik team
 answered on 15 Sep 2014
3 answers
517 views
I am attempting to use the HTML5 report viewer in one application and have another application as my report server.  I have debugged and attached to the report server.  I am hitting a breakpoint in the report controller as well as in my reports constructor so I know the site is running and finding the report.

I have configured it as directed on the help page and was able to download the formats using url http://localhost:62712/api/reports/formats.

I used Fiddler to get information in the attached but what jumps out to me is:
POST /api/reports/clients/[object%20Object]/parameters HTTP/1.1

I wanted to attach the projects but was not able to with the 'Allowed extensions' but basically I have changed nothing from the demos:
http://www.telerik.com/help/reporting/telerik-reporting-rest-host-http-service-using-web-hosting.html
http://www.telerik.com/help/reporting/html5-report-viewer-embedding.html

Please help!
Cheers,
Rob
P.S. My company is evaluating this product for purchase.
Stef
Telerik team
 answered on 15 Sep 2014
1 answer
74 views
Hai all........

i created a report in telrik Q1 2014 based on Employee table based on id it displaying the values there i added a subreport passing employeedid as a parameter my example is calculating the salary details in main report i am getting Employeeid,name,Wrokingdate,dayname,daysal and in subreport i am getting employeeid,Deductiontype,deductionamount based on emplyeeid.
Now in main report i want to calculate Net sal based on (totalsalry of working days-totalDeductioamount) now how to get total deduction amount of subreport in main report can any one please help me how to get total amount of deductions
Stef
Telerik team
 answered on 15 Sep 2014
1 answer
83 views
Hello,

I have a report (in Q3 2013 version) with several datasources and parameters. Some of those parameters are binded to datasource.
When I run the report in our web application I can see in MS SQL server profiler that binded datasources are run multiple times. Some of them like 40 times during the rendering.

Did I miss something important about the rendering procedure that can cause such a behavior? I did not find any pattern, jsut that only datasources that are bidned as sources for parameters are affected. But I was not able to find a pattern.

Thank you for your advice.

J.H.

Hinata
Top achievements
Rank 1
 answered on 12 Sep 2014
1 answer
176 views
I'm trying to display a simple report with several parameters.  When I tried to run as .TypeReportSource() I was getting cast errors it couldn't convert to an IReportDocument... so I changed to .InstanceReportSource()

it finds the report, sets it... all the parameters set then I get Entry point was not found. inside the ReportViewer once it launches.

It is probably also important to note that I am currently upgrading my version of telerik from Q3 2012 to Q2 2014.  I've attached a capture of the screen I am getting.  

This is my source code:
        Dim Report As New Telerik.Reporting.InstanceReportSource

        Report.ReportDocument = New FarmListWrapper()

        Report.Parameters.Add(New Telerik.Reporting.Parameter("UserId", UserContext.Current.UserId))
        Report.Parameters.Add(New Telerik.Reporting.Parameter("CustomerId", UserContext.Current.DisplayCustomerId))
        Report.Parameters.Add(New Telerik.Reporting.Parameter("CustomerName", UserContext.Current.DisplayCustomer.CustomerName))
        Report.Parameters.Add(New Telerik.Reporting.Parameter("StateId", Nothing))
        Report.Parameters.Add(New Telerik.Reporting.Parameter("CountyId", Nothing))

        ReportViewer1.ReportSource = Report
        ReportViewer1.RefreshReport()



Nasko
Telerik team
 answered on 12 Sep 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?