hi
i created one report in my web application.
I have to show 12 fields in report so when i was show that filed the report is expanded.I cant show all the value sin report viewr
if i generate as pdf some fiedls missing
string
mimeType = string.Empty;
string ext = string.Empty;
Encoding encoding = Encoding.Default;
byte[] reportBytes = Telerik.Reporting.Processing.ReportProcessor.Render(
"PDF"
, reportToExport
,
null
,
out mimeType
,
out ext
,
out encoding);
string fileName = reportName + ".pdf";
Response.Clear();
Response.ContentType = mimeType;
Response.Cache.SetCacheability(
HttpCacheability.Private);
Response.Expires = -1;
Response.Buffer =
false;
Response.AddHeader(
"Content-Disposition",
string.Format("{0};FileName=\"{1}\"",
"attachment",
fileName));
Response.OutputStream.Write(reportBytes, 0, reportBytes.Length);
Response.End();
PDF is generated but Recodr is not coming fully
how to solv this prob
Regards
Abdul Ajees
| public partial class _Default : System.Web.UI.Page { | |
| protected void Page_Load(object sender, EventArgs e) { | |
| // ReportTemplate is an Empty Report without any controls. | |
| ReportTemplate Rep = new ReportTemplate(); | |
| for (int i = 0; i < 8; i++) { | |
| Telerik.Reporting.TextBox h = new Telerik.Reporting.TextBox(); | |
| h.Value = "Column" + i.ToString(); | |
| PageHeaderSection header = new PageHeaderSection(); | |
| Header.Controls.Add(h); | |
| } | |
| } | |
| } |
| public partial class MyReportViewer : Window |
| { |
| private IReportDocument myReport; |
| public MyReportViewer(IReportDocument document) |
| { |
| myReport = document; |
| InitializeComponent(); |
| } |
| private void WindowLoaded(object sender, RoutedEventArgs e) |
| { |
| System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost(); |
| ReportViewer rptViewer = new ReportViewer(); |
| rptViewer.Report = this.myReport; |
| rptViewer.RefreshReport(); |
| host.Child = rptViewer; |
| } |
| } |
| KeyFront keyfront = new KeyFront(zone.ZoneID); |
| MyReportViewer rptViewer = new MyReportViewer(keyfront); |
| rptViewer.Show(); |
Here's the report code:
| public KeyFront(int zonepk) |
| { |
| /// <summary> |
| /// Required for telerik Reporting designer support |
| /// </summary> |
| InitializeComponent(); |
| this.sqlDataAdapter1.SelectCommand.Parameters["@ZonePK"].Value = zonepk; |
| this.DataSource = this.sqlDataAdapter1; |
| // |
| // TODO: Add any constructor code after InitializeComponent call |
| // |
| } |
The report viewer window does appear but is blank. What am I missing?
Thanks,
-Sid Meyers.
SqlConnection connSomsys = new SqlConnection(@"Server=cmdivst004\Jason08;Integrated Security=true;Database=QuoteDB");
SqlCommand selectChartinfo;
selectChartinfo =
new SqlCommand("sprocgetinternationalsales", connSomsys);
selectChartinfo.CommandType =
CommandType.StoredProcedure;
selectChartinfo.Parameters.AddWithValue(
"@year", 2008);
SqlDataAdapter adapter6 = new SqlDataAdapter(selectChartinfo);
DataSet dataSet6 = new DataSet();
adapter6.Fill(dataSet6);
this.chart1.datasource = dataSet6;