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.
| Private Sub Report_NeedDataSource(ByVal sender As Object, ByVal 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 |
| Private Sub DetailSection1_ItemDataBinding(ByVal sender As Object, ByVal 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 |
| public void RadChart_PrePaint1(object sender, EventArgs e) |
| { |
| RadChart.PlotArea.YAxis.SetItemLabel(0, ""); |
| RadChart.PlotArea.YAxis.SetItemLabel(7, ""); |
| } |
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