Telerik Forums
Reporting Forum
5 answers
479 views
I have a question concerning sub reports.  What I want the report to do is this...  loop through a set of records, if a value in the record is 'Summary', then I want it to display my Summary subreport.  If the value is 'DataEntry', then I want it to display my DataEntry subreport.  There could be any number of records in my original set, so the final report could be Summary, DataEntry, DataEntry, Summary, DataEntry, or it could be just DataEntry.  You get the point.  I'm thinking that to do this, I should have one Master Report and then programically add sub reports depending on the value in the record.  I have the looping done, no sweat, it's the adding of the subreports that I can't seem to grasp.  Any ideas, thoughts, or suggestions?
Steve
Telerik team
 answered on 04 May 2009
1 answer
139 views
I copied over the Terik Reporting DLL's for for a web implementation.  It works great, however when I tried to use SQL Server Reporting Services (on the same box), I am getting the following error:

Could not load file or assembly 'Telerik.Reporting, Version=3.0.9.311, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' or one of its dependencies. The system cannot find the file specified.

Does anyone know why this is happening?  I'm especially confussed because Telerik Reports and SQL Server Reporting Services are two completely different applications.

Please help, Frank
 
Steve
Telerik team
 answered on 04 May 2009
1 answer
104 views
Hi,

I installed telerik reporting in my system and i am using visual studio 2005. When i start "new project in windows application", i can able to see all the reporting toolbox with all reporting controls but when i start "new website"  i can able to see only report viewer.

Basically i want to develop report for the website. Frankly speaking i don't have any idea developing reporting using telerik reporting. I developed using Business intelligence for sql reporting services.

Please tell how to start with telerik reporting. 

And also i want to place a button in my web page, when i click on the the button i want to display a report.

Hope my problem will be solved as soon as possible. 

Thanks.

Best Regards
Arshad
Vassil Petev
Telerik team
 answered on 04 May 2009
1 answer
170 views
I've made the necessary changes to devenv.exe.config to get our design time ability to preview reports working.  Yeah!  This makes it much faster to get reports designed rather than change/compile/run.  We use Subsonic so I had to add sections to the dev config that told it where to find the subsonic "stuff".

However I have a question (looking for ideas) on setting the datasource at design time versus production.

To get design-time preview working, I added code after the InitializeComponent() method to hit a business object and return a dataset which I assign to the report datasource.  This call just hits the business object method with some dummy data - enough to give the preview something to work with.

But in production this call won't do.  For production I comment out this assignment, and do it in the real code (web page presenter logic) that is instantiating the report viewer, prompting for real values, and showing the report.  So for production (or stage - basically whenever NOT previewing at design-time) I comment out the assignment in the report .cs file after the InitializeComponent(), because the datasource assignment happens elsewhere.

Is there a better way to do this?  I don't want to have to remember to comment out the datasource assignment and if I do, I assume the datasource assignment is happening twice which I don't want either.

I can't just put the production datasource assignment logic directly into the report .cs file because it's part of another business module (using MS MVP pattern) with lots of other stuff going on that I don't want to have in my report library module.

Any ideas?

Thx
Steve
Telerik team
 answered on 04 May 2009
7 answers
393 views
Hii Team ,
I have master report which pass parameter to a subreport sometimes the subreport don't have data in it
i need to make the subreport area and headers hidden when no data represented in the subreport
i tried this 

Telerik.Reporting.Processing.

SubReport subReport;

subReport = (Telerik.Reporting.Processing.

SubReport)sender;

if (subReport.InnerReport.Items.Count == 0)

subReport.Visible =

false;

but it not working i need to know what should i do to make it hidden when no data

GVera
Top achievements
Rank 1
 answered on 01 May 2009
2 answers
90 views
We have a web application (vs2008) running the latest versions.

At run-time the report viewer works fine.  Its datasource is set to a businessobject method that returns a dataset.

However at design-time we cannot get things working.  At preview we get an error about it not being able to find a section of the application config file.

The business object uses SubSonic which has info in the web.config file.  The previewer is not finding this info.

Is there a "trick" to making this same config info available to the report designer so that we can preview?

Thx
Kevin
Top achievements
Rank 2
 answered on 01 May 2009
1 answer
109 views
I have a couple of questions on styling reports in Telerik Reporting Q1 2009.

First, is there a way to style a table control so that all the rows and cells have a border? Or do I have to define a style for this and then apply it to my header / row cells?

Is it possible to apply a style selector to a table control? How about the table control header or rows, specifically?
Steve
Telerik team
 answered on 30 Apr 2009
1 answer
192 views
Hi,

  I´ve some dificult to resolv one problem, the cenarius is:

  - I´ve a common header report
  - Detail section, and footer

  On my detail I have some controls anfter I want a sub report to detailing same records and after I have more controls.

  The problem is that the sub report lost the datasource, and on databinding occurs the error.

  My Source:

   Fisrt Report

namespace Eorder_Reporting 
{ 
    using System.ComponentModel; 
    using System.Drawing; 
    using System.Windows.Forms; 
    using Telerik.Reporting; 
    using Telerik.Reporting.Drawing; 
    using System.Data; 
    using Report.dal; 
    using System.Text; 
     
 
    /// <summary> 
    /// Summary description for ReportConsultaPedido. 
    /// </summary> 
    public partial class ReportConsultaPedido : Report 
    { 
        public ReportConsultaPedido() 
        { 
            /// <summary> 
            /// Required for telerik Reporting designer support 
            /// </summary> 
            InitializeComponent(); 
 
            // 
            // TODO: Add any constructor code after InitializeComponent call 
            // 
 
            this.DataSource = null; 
            this.subReport1.ReportSource = null; 
 
        } 
        string _strVarIdPedido; 
        public string IdPedidoDetalheConsulta 
        { 
            get 
            { 
                return (_strVarIdPedido); 
            } 
            set 
            { 
                _strVarIdPedido = value; 
            } 
        } 
 
        private void ReportConsultaPedido_NeedDataSource(object sender, System.EventArgs e) 
        { 
            dal clsDal = new dal(); 
 
            StringBuilder strSQL = new StringBuilder(); 
 
            strSQL.Append("SELECT     CP_PEDIDO_V.ID_PEDIDO, CP_PEDIDO_V.ID_USUARIO, CP_PEDIDO_V.NR_ORDEM_COMPRA, CP_PEDIDO_V.DT_PEDIDO, "); 
            strSQL.Append("          CP_PEDIDO_V.DT_ENTREGA, CP_PEDIDO_V.TS_INCLUSAO, CP_PEDIDO_V.TS_CONCLUSAO, CP_PEDIDO_V.COD_VENDEDOR, "); 
            strSQL.Append("          CP_PEDIDO_V.TS_ENVIO_SAP, CP_PEDIDO_V.NR_CONTROLE_PORTAL, CP_PEDIDO_V.ID_TIPO_DOCUMENTO, CP_PEDIDO_V.ID_CONDICAO_PAGTO, "); 
            strSQL.Append("          CP_PEDIDO_V.DT_FATURAMENTO, CP_PEDIDO_V.DS_OBSERVACAO, CP_PEDIDO_V.COD_CLIENTE_VENDA, CP_PEDIDO_V.NM_CLIENTE_VENDA, "); 
            strSQL.Append("          CP_PEDIDO_V.DS_CIDADE_VENDA, CP_PEDIDO_V.UF_VENDA, CP_PEDIDO_V.COD_CLIENTE_ENTREGA, CP_PEDIDO_V.NM_CLIENTE_ENTREGA, "); 
            strSQL.Append("          CP_PEDIDO_V.DS_CIDADE_ENTREGA, CP_PEDIDO_V.UF_ENTREGA, CP_PEDIDO_V.TS_CANCELADO, CP_PEDIDO_V.NOME_VENDEDOR, "); 
            strSQL.Append("          CP_PEDIDO_V.DS_OBSERVACAO_PEDIDO, CP_TIPO_DOCUMENTO.DS_TIPO_DOCUMENTO, CP_CONDICAO_PAGTO.DS_CONDICAO_PAGTO, "); 
            strSQL.Append("              (SELECT     SUM(COALESCE(cp_pedido_item.vl_item_total, 0)) "); 
            strSQL.Append("                FROM          cp_pedido_item "); 
            strSQL.Append("                WHERE      cp_pedido_item.id_pedido = cp_pedido_v.ID_PEDIDO) AS VL_TOTAL "); 
            strSQL.Append("                FROM        CP_PEDIDO_V, CP_CONDICAO_PAGTO, CP_TIPO_DOCUMENTO "); 
            strSQL.Append("                WHERE       CP_PEDIDO_V.ID_CONDICAO_PAGTO = CP_CONDICAO_PAGTO.ID_CONDICAO_PAGTO AND  "); 
            strSQL.Append("          CP_PEDIDO_V.ID_TIPO_DOCUMENTO = CP_TIPO_DOCUMENTO.ID_TIPO_DOCUMENTO AND (CP_PEDIDO_V.TS_CANCELADO IS NULL) "); 
            strSQL.Append("           AND (CP_PEDIDO_V.NR_ORDEM_COMPRA in (" + _strVarIdPedido + "))"); 
 
 
            clsDal.CreateCommand(strSQL.ToString(), CommandType.Text); 
 
            System.Data.DataSet ds = clsDal.GetDataSet(); 
 
            this.DataSource = ds; 
 
        } 
 
        private void subReport1_ItemDataBinding(object sender, System.EventArgs e) 
        { 
            Telerik.Reporting.Processing.ReportItemBase item = ((Telerik.Reporting.Processing.ReportItemBase)sender); 
            try 
            { 
                if (null != item) 
                { 
                    ReportDetalhePedido pedidoDetalhe = new ReportDetalhePedido(); 
 
                    pedidoDetalhe.IDPedido = "'" + item.DataObject["NR_ORDEM_COMPRA"].ToString().PadLeft(5, '0') + "'"; 
 
                    subReport1.ReportSource = pedidoDetalhe; 
                } 
            } 
            catch { } 
        } 
 
    } 
} 

My SubReport

namespace Eorder_Reporting 
{ 
    using System.ComponentModel; 
    using System.Drawing; 
    using System.Windows.Forms; 
    using Telerik.Reporting; 
    using Telerik.Reporting.Drawing; 
    using Report.dal; 
    using System.Text; 
    using System.Data; 
 
    /// <summary> 
    /// Summary description for ReportDetalhePedido. 
    /// </summary> 
    public partial class ReportDetalhePedido : Report 
    { 
        public ReportDetalhePedido() 
        { 
            /// <summary> 
            /// Required for telerik Reporting designer support 
            /// </summary> 
            InitializeComponent(); 
 
            // 
            // TODO: Add any constructor code after InitializeComponent call 
            // 
            this.DataSource = null;
 
        } 
        string _strVarIdPedido; 
        public string IDPedido 
        { 
            get { return _strVarIdPedido; } 
            set { _strVarIdPedido = value; } 
        } 
 
        private void ReportDetalhePedido_NeedDataSource(object sender, System.EventArgs e) 
        { 
            dal clsDal = new dal(); 
 
            StringBuilder strSQL = new StringBuilder(); 
 
            strSQL.Append("SELECT    CP_PEDIDO_ITEM.ID_PEDIDO_ITEM, CP_PEDIDO_ITEM.ID_PEDIDO, CP_PEDIDO_ITEM.QTD_ITEM, CP_PEDIDO_ITEM.TS_INCLUSAO,  "); 
            strSQL.Append("          CP_PEDIDO_ITEM.TS_CANCELADO, CP_PEDIDO_ITEM.COD_PRODUTO, CP_PEDIDO_ITEM.NM_PRODUTO, CP_PEDIDO_ITEM.DS_BU,  "); 
            strSQL.Append("          CP_PEDIDO_ITEM.DS_UNIDADE, CP_PEDIDO_ITEM.COD_CLASSIFIC_PIG_POULTRY, CP_PEDIDO_ITEM.ID_TABELA_PC_PIG,  "); 
            strSQL.Append("          CP_PEDIDO_ITEM.ID_TABELA_PC_POULTRY, CP_PEDIDO_ITEM.VL_ITEM, CP_PEDIDO_ITEM.FL_FINS_AGROPEC,  "); 
            strSQL.Append("          CP_PEDIDO_ITEM.VL_ITEM_TOTAL, CP_PEDIDO_V.NR_ORDEM_COMPRA "); 
            strSQL.Append("          FROM         CP_PEDIDO_V, CP_PEDIDO_ITEM "); 
            strSQL.Append("          WHERE     CP_PEDIDO_V.ID_PEDIDO = CP_PEDIDO_ITEM.ID_PEDIDO AND (CP_PEDIDO_V.NR_ORDEM_COMPRA = " + _strVarIdPedido + ") "); 
            strSQL.Append("          ORDER BY CP_PEDIDO_ITEM.DS_BU, CP_PEDIDO_ITEM.NM_PRODUTO"); 
 
            clsDal.CreateCommand(strSQL.ToString(), CommandType.Text); 
 
            System.Data.DataSet ds = clsDal.GetDataSet(); 
 
            this.DataSource = ds; 
        } 
    } 
} 

Someone can help me?

Thanks

Steve
Telerik team
 answered on 30 Apr 2009
2 answers
218 views
Hi,

I have created a report using the telerik reporting tool.
In detail section i set the property columncount = 3 to show three columns in detail section.
I was surprised to see that this is working right in Preview but it goes off in HTML Preview.
Please help me, what will be the possible causes for the misbehavior? How i can overcome this problem?

I want to show three columns in detail section using the Column Count property.

Thanks.
shadow
Top achievements
Rank 2
 answered on 30 Apr 2009
4 answers
214 views

Hi.
 
 After upgrading to Q1 2009 of Reporting I cannot send the parameters to the report.
 
My code is as follows:

        Dim report_generalAudit = New ReportsCL.GeneralAuditReport
        report_generalAudit.DataSource = resultsDataTable

        Me.viewer.Report = report_generalAudit

        Me.viewer.Report.ReportParameters("StartDate").Value = startDate
        Me.viewer.Report.ReportParameters("EndDate").Value = endDate 
  
  I get the following exception:
  
  Input string was not in a correct format.
  
  on
   Me.viewer.Report.ReportParameters("StartDate").Value = startDate

   
Am I doing something wrong?

Thanks in advanced.
  

Steve
Telerik team
 answered on 29 Apr 2009
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?