Telerik Forums
Reporting Forum
1 answer
464 views
I am currently designing a reference implementation for the incorporation of Telerik Reporting into both our Desktop and Web clients.

The design goals for us are:
Provide design time support for both the Visual Studio Designer and the StandAlone Designer, including working sample data.
Allow the runtime application to retrieve the data async from our Rest based backend.
Only use Business Objects types for the design time experience.


So i started out creating a sample Datasource that has a constructor without parameters and constructor with parameters. The thought process was that the default constructor would pump out static data to enable design time support and the version with the constructor would use the version with parameters which i could inject during runtime to support async loading before the datasource is created.

The first report I created is a simple table report listing firstname and lastname. Design time support is working as expected within visual studio so the next step was to add a reportviewer to a wpf application and start injecting real data.

At first glance everything seemed to be working fine the correct methods get called by report and report is rendering ok, what is not ok is that the reportviewer actually re-initiliazes the datasource therefore going back to the original version with static data after i've bound it to an actual reportviewer. Behauviour is that i get one call to the correct datasource, and after that one the object is recreated and goes to static data.

I assume this is due an error on my part. Please look at the code where i initialize the reportviewer.

List<TestPerson> TestPersons = new List<TestPerson>();
TestPersons.Add(new TestPerson
{
FirstName = "Mikey",
LastName = "Mouse"
});


var typeReportSource = new Telerik.Reporting.TypeReportSource();
typeReportSource.TypeName = "ReportLibrary.Report1, Reportlibrary";
Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource();
objectDataSource.DataSource = new SampleDatasource.tempdatasource(TestPersons);
objectDataSource.DataMember = "GetData"; // Specifying the name of the data object method

Telerik.Reporting.Report report = new ReportLibrary1.Report1();
report.DataSource = objectDataSource;
Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
reportSource.ReportDocument = report;
ReportViewer.ReportSource = reportSource;



ReportViewer.RefreshReport();
ReportViewer.RefreshData();


Or look at the complete attached solution.
Bernard
Top achievements
Rank 1
 answered on 26 Mar 2015
1 answer
124 views
I have created two graph charts first a bar chart and the second a pie chart, the pie chart displays the values for the series, is there an option so I can display the values on the bar chart for each bar? I have attached two images, current.png with what we have now and desired.png with what we wish to have.
Teodor
Top achievements
Rank 1
 answered on 26 Mar 2015
1 answer
154 views
Using the latest version of Telerik Reporting (Q1/2015) I tried to create a ReportViewer according to the example "Using Telerik Reporting in Applications - WPF Application - Manual Setup" and set the ReportSource declaratively. However there seems to be no ReportSource property in ReportViewer, at least none that I can use in XAML. I added all necessary assemblies and themes, I can see the ReportViewer in design mode, but can't set this property. What am I doing wrong?

Regards
Neils
Nasko
Telerik team
 answered on 26 Mar 2015
2 answers
92 views
Please refer the attachments..

I need to print "from date" and "to date" if the date range contains null values. Currently its not printing If I pass a date range with null values. How can I fix this issue.(Image : "Without_Data")
Nasko
Telerik team
 answered on 26 Mar 2015
1 answer
177 views
Hi,

I am using        
 this.chkComplianceStatus.Text = "{Fields.COMPLIANCE_STATUS_CODE} - {Fields.COMPLIANCE_STATUS_DESC}";     
this.chkComplianceStatus.Value = "= IIf(Fields.RANK_NUM = Parameters.al_rank_num.Value,True,False)";
for the checkbox to be checked.But the checkbox is not getting checked, the above expression is always returning false

FalseValue = "= False";
TrueValue = "= True";
Fields.RANK_NUM is of type Number
Parameters.al_rank_num is of type integer

I also tried this.chkComplianceStatus.Value = "= IIf(Fields.RANK_NUM.ToString() = Parameters.al_rank_num.Value.ToString(),True,False" +
    ")"; to make sure bothe types are same so that it will return true, still this is returning false. Can i convert integer type to string this way in the expression itself?

I don't know where i am going wrong.Please let me know

Thanks in advance
Gopinath




Nasko
Telerik team
 answered on 25 Mar 2015
1 answer
333 views
Is there a way to set the line spacing in textboxes ??? If so please give me the path.... I cant find it..
Stef
Telerik team
 answered on 25 Mar 2015
1 answer
120 views
I have created a report using temporary database and its working properly. Now I want to move it to the original database which is having the same columns as in the temporary database. So when I do it I need to configure the data source again if I want to add multiple reports. Is there a way to automatically do this data source configuration process if I configure data source of one report correctly.
Stef
Telerik team
 answered on 25 Mar 2015
2 answers
239 views
I designed a report in 2014 Q1. When I export is to excel huge number of empty rows are generated. Report contains Page Header Section1 and Details section1. Currently detail section is empty.Please refer my screen shots. How to solve this problem.
Stef
Telerik team
 answered on 25 Mar 2015
1 answer
120 views
I am dynamically reading parameters for my reports from either a posted web form or a querystring, and as such they're all strings. Currently I loop through the parameters in my report, and match up the supplied parameter names to do an assignment like this:

      foreach (ReportParameter parameter in MyReportSource.ReportDocument.ReportParameters) {
        switch (parameter.Type) {
          case ReportParameterType.Boolean:
            parameter.Value = Convert.ToBoolean(Parameters[parameter.Name]);
          break;
          case ReportParameterType.DateTime:
            parameter.Value = Convert.ToDateTime(Parameters[parameter.Name]);
          break;
          case ReportParameterType.Float:
            parameter.Value = Convert.ToDouble(Parameters[parameter.Name]);
          break;
          case ReportParameterType.Integer:
            parameter.Value = Convert.ToInt64(Parameters[parameter.Name]);
          break;
          default:
            parameter.Value = Parameters[parameter.Name];
          break;
        }
      }

is there a better way to do this? If at some point Telerik adds a new parameter type, I have to go in and change this code (which I'd like to prevent). Can I just use:

      parameter.Value = Parameters[parameter.Name];

does Telerik take the Value and internally covert it? or would just passing along all the Strings potential cause me issues later with things like validation and default values? 





Hinata
Top achievements
Rank 1
 answered on 25 Mar 2015
3 answers
168 views
Hi! After looking in the documentation, I did not find how to make interactives parameters
in the Report Designer. Let’s say I create a report about services and I want a
list of services. The client will find the report in Report server (no code)
and will select the service or the services who interest him. How can I do
that?

 
Thanks for your help

Richard
Richard
Top achievements
Rank 1
 answered on 25 Mar 2015
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?