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

show report using winform

1 Answer 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 13 Jun 2013, 02:21 PM
i am using the following code: which returns error invalid uri unknown format.  What i want to do is when my print button is selected on my winform i want the report to show and be editable maintaining format that is passed to it.  Also need to know how to pass data to various textboxes on the reports.
<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>

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 18 Jun 2013, 10:34 AM
Hello William,

It is not very clear to us what your requirements nor setup are. Therefore we will need some additional information and it will be best if you are able to send us a runnable sample so that we are able to run it locally - this will help us identify the culprit faster and advise you more accordingly. Additionally please note that any detailed explanations regarding your requirements will be highly appreciated.

Regards,
IvanY
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
William
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or