Telerik Forums
Reporting Forum
5 answers
582 views
I'm using Q2 2012 of Telerik reporting. I need to use the NeedDataSource event to populate my subreports. My subreports are populated by objects that inherit Reporting.Report. When I run the report, I get this error

An error has occurred while processsing Report 'Group' (my object)
An error has occurred while resolving  '' data source: Object reference not set to an instance of an object.

this is my needDataSource
protected void needDataSource(object sender, EventArgs e)
            {
                Telerik.Reporting.Processing.ReportItemBase subreport = sender as Telerik.Reporting.Processing.ReportItemBase;
                if (this.DataSource != null)
                {
                    ods = new ObjectDataSource();
                    ods.DataSource = this.DataSource;
                    ods.DataMember = groupid;
                    ods.Parameters.Add(new ObjectDataSourceParameter(groupid));
                    subreport.Report.DataSource = ods;
                }              
            }

Thanks in advance!
Gersh
Stef
Telerik team
 answered on 05 Jun 2017
3 answers
1.1K+ views

Greetings!  

I need help with receiving parameters from a report. The following code allows me to alter the DataSource of such Report, however I still need to intercept and alter the parameters used on that report.

 

01.public Telerik.Reporting.ReportSource Resolve(string report)
02.    {
03.        ReportSource reportInstance;
04.         
05.        //retrieve an instance of the report
06.        var connectionString = "Data Source=OurServer;Initial Catalog=OurDataBase;User ID=xxxxxxxx;xxxxxxx;";
07.        ReportConnectionStringManager csm = new ReportConnectionStringManager(connectionString);
08. 
09.        var appPath = HttpContext.Current.Server.MapPath("~/");
10.        var reportsPath = Path.Combine(appPath, "Reports");
11.        var uri = Path.Combine(reportsPath, report);
12. 
13.        var sourceReportSource = new UriReportSource() { Uri = uri };
14. 
15.        reportInstance = csm.UpdateReportSource(sourceReportSource);
16. 
17.        return reportInstance;
18.    }

Is it possible to receive and modify parameters from the report call utilizing HttpContext.Current ?  Or is there a Telerik Class/Method that allows me to do so?

Thanks in advance! Best Regards. 

Stef
Telerik team
 answered on 05 Jun 2017
3 answers
157 views
An have an MVC app with a report viewer control that displays a report. The report has links in it that navigate to another report. The parameters are the same for both reports with the exception of one additional parameter for the drillthrough. I am programatically passing the parameters to the parent report from my MVC app. I want the user to be able to modify the parameter selection and refresh the drillthough report without having to go back to the parent report. Is this possible? 
Stef
Telerik team
 answered on 05 Jun 2017
1 answer
67 views

I'm developing a WPF application, using Visual Studio 2017 Community and SQL Server 2.016. The version of the report generator is R2 2017 11.1.17.503

The strange thing is that the data appears when the DataSource is configured. However, when you run Preview, the detail line data is invisible.

My stored procedure uses a temporary table and creates the SQL command dynamically.

Could someone please help?

Katia
Telerik team
 answered on 05 Jun 2017
1 answer
493 views
I can't seem drag and drop the columns. Are there other alternatives to reordering existing columns at design-time?
Stef
Telerik team
 answered on 02 Jun 2017
2 answers
690 views
Hi,

In the footer part of my report page, I want to show print date and time the format of the datetime will be YYYY-MM-DD HH:mm PM, I will to regulate the format using the Format property in the property window.  I just can not figure out how to show AM or PM accordingly.  Can you give me the format mask, or could you give me a list of format mask I can use for future reference?

Thanks,

enrique
Top achievements
Rank 1
 answered on 01 Jun 2017
2 answers
206 views

Hello!  I have installed the Angular 4 component.  My Angular project is up and running, but the component is acting funny.  It isn't even TRYING to connect to the report server before throwing the classic "Error loading the report viewer's templates. " error.  I've seen all the FAQ stuff about making sure that the reporting api is running, and it definitely is.  The weird thing is that the component doesn't even try to connect.  I'm monitoring the requests in the browser, and nothing ever goes toward the reporting api at all.

 

I'd love to be able to use this component, but I'm having trouble even getting off the ground with it.

Yes, I have Angular 4 and jQuery 3.2.1.  I installed the component off NPM.

Thanks for any help you can provide!

 - Chris

Chris
Top achievements
Rank 1
 answered on 31 May 2017
1 answer
239 views
I just started my trial period and am still trying to figure things out.

I have an ASP.NET MVC website. I added a Terlerik Report Library project to my solution. In it, I created a report using Visual Studio Report Designer. The report uses an ObjectDataSource which points to a function in a custom DLL in my solution. When I run my website and go to the 
report viewer page I get the error:

The assembly "MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" is not permitted to be used by an ObjectDataSource component. Please include it in an AssemblyReferences element in the Telerik.Reporting configuration section of your application configuration file


I have tried copying this from the report library's app.config to my website's web.config
   <Telerik.Reporting>
        <Cache provider="" />
        <cache provider="" />
        <assemblyReferences>
            <add name="MyLib" version="1.0.0.0" />
        </assemblyReferences>
        <SessionState provider="" />
        <restReportService>
            <storage provider="" />
            <reportResolver provider="" />
        </restReportService>
    </Telerik.Reporting>
but this causes my website to have a config error: "The configuration section 'Telerik.Reporting' cannot be read because it is missing a section declaration"

I have also found this forum post
http://www.telerik.com/forums/the-assembly-xxx-is-not-permitted-to-be-used-in-an-objectdatasource

but I don't understand things well enough yet to know what I'm supposed to do with a custom resolver.
Stef
Telerik team
 answered on 31 May 2017
1 answer
131 views

Hello, 

 

I have a Polar graph with some data points, I have formatting rules for these data points so they change colors based on some data. Howevever, when the points are on the northern axis and in this middle circle they have the correct color but the axis looks like its being rendered ON TOP of the point. How do i fix this? 

 

 

Ivan Hristov
Telerik team
 answered on 31 May 2017
1 answer
151 views
The map wizard should have the ability to configure the zoom size, example with a pointmapseries shows the entire map and that is not useful to show it in report. It should allow you to zoom level, whether continent, city or street.
Yana
Telerik team
 answered on 30 May 2017
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?