This is a migrated thread and some comments may be shown as answers.

Create report with title page

5 Answers 448 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
AnneArents
Top achievements
Rank 1
AnneArents asked on 06 Apr 2011, 11:06 AM
Hi,

I have a report, which works fine, and now I want to add a title page to it.
Basically the first page has to be completely different from the rest of the report.
No detail section, different datasource, etc.

Is this possible?

Thanks,
CJ

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 11 Apr 2011, 09:34 AM
Hello CJ Scholten,

You can use a Report Header section, which as explained in the Understanding Report Sections help article is printed just once, at the beginning of the report. To avoid the Page Header section from appearing on the first page, set its PrintOnFirstPage Property to false and if you want to make sure only the Report Header is printed on the first page, you can alter its PageBreak Property to After. In the Report Header section, you can use a separate Data Item such as SubReport or Table that would be bound to your different data source.
Another option is to use a Report Book and create a separate report that would act as "title page" as first report in the report book collection.

Greetings,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Elias
Top achievements
Rank 1
answered on 18 Mar 2014, 08:03 PM
Hi, related this topic. I have to create a reportbook. the control is missing in the toolbox, could you please explain to me how can I do that. I already have the separated reports. How can I merge it. I see in other forums that I have to add by code but I dont know where.
thanks 
Elias
0
Nasko
Telerik team
answered on 21 Mar 2014, 02:45 PM
Hello Elias,

The Report Book is not a report item and as such it doesn't have a corresponding Toolbox item. In order to use it you have to create a new report book object in your application, add reports to the object's report collection, and then display it in the Report Viewer.

You can gather multiple reports in a Report Book, which will be displayed and processed as a single document at once. The Report Book online documentation can be found here: Report Book help. There you can find general information on how to use a Report Book, what is its purpose and some specific things like paging and passing parameters. There is also a section describing how to use the Report Book at run-time. This is the part that can be useful when the component is used within your application.

In the following code snippet a Report Book is created and a report is assigned to it and this is done in the application. The developer has the option to modify the report definitions/data sources etc., before adding it to the Report Book:

Using a class containing the report definition:
ReportBook reportBook = new ReportBook();
    
Report report1 = new MyReport();
reportBook.Reports.Add(report1);

Using xml report definition (.trdx):
ReportBook reportBook = new ReportBook();
    
Report report1 = DeserializeReport("MyReport.trdx");
reportBook.Reports.Add(report1);
   
//where the DeserializeReport method's definition is:
public Report DeserializeReport(string path)
{
    System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
    settings.IgnoreWhitespace = true;
    
    using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(path, settings)) {
        Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
    
        return report;
    }
}

Then you can display the Report Book item by assigning it to a Report Viewer as you'd do with any normal report:
Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = reportBook;
this.ReportViewer1.ReportSource = instanceReportSource;

Additionally, you may find useful the Report Book demo located in the C:\Program Files (x86)\Telerik\Reporting Q1 2014\Examples\CSharp\ReportLibrary\ReportBook folder on your machine.

Regards,
Nasko
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Maltrak
Top achievements
Rank 1
answered on 02 Jul 2015, 03:59 PM
Hi, y have a report with PageNumber but no shows number, i-m using Q1 2014
0
Stef
Telerik team
answered on 03 Jul 2015, 11:02 AM
Hi Miguel,

Based on your update in the PageNumber, retrive value forum thread, I believe you have already resolved the issue.
For anyone having the same issue, please check the linked thread.


Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
AnneArents
Top achievements
Rank 1
Answers by
Steve
Telerik team
Elias
Top achievements
Rank 1
Nasko
Telerik team
Maltrak
Top achievements
Rank 1
Stef
Telerik team
Share this question
or