Telerik Forums
Reporting Forum
1 answer
145 views

Hi,

I am working on Telerik Reporting. I am trying to design a report which has a subreport.
I have taken a report item >> assigned a query in the report wizard >> assigned the fields in the detail section of main report. In the properties of the main report i have given a parameter and filter properties. Now i dragged a subreport item into the detail section.
Designed another report (parameter and filter properties were given) in the same above way and assigned this report as a ReportSource to the subreport (in the main report).
Now i am assigning a dataset to the datasource of main report and subreport. Below two lines were written in the NeedDataSource event of Subreport for Conditional basis.

 

" Dim

 

item As Processing.ReportItemBase = DirectCast(sender, Processing.ReportItemBase)

 

 

Me.SubReport1.Parameters(0).Value = item.DataObject("CF ID") "

When i am trying to generate the report i am facing an error saying that -
" An error has occured while processing textbox 'textbox6'.
The expression contains object CF_Name that is not defined in the current context. "

Here in the design all the fields were assigned through the Query from the wizard.

Can you please explain me what could be the  mistake in this process and it would be very helpfull if you can provide a sample application or a doucument (I have done the above process following the guide in telerik site) regarding this "Master - Child report."
This is a very very urgent requirement. Thank you.

Regards,
Prasad.

Steve
Telerik team
 answered on 10 Feb 2010
1 answer
98 views
Hi all,
I'm facing a huge difficulty trying to get a Report formatting certain items at ItemDataBinding.
My idea would be to build a "general purpose" report able to show informations from a DataSource and displaying each item of those datas in tow possible different ways:
  1. As a Label + TextBox
  2. As a Label + CheckBox

My DataSource looks like:
Private Sub Report_NeedDataSource(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.NeedDataSource 
        Dim oRowList As New List(Of MyDataRow) 
        oRowList.Add(New MyDataRow("Sezione 1", 1, "Nome del candidato""Mario")) 
        oRowList.Add(New MyDataRow("Sezione 1", 1, "Cognome del candidato""Rossi")) 
        oRowList.Add(New MyDataRow("Sezione 1", 1, "Data di nascita""20/05/1960")) 
        oRowList.Add(New MyDataRow("Sezione 2", 1, "Indirizzo""Via Milano, 18")) 
        oRowList.Add(New MyDataRow("Sezione 2", 1, "Cap""20100")) 
        oRowList.Add(New MyDataRow("Sezione 2", 1, "Città""Milano")) 
        oRowList.Add(New MyDataRow("Sezione 2", 1, "Provincia""MI")) 
        oRowList.Add(New MyDataRow("Sezione 3", 1, "Animale preferito""")) 
        oRowList.Add(New MyDataRow("Sezione 3", 2, "Gatto""X")) 
        oRowList.Add(New MyDataRow("Sezione 3", 2, "Cane""")) 
        oRowList.Add(New MyDataRow("Sezione 3", 2, "Pappagallo""X")) 
 
 
        CType(sender, Telerik.Reporting.Processing.Report).DataSource = oRowList 
 
    End Sub 
...and as you can see I'm binding it to the report at the NeedDataSource Event.

 The Class MyDataRow contains:
  • Group Field
  • Type field
  • Label field
  • Text field
Although this is a static reprsentation of my DataBase  it is well functional to my explanation.
My Report Contains a Grouping, based on the "Group" field, and two TextBox bounded to the Label field and to the Text field of my MyDataRow. If I run the Report I can see all my datas correctly bounded.
The problem raises when I try to intervene on formatting of the two TextBox fields at DataBinding. Code follows:
Private Sub DetailSection1_ItemDataBinding(ByVal sender As ObjectByVal e As System.EventArgs) Handles DetailSection1.ItemDataBinding 
        Dim ProcessingDetail As Telerik.Reporting.Processing.DetailSection = CType(sender, Telerik.Reporting.Processing.DetailSection) 
        Dim oDataRow As MyDataRow = CType(ProcessingDetail.DataObject.RawData, MyDataRow) 
 
        If oDataRow.Type = 2 Then 
 
            T_Label.Size = New SizeU(New Unit(18, UnitType.Cm), New Unit(0.5, UnitType.Cm)) 
            T_Label.Location = New PointU(New Unit(1, UnitType.Cm), New Unit(0, UnitType.Cm)) 
 
            T_Text.Style.BorderColor.Default = Color.Black 
            T_Text.Style.BorderStyle.Default = BorderType.Solid 
            T_Text.Style.BorderWidth.Default = New Unit(2, UnitType.Point) 
            T_Text.Size = New SizeU(New Unit(0.5, UnitType.Cm), New Unit(0.5, UnitType.Cm)) 
            T_Text.Location = New PointU(New Unit(0, UnitType.Cm), New Unit(0, UnitType.Cm)) 
            T_Text.Style.TextAlign = HorizontalAlign.Center 
            T_Text.Style.Font.Bold = True 
 
        End If 
    End Sub 

As you ca see, if the Type field of my Datasource is "2" what I do is format my two TextBoxes in such a way that they look like a CheckBox and a label following. HERE RAISES THE PROBLEM !
What comes out of my report is that the formatting gets applied only after the first "Record" of my data source has been parsed. Attached You'll find a screen shot of what happens when I get to bind the part of the data source containing Records of type "2".

I'm relatively new to programming and especially with Telerik components, so I might have posted a "stupid" problem, but I'm going nuts.
Thanks for any help provided.

Lorenzo

Steve
Telerik team
 answered on 10 Feb 2010
1 answer
191 views
One of the requirements for converting our existing reports is that they be backwards compatible.  We currently have an assortment of reports that include xsl reports and crystal reports.  Both use xml data as their datasource.  I have looked at several examples in the forums that convert xml to built in classes for report design and how to convert the xml to a dataset at runtime.  None of the examples showed how to do this with multiple level xml shown in the attached example.  Can you help me with converting the attached example for use in a report.  And, is there a simple way to do this?  I have hundreds of reports to convert.

Thank You for your help

Here is the xml example:

<creditreport ReportCategory="2" ReportType="2" ReportTitle="Credit Summary Report" ExposureDate="Most Recent" Associate="All Business Associates" CreditExposureProfile="All Contracts" PhysicalExposure="Length of Contract" FinancialExposure="Length of Contract" Note="Note Field" CreatedDate="12/12/2005 10:23:30 AM">
 <associate SellerID="29" AssociateID="EA0452AB-873A-485F-A81A-6174EB65D4E2" AssociateName="Bill's Test" ExposureDate="12/6/2005">
  <profile BeginningBalance=".00" BuyerCreditLimit="No Credit" EstimatedValue=".00" AvailableCredit="No Credit" />
  </associate>
 <associate SellerID="29" AssociateID="F8C42696-9F6C-4876-B7FF-BE673313DE30" AssociateName="BP" ExposureDate="12/6/2005">
  <profile BeginningBalance="100000.00" AssociateID="F8C42696-9F6C-4876-B7FF-BE673313DE30" CreditProfileID="52D0EC5D-857B-4560-9A8B-BDF496FABEB1" ProfileName="1,000,000 LC" BuyerCreditLimit="1000000" EstimatedValue="2273096.11" AvailableCredit="-1273096.11" />
  <profile BeginningBalance="200000.00" AssociateID="F8C42696-9F6C-4876-B7FF-BE673313DE30" CreditProfileID="CD4612B0-A30D-4D49-A972-CEDD52695318" ProfileName="Default Contracts" BuyerCreditLimit="5000000" EstimatedValue="1174770.40" AvailableCredit="3825229.60" />
  </associate>
 <associate SellerID="29" AssociateID="2E63F5E4-5DF2-4609-9046-0CC25B33AC49" AssociateName="Duke" ExposureDate="12/6/2005">
  <profile BeginningBalance="300000.00" AssociateID="2E63F5E4-5DF2-4609-9046-0CC25B33AC49" CreditProfileID="6DAB56EB-6D39-4F1B-A654-D9E651D536EA" ProfileName="Default" BuyerCreditLimit="500000" EstimatedValue="30307948.20" AvailableCredit="-29807948.20" />
  <profile BeginningBalance="400000.00" AssociateID="2E63F5E4-5DF2-4609-9046-0CC25B33AC49" CreditProfileID="9C559583-291F-411A-8E09-C0F7DF1ADFB5" ProfileName="No Credit" BuyerCreditLimit="No Credit" EstimatedValue="-246830681.93" AvailableCredit="No Credit" />
  <profile BeginningBalance="500000.00" AssociateID="2E63F5E4-5DF2-4609-9046-0CC25B33AC49" CreditProfileID="BF9A2D43-E227-4488-A016-2787001EFE71" ProfileName="Unlimited" BuyerCreditLimit="Unlimited" EstimatedValue="2640000.00" AvailableCredit="Unlimited" />
  </associate>
  </creditreport>
Peter
Telerik team
 answered on 10 Feb 2010
1 answer
159 views
When using a HtmlTextBox I am unable to utilize an Expression to call a User Function that returns a string. I get the following error:

Name cannot begin with the '-' character, hexadecimal value 0x2D. Line 1, position 8.

Now if I use a built in function like Trim, which also returns a string, it works fine... if I replace the HtmlTextBox with a regular Textbox it also works fine... so what is it about the HtmlTextBox that I'm missing...
Xorcist
Top achievements
Rank 1
 answered on 09 Feb 2010
1 answer
136 views
Hi we are using both charting objects Telerik.Chart and Telerik.Reporting.Chart in the Asp.net Ajax controls chart we use the prePaint method to hide the top and bottom YAxis Labels on our bubble chart via this method:
public void RadChart_PrePaint1(object sender, EventArgs e)  
        {  
            RadChart.PlotArea.YAxis.SetItemLabel(0, "");  
            RadChart.PlotArea.YAxis.SetItemLabel(7, "");  
        } 
THis method does not appear to be available in the Reporting chart though. Anyone know a workaround?
Steve
Telerik team
 answered on 09 Feb 2010
2 answers
74 views
Hi, telerik team,
I drag table control with 3 column  to a report and set the NeedDataSource event as:
 private void MonthTable_NeedDataSource(object sender, EventArgs e)
        {
           (sender as Telerik.Reporting.Processing.Table).DataSource = GetDataSource();

        }

         DataTable GetDataSource()
        {
            DataTable tablelocal = new DataTable();
            tablelocal.Columns.Add("Value", System.Type.GetType("System.Int32"));
            tablelocal.Columns.Add("LabelA", System.Type.GetType("System.String"));
            tablelocal.Columns.Add("LabelB", System.Type.GetType("System.String"));
            
            tablelocal.Rows.Add(new object[] { 5, "Item 1", "A" });
            tablelocal.Rows.Add(new object[] { 4, "Item 2", "B" });
            tablelocal.Rows.Add(new object[] { 3, "Item 3", "C" });
            tablelocal.Rows.Add(new object[] { 2, "Item 4", "D" });
            tablelocal.Rows.Add(new object[] { 1, "Item 5", "E" });
            return tablelocal;
        }
       
The generated report is only a empty spreadsheet  with 3 column and 5 rows(not include the head).
Do you have any advice so that I can see the real table data in the spreadsheet?

Thanks a lot!

Qixiong


Qixiong Zhen
Top achievements
Rank 1
 answered on 09 Feb 2010
1 answer
105 views
Trying to get columns to line up in Telerik report (Q2 - 2009.) The report was auto-generated by the wizard and the width was increased. I cannot figure out how to get the columns to line up properly. They are rendering all out of whack. I've attached a screenshot to demonstrate.

Steve
Telerik team
 answered on 08 Feb 2010
3 answers
421 views
Hi

Is it possible to use icons / image buttons in place of the drop down list on the web report viewer.

I thought I saw something on this a few months ago, but cant find any inf o now.

Andy
Steve
Telerik team
 answered on 08 Feb 2010
4 answers
197 views
Hi,

I am using Barcode control from Telerik reporting. I placed some texts and one barcode per detail. Generation of the report leads to out of memory exception and the application growed up to >1GB in memory :-( When I replaced the Barcode, the behavior become normal.

The data source I use has cca 2000 records and there were 6 records per page. Also, I used "Code128" as a symbology.

What do you suggest to do, when I need to print out a lot of labels with barcodes?

TIA
Jaroslav Bucek
Elango S
Top achievements
Rank 1
 answered on 08 Feb 2010
1 answer
112 views

Hello,
as I know at this time the page numbering is not working in Excel export.

I've a Textbox like with this expression "=PageNumber + ' / ' + PageCount" and when I export to Excel I've the text "1/1" on every page.

I'd like to keep the page numbering in other format so I don't want to remove it from my report.

Do you have a solution to remove it from Excel and keeping it in other format ?

It would be helpfull to have a parameter (in rendering parameters) to tell telerik reporting to ignore or not display or not render the field with PageCount or PageNumber when exporting to Excel.

Regards
Gilles

Steve
Telerik team
 answered on 08 Feb 2010
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?