<FONT size="2" face="Consolas"><FONT size="2" face="Consolas"><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"><P>Telerik.Reporting.</P><P></FONT> </P><P></P><P></FONT> </P><P><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2"face="Consolas">UriReportSource</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> Telrpt = </FONT></FONT><FONT color="#0000ff" size="2"face="Consolas"><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff"size="2" face="Consolas">new</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"> Telerik.Reporting.</FONT></FONT><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af"size="2" face="Consolas">UriReportSource</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas">();</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> Telerik.Reporting.</P><P></FONT> </P><P></P><P></FONT> </P><P><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2"face="Consolas">UriReportSource</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> Telrpt2 = </FONT></FONT><FONT color="#0000ff" size="2"face="Consolas"><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff"size="2" face="Consolas">new</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"> Telerik.Reporting.</FONT></FONT><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af"size="2" face="Consolas">UriReportSource</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas">();</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> Telrpt.Uri = </P><P></FONT> </P><P></P><P></FONT> </P><P><FONT color="#a31515" size="2" face="Consolas"><FONT color="#a31515" size="2"face="Consolas"><FONT color="#a31515" size="2"face="Consolas">"TelRptContractTest.trdx"</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas">;<BR><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"></P><P>System.Drawing.Printing.</P><P></FONT></P><P></P><P></FONT></P><P><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2"face="Consolas">PrinterSettings</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> printerSettings = </FONT></FONT><FONT color="#0000ff"size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas">new</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"> System.Drawing.Printing.</FONT></FONT><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas">PrinterSettings</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas">();</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> System.Drawing.Printing.</P><P></FONT></P><P></P><P></FONT></P><P><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2"face="Consolas">PrintController</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> standardPrintController = </FONT></FONT><FONT color="#0000ff"size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas">new</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"> System.Drawing.Printing.</FONT></FONT><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas">StandardPrintController</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas">();</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> Telerik.Reporting.Processing.</P><P></FONT></P><P></P><P></FONT></P><P><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2"face="Consolas">ReportProcessor</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> reportProcessor = </FONT></FONT><FONT color="#0000ff"size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas">new</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"> Telerik.Reporting.Processing.</FONT></FONT><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas">ReportProcessor</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas">();</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> Telrpt.Parameters.Add(</P><P></FONT></P><P></P><P></FONT></P><P><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2"face="Consolas"><FONT color="#0000ff" size="2"face="Consolas">new</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> Telerik.Reporting.</FONT></FONT><FONT color="#2b91af"size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2" face="Consolas">Parameter</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas">(</FONT></FONT><FONT color="#a31515" size="2" face="Consolas"><FONT color="#a31515" size="2" face="Consolas"><FONT color="#a31515" size="2" face="Consolas">"txtLocation"</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas">, Location));</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> Telerik.Reporting.</P><P></FONT></P><P></P><P></FONT></P><P><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2"face="Consolas">InstanceReportSource</FONT></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> instanceReportSource = </FONT></FONT><FONT color="#0000ff"size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2" face="Consolas">new</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas"> Telerik.Reporting.</FONT></FONT><FONT color="#2b91af" size="2"face="Consolas"><FONT color="#2b91af" size="2" face="Consolas"><FONT color="#2b91af"size="2" face="Consolas">InstanceReportSource</FONT></FONT></FONT><FONT size="2"face="Consolas"><FONT size="2" face="Consolas">();</FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"> </P><P> </P><P> </P><P> reportProcessor.PrintController = standardPrintController;</P><P> </P><P> reportProcessor.PrintReport(Telrpt, printerSettings); </P><P></FONT></FONT></FONT></FONT></P><P><FONT size="2" face="Consolas"><FONT size="2"face="Consolas"></FONT></FONT></FONT></FONT> </P><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"></FONT></FONT><FONT size="2" face="Consolas"><FONT size="2" face="Consolas"></FONT></FONT><BR>
pdfReport.Options.DisplayMode = DataDynamics.ActiveReports.Export.Pdf.DisplayMode.FullScreen;Does telerik reporting have a similar option? I can not seem to locate it . So far I have tried the following:
Telerik.Reporting.Report Telrpt = new TelRptContract(); Telerik.Reporting.Processing.ReportProcessor TelContractrp = new Telerik.Reporting.Processing.ReportProcessor(); System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable(); Telerik.Reporting.InstanceReportSource TelContractirs = new Telerik.Reporting.InstanceReportSource(); TelContractirs.ReportDocument = Telrpt; Telerik.Reporting.Processing.RenderingResult result = TelContractrp.RenderReport("PDF", TelContractirs, deviceInfo); string dContract = DateTime.Now.ToString().Replace("/", ""); dContract = dContract.Substring(0, 9); string fileName2 = result.DocumentName + "_" + dContract + "." + result.Extension; //string path2 = "c:\\Users\\akinw\\Desktop\\"; //string path2 = System.IO.Path.GetTempPath(); string path2 = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string filePath2 = System.IO.Path.Combine(path2, fileName2); FileStream fs = new FileStream(filePath2, FileMode.Create); fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length); fs.Close(); //fs = File.Open(filePath2, FileMode.Open); System.IO.File.Open(filePath2, FileMode.Open);I want to declare a telrik report and then start passing data to it for display. In the following code it is seen that my activereports- which reside in another project) are seen. but when i do similar code for telrik report it can not find the report and the telrik report resides in the same project that the activereports are. What is the solution. When I add Telrpt.Uri = "name of report"; at debug an error occurs stateing it can not find the uri.
So this is two pronged 1. How can I do similar with telerik (Telerik.Reporting.Report = new TelRptContractTest(); as is done with activereport (DataDynamics.ActiveReports.ActiveReport rpt = new RptCustomerContract();)
2. How can i pass data to telrik report in similar way as [((RptCustomerContract)rpt).MinContractYear = cheader.DeliveryBeginDate.Value.Year;]
The telrik reports have been added to the project and Telerik.Reporting is in the reference file of the application.
DataDynamics.ActiveReports.ActiveReport rpt = new RptCustomerContract();DataDynamics.ActiveReports.ActiveReport rpt2 = new RptCustomerContractLocationDetail();Telerik.Reporting.UriReportSource Telrpt = new Telerik.Reporting.UriReportSource();((RptCustomerContract)rpt).MinContractYear = cheader.DeliveryBeginDate.Value.Year;
Telerik.Reporting.Report Telrpt = new TelRptContract(); Telerik.Reporting.Processing.ReportProcessor TelContractrp = new Telerik.Reporting.Processing.ReportProcessor(); System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable(); Telerik.Reporting.InstanceReportSource TelContractirs = new Telerik.Reporting.InstanceReportSource(); TelContractirs.ReportDocument = Telrpt; Telerik.Reporting.Processing.RenderingResult result = TelContractrp.RenderReport("PDF", TelContractirs, deviceInfo); string fileName2 = result.DocumentName + "." + result.Extension; //string path2 = "c:\\Users\\akinw\\Desktop\\"; //string path2 = System.IO.Path.GetTempPath(); string path2 = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string filePath2 = System.IO.Path.Combine(path2, fileName2); FileStream fs = new FileStream(filePath2, FileMode.Create); fs.Close(); //fs = File.Open(filePath2, FileMode.Open); System.IO.File.Open(filePath2, FileMode.Open); Hi,
I have a masterPageA and a contentPageB
on the master page i have
<script type="text/javascript">
function noBack() {
window.history.forward();
}
</script>
<body onload="noBack();" onprerender="if (event.persisted) noBack();" onunload="">
The content page is of the structure
<asp:MultiView
<asp:View
<asp:Button Button1
<asp:Button Button2
<asp:Table
<telerik:ReportViewer
</asp:View
When the button1 or button2 is clicked the table and the reportviewer update to show the
correct report. The reportviewer reports have only graph. The table shows the data.
User action.
1) Home page
2) load the content page (default view is report A which corresponds to button 1)
3) clicks on button2
4) clicks on browser back button...
What Happens,
It gets back to the reportA but only the table has data in the report viewer
I get an error message