Telerik Forums
Reporting Forum
2 answers
147 views
I have a class which I am attaching to my report using an ObjectDataSource.
In the designer I see that the type of the datasource is set to that of this class

this.objectDataSource1.DataSource = typeof(Acme.Reporting.TrainingRequirements.ListRowGenerator);

How do I get the actual object? The GetDataSource method is hidden by its access level.

 

 

 

Joe
Top achievements
Rank 1
 answered on 19 Dec 2012
3 answers
139 views
Hello, I am trying to use the reportViewer component in my asp.net application. Our requierments are as follows:

  • Need to use trdx files so our clients can create their own reports and upload them through our application.
  • Need to change the datasource to the trdx files at runtime to connect to the proper database based on user.
  • A couple of reports will require drillthrough capabilities and the drillthrough files will also require the datasource to be set at runtime.

I found a sample listed by Erwin in your forum (Change Connection String for Reports designed in the Standalone Designer) to change the connection string at runtime and it is working fine for displaying the reports, however I am wondering how I will be able to change it in the drillthrough report.

Any documentation on changing the connection string at runtime for the drillthrough report would be appreciated.

Regards,

Don Tompkins

Peter
Telerik team
 answered on 18 Dec 2012
1 answer
259 views
Hi
Ive done an invoice report in Silverlight. I want to print 3 copies of the invoice automatically when the user clicks print. Is there a way to do this?

cheers.
Stef
Telerik team
 answered on 18 Dec 2012
26 answers
2.4K+ views
Hi,

Have you experimented with ReportViewer on the ASP.NET MVC framework? I'd really like to leverage both in a project but can't seem to get the report viewer to work. I'm using a Report object as the model for the view and basically showing the ReportViewer as follows:

<asp:Content ContentPlaceHolderID="MainContent" runat="server"
    <form runat="server"
    <
        rvReport.Report = ViewData.Model; 
    %> 
    <telerik:ReportViewer ID="rvReport" runat="server" /> 
    </form> 
</asp:Content> 
The attempt results in an error message:

Report is unavailable or session has expired.

Please, refresh the page.

Igor
Top achievements
Rank 2
 answered on 18 Dec 2012
1 answer
59 views
How do I set the background of a straightforward linear shape to a RadialGradientBrush?
Steve
Telerik team
 answered on 18 Dec 2012
1 answer
160 views
Hi,

I'm trying to create a report which will create an addressbook of families. So the grouping is per family on alfabetical order, and I want to show each member of that family (parents and children) which their date of birth, and email if they have one. So far... these are all items which should be placed in the details section.
However, I do also have their address, street, postal,etc.. which is per family. I can place it in the grouping header or footer, but as there enough space left on the rows, I would like to post in that area. That's also what they are used te be in the old system, which was an excel export and converted to pdf via word.

This would result in a report like this, but I can't find any way to do this, except placing the addresssection in the footer, which would enlarge the whole report. And as it will be printed will cost a lot more paper
Mr. A. Family      10-10-1970                            Streetname 1A
Mrs. B. Family     05-05-1971                            Postalcode
Child 1            11-11-2000                            Place
Child 2            12-12-2005                            House phonenumber
Child 3            10-10-2008
 
 
Mr. X. Family2      10-10-1970                            Streetname 1A
Mrs. Y. Family2     05-05-1971                            Postalcode
Child 1             11-11-2000                            Place
Child 2             12-12-2005                            House phonenumber
Child 3             10-10-2008

Is this possible to render? And if so... how can I make it look like this?

Thanks in advance
Stef
Telerik team
 answered on 18 Dec 2012
2 answers
103 views
Hello, everybody!

Can anyone help me make the dropdown in report parameters show an empty text.
It always automatically writes "(empty)" instead of an empty text (I only want an empty line without any words).
I will really appreciate if anyone can help.
Maks
Top achievements
Rank 1
 answered on 18 Dec 2012
2 answers
91 views
I have created several reports.
But all of them have the same parameters.
Can I have a single common parameter area for all of them and change reportsource of a reportview on the fly?
Maks
Top achievements
Rank 1
 answered on 18 Dec 2012
16 answers
547 views
I'm just trying to upgrade/update  the Telerik reporting and silverlight controls from Q3 2011 to Q1 2012.
We are still using Silverlight 4.
Is this possible?
It seems that an update is not possible without also upgrading to SL5?
Is this correct?
Regards
Dirk
Steve
Telerik team
 answered on 17 Dec 2012
4 answers
232 views
Hi,

I set up a Telerik Reporting WCF Service, a silverlight client to show the report, created a report, succesfully added the WCF report service reference to the client, and verified that it is called. Everything works up to that part.

But how do I implement the methods of the IReportService interface? I can't find examples of what I'm supposed to do. Below is the code that I guessed so far from trial and error, but this gives a xaml error.

Is there an example of how to implement a WCF reporting service?
 
In specific the method: GetPage, what is the byte[]?The manual says "Gets or sets the Byte array that contains the current report page.", but is that in pdf format?

Regards,

Bayram

    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ReportService" in code, svc and config file together.
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class ReportService : IReportService
    {
        public void DoWork()
        {
        }
 
        private byte[] RenderToArray(string instanceID)
        {
            Telerik.Reporting.Processing.ReportProcessor reportProcessor =
                new Telerik.Reporting.Processing.ReportProcessor();
 
            //set any deviceInfo settings if necessary
            System.Collections.Hashtable deviceInfo =
                new System.Collections.Hashtable();
 
            Telerik.Reporting.InstanceReportSource instanceReportSource =
                new Telerik.Reporting.InstanceReportSource();
 
            instanceReportSource.ReportDocument = new PowerBrowser.Web.Modules.Reporting.ReportZakenDashboard();
 
            Telerik.Reporting.Processing.RenderingResult renderingResult =
                reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo);
 
            string fileName = renderingResult.DocumentName + "." + renderingResult.Extension;
            string path = System.IO.Path.GetTempPath();
            string filePath = System.IO.Path.Combine(path, fileName);
 
            byte[] result = new byte[renderingResult.DocumentBytes.Length];
            using (System.IO.MemoryStream fs = new System.IO.MemoryStream(result))
            {
                fs.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.Length);
            }
            return result;
        }
 
        public Telerik.Reporting.Service.PageInfo GetPage(string instanceID, int pageNumber)
        {
            PageInfo info = new PageInfo()
            {
                Buffer = RenderToArray(""),
                PageNumber = 1
            };
            return info;
        }
 
        public List<Parameter> GetReportParameters(string report, NameValueDictionary deviceInfo, NameValueDictionary parameters)
        {
            List<Parameter> reportParameters = new List<Parameter>();
            return reportParameters;
        }
 
        public IList<ReportInfo> ListAvailableReports()
        {
            ReportInfo info = new ReportInfo()
            {
                Description = "Mijn zaken",
                FullName = "Rapport - Mijn zaken",
                Name = "ReportZakenDashboard"
            };
            List<ReportInfo> reports = new List<ReportInfo>();
            reports.Add(info);
            return reports;
        }
 
        public IList<ExtensionInfo> ListRenderingExtensions()
        {
            List<ExtensionInfo> extensions = new List<ExtensionInfo>();
            ExtensionInfo info = new ExtensionInfo() { LocalizedName = "PDF", Name = "PDF" };
            extensions.Add(info);
            return extensions;
        }
 
        public RenderingResult Render(string format, string report, NameValueDictionary deviceInfo, NameValueDictionary parameters)
        {
            RenderingResult renderingResult = null;
            if (report == "ReportZakenDashboard")
            {
                renderingResult = new RenderingResult()
                {
                    DocumentBytes = new byte[] { },
                    DocumentName = "Test",
                    Extension = "PDF",
                };
            }
            return renderingResult;
        }
 
        public RenderingSessionInfo RenderAndCache(string format, string report, NameValueDictionary deviceInfo, NameValueDictionary parameters)
        {
            RenderingSessionInfo info = new RenderingSessionInfo()
            {
                PageCount = 1,
                DocumentName = "Mijn zaken",
                PageNumber = 1,
                Report = "ReportZakenDashboard"
            };
            return info;
        }
    }
Peter
Telerik team
 answered on 17 Dec 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?