Telerik Forums
Reporting Forum
15 answers
2.6K+ views
Hello!

I'm playing around with the standalone designer and find the DataSource handling not really practical:

First, when you create a DataSource, the Wizard offers to save it in the application configuration file, which is of course read-only if the desinger is installed somewhere under Program Files. Instead the standalone Designer should store this information in a per-user configuration.

My scenario is to call the reports from my application, where the connection string changes depending on user input in a database connection dialog.
In this case the handling of the different DataSource objects in the report items and subreports etc. is rather tedious.
So far, I have to recursively find all Data Items in the report/subreports and change the connection string. This works as long as all items really use the same connection.

The proposed workaround with defining a report parameter and using binding requires a lot of discipline from the designer, OK for a programmer but not really practical for "Powerusers".

I would like to be able to define connections separately from sql statements (multiple DataSource objects using the same logical connection object)  and have these connections easily accessible in the designer UI and the API.

Am I missing something?

Regards
Erwin

BTW: really looking forward to being able to drop crystal report support from my application, as soon as the designer gets a bit more friendly for end users. Keep on with the great work!
Peter
Telerik team
 answered on 29 Oct 2012
4 answers
85 views
Hello,

I am using Telerik Reporting Q1 2012 (6.0.12.215).  I have a main report whose datasource is an object that returns a <List> collection. I also have two other fields in the report header that are set when the report is instantiated, these textboxes are set with parameters from my Winform application.  Also on this main report is a field that allows us to drill through to another report. When the field is clicked the drill through report opens fine however when I go back to the main report the value of the fields in the report header are gone however the datasource still maintains it result set.

How can I ensure that the values in the textboxes remain after I return to the main report...as it looks like their values are lost when navigating to the drill through report.

Thanks,

Kerry
Kerry
Top achievements
Rank 1
 answered on 29 Oct 2012
1 answer
117 views
I have a master reports with two sub reports.  Each sub report provides the sum of an item contained in different databases.  I need to be able to add these two sums together in the master report, but cannot figure out how to access the values in the sub reports to do the calculation.

Can someone tell me how I can add these two values together and display it in the master report?  If anyone has a code sample of how to do this I would really appreciate it.

Thanks

 
IvanY
Telerik team
 answered on 29 Oct 2012
2 answers
354 views
Hi,

   I am working in Telerik Reporting. I am using the Cross Tab Wizard to load the reports. It contains two columns in rowgroups and 3 columns in details section. My scenario is to add the columns dynamically based on the dropdown value. For ex. I have 4 column names in dropdown with multiple checkbox. If the user selects 1 column I need to display rowgroups columns with the selected column. I need to add the columns in Cross Tab Wizard dynamically based on the number of columns selected in dropdown. Is that possible to create the columns dynamically in Cross Tab Wizard based on the condition?. If it is possible please provide me the source code.

       Please reply me asap as i need to complete my task in urgent basis.



Thanks
Jegan S
Peter
Telerik team
 answered on 29 Oct 2012
1 answer
154 views
I have a page with a report viewer Version=6.1.12.820, I load a trdx to it, it displays fine, but when I generate a PDF from it and try to view it, I get the following:

Files does not begin with %PDF-

Seems the PDF is corrupt for some reason?
IvanY
Telerik team
 answered on 29 Oct 2012
2 answers
202 views

Followed the advice form this link below but still no luck
http://www.telerik.com/community/forums/reporting/telerik-reporting/how-do-you-programmatically-bind-subreports-in-q2-2012.aspx

Telerik.Reporting.SubReport mySubReport = (Telerik.Reporting.SubReport)oReport.Items.Find("MySubReport", true)[0];

//*** This is working
// this code block loads the data in sub report in this case if i set the subreport as an object Instance

var repSource = (InstanceReportSource)mySubReport.ReportSource;
var subreport = (Telerik.Reporting.Report)repSource.ReportDocument;
var odsItems = (Telerik.Reporting.ObjectDataSource)subreport.DataSource;
subreport.DataSource = objectDataSource;

//*** End

//*** This is not working
// this code block doesn't load the data in sub report in this case if i set the subreport as an XML Source (serialized report using ReportXmlSerializer)
var repSource = (XmlReportSource)kpiActionsSubReport.ReportSource;
Report subreport = TelerikReportHelper.DeSerilizeTelerikReportXML(XElement.Parse(repSource.Xml)); //(deserialized report using ReportXmlSerializer)
subreport.DataSource = objectDataSource;
//*** End

John North
Top achievements
Rank 1
 answered on 27 Oct 2012
2 answers
184 views
Hello,

Currently we are attempting to use the Web Report Viewer in our MVC4 project, and have run into some issues running on the IE9 Browser. When using Chrome or another browser, the viewer renders the report with no issues. Currently the aspx partial view that holds the viewer is being served up by a regular MVC controller.

Here is the error I receive when running the viewer in IE:

Unhandled exception at line 561, column 13 in script block
0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'ErrorMessage': object is null or undefined

I've searched extensively for a solution to this issue with no luck... someone from the Telerik team please help!

I've also put my code snippets below:

this is coming from the ReportViewer javascript code, where it makes the function call and contentWindow is null:
ReportViewer.prototype.GetError = function ()
{
var paramsArea = document.getElementById(this.paramsFrameID);
var msg = "";
if (paramsArea){ msg = paramsArea.contentWindow.ErrorMessage; }
if (!msg) { var reportFrame = document.getElementById(this.reportFrameID);
if (reportFrame) { msg = reportFrame.contentWindow.ErrorMessage; }
return this.LocalizeMessage(msg);
}

Here is the code for my ReportViewer.aspx:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Register Assembly=
"Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<%@ Register Assembly=
"Telerik.Reporting, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.Reporting" TagPrefix="telerik" %><br><%@ Import Namespace="System.Web.Mvc" %>
<%@ Import Namespace=
"System.Data" %>
<head runat=
"server">
   <title></title>
</head>  

<form id=
"main" runat="server" method="post" action="#">
   <telerik:ReportViewer ID=
"ReportViewer1" runat="server" style="width: 790px; height: 800px;" >
   </telerik:ReportViewer>
</form>
<script runat="server">
 public override void VerifyRenderingInServerForm(Control control)
 {
   //base.VerifyRenderingInServerForm(control);
   // to avoid the server form (<form id="Form2" runat="server">) requirement
 }

 protected override void OnLoad(EventArgs e)
 {
    base.OnLoad(e);
    ReportViewer1.ReportSource = new QuoteRpt();
    var name = "QuoteReport"
    ReportViewer1.ReportSource.Parameters.Add(new Telerik.Reporting.Parameter("QuoteId", ViewBag.QuoteID));
 }
</script>

Ranjit
Top achievements
Rank 1
 answered on 26 Oct 2012
4 answers
298 views
Is it possible to export only the data, for example if i have a table set in the report as following

Column1 Column2 Column3
xxx1 xxx2 xxx3
yyy1 yyy2 yyy3
zzz1 zzz2 zzz4

i would like to have the following csv :
Column1,Column2,Column3
xxx1,xxx2,xxx3
yyy1,yyy2,yyy3
zzz1,zzz2,zzz4

for the moment i have some textbox string that appear in the csv and i do not know how to get rid of them.

thanks for your help
sebastien
Elian
Telerik team
 answered on 26 Oct 2012
1 answer
165 views
Hi,

I've recently upgraded to the Q3 2012 Reporting controls.  I've found that Telerik.ReportViewer.Silverlight.dll no longer contains "FormatedNumberConverter."  I'm referencing the assembly as follows.

xmlns:Telerik_ReportViewer_Silverlight="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"

This is how my static resource is defined:

<Telerik_ReportViewer_Silverlight:FormatedNumberConverter x:Key="FormatedNumberConverter"/>

And this is how it's being used:

<TextBlock Margin="2, 0, 10, 0"
TextAlignment="Center"
Text="{Binding PageCount, ConverterParameter=of \{0\} pages, Converter={StaticResource FormatedNumberConverter}}"
VerticalAlignment="Center">

Is there a new way to handle this?



Thanks,
- Aaron
IvanY
Telerik team
 answered on 26 Oct 2012
4 answers
421 views
I have a skeleton ASP.NET application with the following:

1) One Telerik report with nothing in it. In the default constructor for this report I added a "Debug.WriteLine" statement so I can see when the constructor is called.

2)  One ASPX page, which contains a ReportViewer control in it. In the Page_Load event I create an instance of the report, then set it to the Report property of the ReportViewer.

When ASP.NET Session is set to InProc, all works fine, I look at the Debug window and the constructor is called once. However, when I set the ASP.NET Session to StateServer, I notice the constructor is called three times. Considering I'm planning on putting a few Chart controls in this report and calling a few SQL Server sprocs, this worries me.

Any ideas why using ASP.NET Session = StateServer, the reporting engine would create the report object three times? FYI, this is the Q1 2012 release of Telerik Reporting.

Thanks.
Elian
Telerik team
 answered on 26 Oct 2012
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?