Telerik Forums
Reporting Forum
1 answer
78 views
I'm trying to figure out how to use the Telerik Reporting to Tie it into an Data Object to create a report.

I have an object that contains a 2 Collections of DataTables, one that needs to be used in Charting, the other in a Table, along with another collection of objects for general reporting.  I need to create the report in such a way that it repeats for each instance of the parent object. 

I'm coding this for a VB Windows Form.  Any help or examples of data binding using an object would be appreciated.
Massimiliano Bassili
Top achievements
Rank 1
 answered on 10 Mar 2010
2 answers
160 views
I have a reportviewer on my page and in the pageload codeblock I have put:

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
        If Not Page.IsPostBack Then 
            ReportViewer1.Report = New Applications.Reporting.ForecastSalesValues 
        End If 
    End Sub 

The problem is that this report has a parameter which I allow to accept blanks and when I load the page up, the report trys to get the data and display it.
I do not want it to create the report when the page loads, I want it to only try to create the report when the Preview button is pressed.
How can I do this?
Jaymie
Top achievements
Rank 1
 answered on 09 Mar 2010
0 answers
266 views
Respected Team,
                 I have a chart (pie) in my report which is populated by NeedDataSource event. If i set the report's data source as a datatable from webform (asp.net web page) then NeedDataSource event is fired automatically and it works fine. When I use this report as a subreport and set the datasource with same data table from Main Report then NeedDataSource is not fired and my pie chart is not displaying.
  I tried to use the RaiseNeedDataSource(chart1.GetType(), EventArgs.Empty). By this way it has been fired but in NeedDataSource event when i tried to type cast the sender (chart1) as Telerik.Reporting.Processing.Char then it returns null and eventually it failed to display the pie chart. Code is given below
1. Sub report name is rptAgedDebtor
      public rptAgedDebtor()
        {
            InitializeComponent();
            chart1.RaiseNeedDataSource(chart1.GetType(), EventArgs.Empty);
        }
2. private void chart1_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
            Telerik.Reporting.Chart chartDefinition = chart.ItemDefinition as Telerik.Reporting.Chart;

            ChartSeries DebtorSeries = new ChartSeries();
            DataTable tblDebtor = (System.Data.DataTable)this.DataSource;

            decimal debtorValue = 0;
            ChartSeriesItem DebtorItem = null;
            foreach (DataRow dr in tblDebtor.Rows)
            {
                debtorValue = Math.Round(Convert.ToDecimal(dr["Value"]));
                if (debtorValue == 0) continue;
                DebtorItem = new ChartSeriesItem();
                DebtorItem.Label.TextBlock.Text = string.Format("${0:##,##,##0}", debtorValue);
                DebtorItem.YValue = Convert.ToDouble(dr["Value"]);
                DebtorItem.Name = GetAgedItemTitle(dr["Name"].ToString());
                DebtorSeries.AddItem(DebtorItem);
            }
            DebtorSeries.Type = ChartSeriesType.Pie;
            DebtorSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
            chartDefinition.Series.Add(DebtorSeries);
            chartDefinition.Appearance.Border.Visible = false;
            chartDefinition.ChartTitle.TextBlock.Text = "Aged Debtors";
            chartDefinition.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.White;
            chartDefinition.PlotArea.Appearance.FillStyle.SecondColor = System.Drawing.Color.White;
            chartDefinition.PlotArea.Appearance.Border.Visible = false;
        }

  If any one have any idea then plz give me chance of thanks.
Muhammad Abrar Nazeer
Top achievements
Rank 1
 asked on 09 Mar 2010
1 answer
99 views
Hi,

I am creating multiple reports and trying to style them. I need to use a specific size for the textboxes in the report and was wondering if there is anyway to set that in the stylesheet for the report and use it across multiple reports(I know how to use style sheets across multiple reports, but do not see any option for setting the size of textbox).

Thanks
Peter
Telerik team
 answered on 09 Mar 2010
1 answer
154 views
Hi,

I created some reports as a class library and am using them in a web application. I could save the reports (eg: PDF format) on the server using the reportProcessor.RenderReport method. Is there anyway that I can implement a save/view option kind of dialog box on the client side(simliar to what we get when we use a reportviewer and click on "Export")
Steve
Telerik team
 answered on 09 Mar 2010
0 answers
78 views
Our ASP.NET/Silverlight 4 application has 75k clients and potentially millions of transaction records over time. Has anyone successfully run Telerik Reports on large datasets; i.e. 10,000 to 1,000,000 records? I've heard that there are problems with as little as 1,000 records.  If I access our client dataset (75k records) and query it with the Query Builder in VS 2010, it will begin returning records almost immediately at an extremely acceptable rate.  If I try and run a Telerik Report on it, it throws an meaningless exception almost immediately from inside the adapter's Fill method which it displays on the ReportViewer screen. 

Does anyone believe that Telerik Reporting can or should be used in this sort of situation; and if so, what modifications have you made to the base code to accomplish this, and if not, does anyone know of an alternative?  I'm becoming desparate.

Thanks,
Steve
Steve
Top achievements
Rank 1
 asked on 09 Mar 2010
1 answer
189 views
I'm trying to style the crosstab table.
For the table data, i have a grey line under each row  (Normal.TableBody ) ,
for the Subtotal I have a double black line as the top (Normal.SubTotal ) .

When it prints, I'm getting the double black line and the grey line,
since the data before the subtotal is also the table data

I've deduced it's because one textbox uses Normal.TableBody, which has the grey line at the bottom
and the other textbox uses Normal.SubTotal which is defined as a top border with a double line.
So how would i make the Subtotal Box be the main one?

please see image.


Also, in the stylerule, how come I don't see a place to add a style name in the TypeSelector Collection Editor when adding a new rule (newstyle.png) ?

If I edit an existing (existingstyle.png) rule the stylename box is there.

Here's the export of the Styles

<?xml version="1.0" encoding="utf-8"?> 
<StyleSheet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  <StyleRule> 
    <Style> 
      <BackgroundColor>White</BackgroundColor> 
      <Color>Black</Color> 
      <BorderStyle> 
        <Default>None</Default> 
      </BorderStyle> 
      <BorderColor> 
        <Default>Black</Default> 
      </BorderColor> 
      <BorderWidth> 
        <Default>1px</Default> 
      </BorderWidth> 
      <Font> 
        <Name>Arial</Name> 
        <Size>8pt</Size> 
      </Font> 
    </Style> 
    <Selectors> 
      <StyleSelector> 
        <Type>Table</Type> 
        <StyleName>Normal.TableNormal</StyleName> 
      </StyleSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <TextAlign>Center</TextAlign> 
      <VerticalAlign>Middle</VerticalAlign> 
      <BorderStyle> 
        <Top>Solid</Top> 
        <Bottom>Solid</Bottom> 
        <Left>None</Left> 
      </BorderStyle> 
      <BorderColor> 
        <Top>41, 86, 153</Top> 
        <Bottom>41, 86, 153</Bottom> 
        <Left>Black</Left> 
      </BorderColor> 
      <BorderWidth> 
        <Top>3px</Top> 
        <Bottom>3px</Bottom> 
        <Left>0pt</Left> 
        <Right>0pt</Right> 
      </BorderWidth> 
      <Font> 
        <Size>11px</Size> 
        <Bold>True</Bold> 
      </Font> 
      <LineWidth>3px</LineWidth> 
    </Style> 
    <Selectors> 
      <DescendantSelector> 
        <Selectors> 
          <TypeSelector> 
            <Type>Table</Type> 
          </TypeSelector> 
          <StyleSelector> 
            <Type>ReportItem</Type> 
            <StyleName>Normal.TableHeader</StyleName> 
          </StyleSelector> 
        </Selectors> 
      </DescendantSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <Visible>True</Visible> 
      <TextAlign>Right</TextAlign> 
      <VerticalAlign>Top</VerticalAlign> 
      <BorderStyle> 
        <Default>None</Default> 
        <Bottom>Solid</Bottom> 
      </BorderStyle> 
      <BorderColor> 
        <Default>Black</Default> 
        <Bottom>41, 86, 153</Bottom> 
      </BorderColor> 
      <BorderWidth> 
        <Default>1px</Default> 
        <Bottom>4px</Bottom> 
      </BorderWidth> 
      <Padding> 
        <Top>5px</Top> 
      </Padding> 
    </Style> 
    <Selectors> 
      <DescendantSelector> 
        <Selectors> 
          <TypeSelector> 
            <Type>Table</Type> 
          </TypeSelector> 
          <StyleSelector> 
            <Type>ReportItem</Type> 
            <StyleName>Normal.TableGroup</StyleName> 
          </StyleSelector> 
        </Selectors> 
      </DescendantSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <TextAlign>Right</TextAlign> 
      <VerticalAlign>Middle</VerticalAlign> 
      <BorderStyle> 
        <Default>None</Default> 
        <Top>Double</Top> 
      </BorderStyle> 
      <BorderColor> 
        <Default>Black</Default> 
      </BorderColor> 
      <BorderWidth> 
        <Default>0px</Default> 
        <Top>4px</Top> 
      </BorderWidth> 
      <Font> 
        <Bold>True</Bold> 
      </Font> 
      <Padding> 
        <Top>0px</Top> 
      </Padding> 
    </Style> 
    <Selectors> 
      <DescendantSelector> 
        <Selectors> 
          <TypeSelector> 
            <Type>Table</Type> 
          </TypeSelector> 
          <StyleSelector> 
            <Type>ReportItem</Type> 
            <StyleName>Normal.SubTotal</StyleName> 
          </StyleSelector> 
        </Selectors> 
      </DescendantSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <TextAlign>Right</TextAlign> 
      <VerticalAlign>Middle</VerticalAlign> 
      <BorderStyle> 
        <Top>None</Top> 
      </BorderStyle> 
      <BorderColor> 
        <Top>41, 86, 153</Top> 
      </BorderColor> 
      <BorderWidth> 
        <Top>3px</Top> 
      </BorderWidth> 
      <Font> 
        <Bold>True</Bold> 
      </Font> 
      <Padding> 
        <Top>0px</Top> 
      </Padding> 
    </Style> 
    <Selectors> 
      <DescendantSelector> 
        <Selectors> 
          <TypeSelector> 
            <Type>Table</Type> 
          </TypeSelector> 
          <StyleSelector> 
            <Type>ReportItem</Type> 
            <StyleName>Normal.GrandTotal</StyleName> 
          </StyleSelector> 
        </Selectors> 
      </DescendantSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <TextAlign>Right</TextAlign> 
      <VerticalAlign>Middle</VerticalAlign> 
      <BorderStyle> 
        <Default>None</Default> 
        <Bottom>Solid</Bottom> 
      </BorderStyle> 
      <BorderColor> 
        <Default>Black</Default> 
        <Bottom>153, 153, 153</Bottom> 
      </BorderColor> 
      <BorderWidth> 
        <Default>1px</Default> 
      </BorderWidth> 
    </Style> 
    <Selectors> 
      <DescendantSelector> 
        <Selectors> 
          <StyleSelector> 
            <Type>ReportItem</Type> 
            <StyleName>Normal.TableBody</StyleName> 
          </StyleSelector> 
        </Selectors> 
      </DescendantSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <Color>Blue</Color> 
      <TextAlign>Right</TextAlign> 
      <Font> 
        <Size>20px</Size> 
        <Bold>True</Bold> 
      </Font> 
    </Style> 
    <Selectors> 
      <TypeSelector> 
        <Type>ReportHeaderSection</Type> 
      </TypeSelector> 
      <TypeSelector> 
        <Type>HtmlTextBox</Type> 
      </TypeSelector> 
    </Selectors> 
  </StyleRule> 
  <StyleRule> 
    <Style> 
      <TextAlign>Right</TextAlign> 
      <Font> 
        <Size>14px</Size> 
        <Bold>True</Bold> 
      </Font> 
    </Style> 
    <Selectors> 
      <TypeSelector> 
        <Type>PageHeaderSection</Type> 
      </TypeSelector> 
    </Selectors> 
  </StyleRule> 
</StyleSheet> 









Peter
Telerik team
 answered on 08 Mar 2010
1 answer
170 views
    Hi, Telerik!
The NeedDataSource event of my report don't run, when i fill DataSetTableAdpter! Can you tell me the reason?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 06 Mar 2010
1 answer
113 views
Hi,

I have created a report with a conditional format for the background color of the detail section to be set to silver if the row is an odd number. The issue comes when the report is set to landscape equal to false and the last column in the report is on the edge of the report. The background color that is set extends past the last column. I moved each item in the detail section back from the edge by about .02 inches so that it is not imediately on the edge of the report.

If you have any ideas or need more information please just let me know.

Thanks,
Jonathan Simon
Steve
Telerik team
 answered on 05 Mar 2010
0 answers
118 views
Hi,,,

      Now i am using "Telerik_Reporting_2008_3_1402_trial_4" for reports..

i must need the No records found option when the reportviewer contain 0 records....

plz try for it....

By Suriya
Suriya
Top achievements
Rank 1
 asked on 05 Mar 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?