Thanks,
Kevin
11 Answers, 1 is accepted
The report definition can contain only reporting items, and the ReportViewer control purpose is just to display that report document and provide means to interact with it. You can place a separate ReportViewer in distinct tabs or display multiple reports at once gathered in a ReportBook. An example of ReportBook can be found in the online demos and the local demos, placed by default under C:\Program Files (x86)\Telerik\Reporting <VERSION>\Examples.
Let us know if you have any further questions.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.
I looked over ReportBook example and I want to use Telerik Designer(.trdx) reports. Is it possible? If so how can i implement it ?
i tried my chance like that but it didn't worked :)
this
.Reports.Add(
new
UriReportSource() { Uri = @
"C:\Users\mustafa\Documents\Visual Studio 2012\Projects\OnlineKursKayit\OnlineKursKayit\ReportBook\ReportBook.cs"
});
Thanks
Mustafa
Yes, you can use .trdx files with ReportBook. You should deserialize the .trdx files and add the report instances to ReportBook. For more information see the Serializing Report Definition in XML help article.
Regards,
Nasko
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.
Thanks for reply,
I couldn't manage to do that, would you please give an example code part or a sample project?
Regards,
Mustafa
The following sample code demonstrates how to combine trdx reports in a single ReportBook instance:
public
class
ReportBook : Telerik.Reporting.ReportBook
{
public
ReportBook()
{
Report report1 = DeserializeReport(@
"Report1.trdx"
);
this
.Reports.Add(report1);
Report report2 = DeserializeReport(@
"Report2.trdx"
);
this
.Reports.Add(report2);
}
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;
}
}
}
Regards,
Nasko
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.
I've tried your solution for days.I took "Format of the initialization string does not conform to specification starting at index 0" error . Finally I fixed it. But now; toggle document map button is not active. Instead of it, first report shown in first page, second report shown in second page
And also SubReport path normally "C:\Users\mustafa\Desktop\Reports(trdx)\SubReport.trdx" but in running time it give an error that
"An error has occurred while processing SubReport 'subReport1': 'C:\Program Files (x86)\IIS Express\SubReport.trdx' file can not found."
Have you an idea about these two problems?
Thanks,
Mustafa
Each report in the ReportBook starts on a new page. You can still use the Document Map feature by specifying the DocumentMap property for each report in the book.
About paths to sub reports, double-check if the URI of the UriReportSource is set to an absolute path. If not the path will be resolved based on the start application. You can edit paths at run-time as well, by obtaining the SubReport item and resetting its ReportSource e.g.:
Report report1 = DeserializeReport(@
"Report1.trdx"
);
var subreport = report1.Items.Find(
"subReport1"
,
true
)[0]
as
SubReport;
(subreport.ReportSource
as
UriReportSource).Uri = newUri;
this
.Reports.Add(report1);
Let us know if you have any further questions.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.
Thanks for subreport solution, it works very well.
But I don't know why, Toggle Document Map Button is inactive
http://i40.tinypic.com/7148ie.png (capture of the screen )
Thanks for subreport solution, it works very well.
But I don't know why, Toggle Document Map Button is inactive
http://i40.tinypic.com/7148ie.png (capture of the screen )
Regards,
Mustafa
Check if you have set each report's DocumentMap property to a string that will be displayed beside and used for navigation within the viewer.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.
Thanks for your answers. They all worked and you helped me a lot.