Telerik Forums
Reporting Forum
9 answers
476 views

Hi Telerik,
 
I've upgraded Q1-2012 from Q3-2011.
We prepare the program tested on the Web, ReportViewer gives an error message.
ReportViewer program is working as a local mode.

We have made many report dll installation.
But ReportViewer program does not work on the Web.
How we can solve.

I'm sending Web.config and error message.

Regards,
Mehmet

Hrisi
Telerik team
 answered on 02 May 2012
1 answer
140 views
Is there a way to enumerate the items; i.e. textboxes, contained in a section of the report, say the LabelsGroupFooter, or a panel contained in a report section?

Thanks

I think I've stumbled upon a means to do this, probably a better way, but the following works:
IEnumerator itemEnumerator = this.pnlTotals.Items.GetEnumerator();
  
while (itemEnumerator.MoveNext())
{
  if (itemEnumerator.Current.GetType() == typeof(Telerik.Reporting.TextBox))
  {
    Telerik.Reporting.TextBox textBox = (Telerik.Reporting.TextBox)itemEnumerator.Current;
  
    // value contains an expression, vs. literal text?
    if (textBox.Value.StartsWith("="))
      textBox.Value = "0";
  }
}

"pnlTotals" is a panel control which sits in the labelsGroupFooter. It has the textboxes which contain the totals from each column of the report. The purpose of this "excercise" is to flush out column totals if there's no data in the report datasource. This is done in the report NeedDataSource event handler.

  // bind the data table to the .DataSource property of the report
 (sender as Telerik.Reporting.Processing.Report).DataSource = this.dtSource;
 // if the query didn't return any rows, hide the groups and the detail section        
 if (this.dtSource.Rows.Count == 0)
 {
   this.gL_ACCT_CODEGroup.Visible = false;
   this.dEPT_CODE_NAMEGroup.Visible = false;
   this.detail.Visible = false;
   IEnumerator itemEnumerator = this.pnlTotals.Items.GetEnumerator();
   while (itemEnumerator.MoveNext())
   {
     if (itemEnumerator.Current.GetType() == typeof(Telerik.Reporting.TextBox))
     {
       Telerik.Reporting.TextBox textBox = (Telerik.Reporting.TextBox)itemEnumerator.Current;
       // value contains an expression, vs. literal text?
       if (textBox.Value.StartsWith("="))
         textBox.Value = "0";
     }
   }
 }



Patrick
Top achievements
Rank 1
 answered on 01 May 2012
9 answers
718 views

I have Telerik Report that have about 700 images on it. When I generate the pdf, I get the following error message:

Here is the code that I uses.

Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", tk, null);

FileStream fs = new FileStream("d:\\report1.pdf", FileMode.Create);
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
fs.Flush();
fs.Close();

However, when I display that in the report viewer on the screen, there is no error. Any idea on how to fix this? I have plenty of diskspace in c:/d: drives.

Thanks.

 

 

System.OutOfMemoryException was unhandled by user code
  Message=Exception of type 'System.OutOfMemoryException' was thrown.
  Source=mscorlib
  StackTrace:
       at System.IO.MemoryStream.set_Capacity(Int32 value)
       at System.IO.MemoryStream.EnsureCapacity(Int32 value)
       at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at Telerik.Reporting.Pdf.IO.PdfWriter.Write(Byte[] bytes)
       at Telerik.Reporting.Pdf.IO.PdfWriter.WriteStream(PdfDictionary value)
       at Telerik.Reporting.Pdf.PdfDictionary.WriteDictionaryStream(PdfWriter writer)
       at Telerik.Reporting.Pdf.PdfDictionary.WriteObject(PdfWriter writer)
       at Telerik.Reporting.Pdf.PdfDocument.Save(Stream stream)
       at Telerik.Reporting.ImageRendering.DocumentPdf.EndDocument()
       at Telerik.Reporting.Writing.DocumentWriter.Telerik.Reporting.Writing.IWriter.WriteEndDocument()
       at Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.EndDocument(Boolean output)
       at Telerik.Reporting.Paging.PagerBase.AddEndDocument(Boolean output)
       at Telerik.Reporting.Paging.PageComposition.PageOverride()
       at Telerik.Reporting.Paging.PagerBase.Page(IPageHandler handler, Report report)
       at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingInfo, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
       at Telerik.Reporting.Processing.ReportProcessor.Render(IList`1 reports, ExtensionInfo extensionInfo, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback)
       at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback)
       at Telerik.Reporting.Processing.ReportProcessor.RenderReportStateless(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback)
       at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo)
       at _ViewReport.rdbGo_Click(Object sender, EventArgs e) in d:\SVN\ROVCatalog\Web\ViewReport.aspx.cs:line 89
       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException:

Chavdar
Telerik team
 answered on 01 May 2012
2 answers
193 views
We have a Zebra TLP3842 printer with 300DPI for bar coding. The requirement is to print small bar code labels to stick on things like motherboards. The data printed in the bar code is 22 characters long, i.e. 99X99X9999XXXX9999X9999. With the Zebra printer we can print at .25 in high and 1.75 in wide and the scanner can read this. We cannot get this precision with the Telerik bar codes. The smallest we can get it is 3in wide. This will not fit in the limited space on a mother board. The Zebra software goes to the dot level where Telerik goes to the pt level. Is there a way to improve the Telerik bar codes when using very small dimensions?
Joel Kraft
Top achievements
Rank 2
 answered on 30 Apr 2012
2 answers
104 views
Hi friends

How can I sum up a column values of a table created using the table wizard?

I need to show it at the end of the column .

Thank you
akpaga akpaga
Top achievements
Rank 1
 answered on 30 Apr 2012
1 answer
92 views
We need find support in Colombia, or someone that help us in our proyect. 
Do you recommend someone?
Please is Urgent!!! 
Patrick
Top achievements
Rank 1
 answered on 30 Apr 2012
1 answer
226 views
Hi,
        I'm Samy Currently Working on Telerik Reporting. I'm serializing the Report to a XML and saving to the Database. and deserializing the XML and Show the Report.

        Now I need is In Detailed Section I'm having two Sub Reports and a text box. I have to assign the Footer of the Sub report value to the Textbox in the Main report. how to do this? Please Provide with Sample Code.


      also Can you please guide me How to add water marking in telerik 2011 Q2.

                    Thanks in advance.


Regards,
K.K.Samy
Chavdar
Telerik team
 answered on 30 Apr 2012
8 answers
379 views
I am trying to make a user-friendly message that says "No Results" if the datasource comes back empty. The only problem is that the NeedDatasource event handler even when it is in the ASPX code behind does not allow for any changes to the web page once it fires. The page rendering must happen before that event. Does any one have any suggestions how to implement this "No Results" feature. I don't know why Telerik Reports wouldn't have an EmptyTemplate sort of thing.
Pavan
Top achievements
Rank 1
 answered on 29 Apr 2012
2 answers
61 views
I couldn't check that switching of parameter will create 1016 requests. Now of it it was convinced. I asked myself a question: why loading of lists occurs so long. Why the sqlDataSourceAddresses requests data so many time?
For my case only once suffices, because parameters:
@adrType, @proTypeOwner, @proConId, @proDepId, @proDate, @userId
 don't change.

Thanks.
ADM-IT Denis Pujdak
Top achievements
Rank 1
 answered on 27 Apr 2012
1 answer
109 views
We are showing pdf by pushing pdfbytes array. 
We can able to view Bookmarks section by clicking on Bookmars icon manually as shown in below figure.
But My requirement is to display Bookmarks section in PDF by default. Please Help how to display that section dynamically.

We have used the below code:

<iframe id="ifPDF" src='@Url.Action("GetHtmlReport", "StandardReports")'  class="resultPDF">

 public ActionResult GetHtmlReport()
        {
            byte[] result = null;
            string mimeType = "application/pdf";
            result = popstreatmernt;
            return File(result, mimeType);
        }

 private void GetReportInfo(StandardReportsListViewModel stdReportsFilters)
        {
            try
            {
                RequistionParameters ReqParams = new RequistionParameters();
                RequisitionCheckListbase ReqchkParams = new RequisitionCheckListbase();              
                RequistionChecklistReport reportRequistionChecklist = new RequistionChecklistReport();
                reportRequistionChecklist.ReportInput = ReqchkParams;
                byte[] pdfbytesReport = GetPdfBytes(reportRequistionChecklist);
                popstreatmernt = pdfbytesReport;

            }
            catch { }
        }

public byte[] GetPdfBytes(Report rpt)
        {
            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new                              Telerik.Reporting.Processing.ReportProcessor();
            //set any deviceInfo settings if necessary
            System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
            Telerik.Reporting.Processing.RenderingResult result1 = reportProcessor.RenderReport("PDF", rpt, deviceInfo);
            byte[] result = result1.DocumentBytes;
            return result;
        }

Steve
Telerik team
 answered on 27 Apr 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?