Telerik Forums
Reporting Forum
3 answers
115 views
Please it it possible to have two sqldatasources in one report.
Thank you
IvanY
Telerik team
 answered on 22 Nov 2013
1 answer
122 views
Hi Telerik team,

1. I need to validate expressions used in my report before report generation.
ex: = Parameters.Parameter1.Value / LineStyle.Solid, 

This expression gives me an error when generating report. I want to detect this very earlier stage. 

2. Is there any object type which keeps expression values or those expression evaluates in runtime? Can't I reuse expressions?
KS
Top achievements
Rank 1
 answered on 22 Nov 2013
3 answers
136 views
Hi there,

I have a page 8.1 inches with margins .2 inches all around. I have also tried with 8 inch page.

Second column will not work. I have tried 8" page, 7" page, no margins, 1" margins, etc. Whatever I do it does not work. I have also tried removing the header and that did nothing. I have attached a pic of what it looks like in PP mode.

Here is my report:

<?xml version="1.0" encoding="utf-8"?>
<Report DataSourceName="sqlDataSource1" Width="8.1in" Name="guestlist" SnapGridSize="0.1in" xmlns="http://schemas.telerik.com/reporting/2012/3.3">
  <Style>
    <BorderWidth Default="0in" />
  </Style>
  <DataSources>
    <SqlDataSource ConnectionString="STRINGNAME" SelectCommand="select * from guestlist order by lastname" Name="sqlDataSource1" />
  </DataSources>
  <Items>
    <DetailSection Height="1.8in" Name="detail">
      <Style>
        <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
        <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
        <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
      </Style>
      <Items>
        <TextBox Width="0.9in" Height="0.2in" Left="0.15in" Top="0.07in" Value="Name:" Name="textBox1">
          <Style TextAlign="Right" VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
          </Style>
        </TextBox>
        <TextBox Width="0.9in" Height="0.2in" Left="0.15in" Top="0.3in" Value="Guest Name:" Name="textBox4">
          <Style TextAlign="Right" VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
          </Style>
        </TextBox>
        <TextBox Width="0.9in" Height="0.2in" Left="0.15in" Top="0.5625in" Value="Children:" Name="textBox5">
          <Style TextAlign="Right" VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
          </Style>
        </TextBox>
        <TextBox Width="0.9in" Height="0.2in" Left="0.15in" Top="0.8in" Value="Address:" Name="textBox6">
          <Style TextAlign="Right" VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
          </Style>
        </TextBox>
        <TextBox Width="0.9in" Height="0.2in" Left="0.15in" Top="1.25in" Value="Phone:" Name="textBox8">
          <Style TextAlign="Right" VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
          </Style>
        </TextBox>
        <TextBox Width="0.9in" Height="0.2in" Left="0.15in" Top="1.5in" Value="Email:" Name="textBox9">
          <Style TextAlign="Right" VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="None" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="0.0700000151991844in" Value="=Fields.FirstName + " " + Fields.LastName" Name="textBox10">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.0299999993294477in" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="0.3in" Value="=Fields.Guests" Name="textBox11">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.03in" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="0.5625in" Value="=Fields.Children" Name="textBox12">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.03in" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="0.8in" Value="=Fields.Street" Name="textBox13">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.03in" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="1in" Value="=Fields.City + ", " + Fields.State + " " + Fields.Zip " Name="textBox14">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.03in" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="1.25in" Value="=Fields.Phone" Name="textBox15">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.03in" />
          </Style>
        </TextBox>
        <TextBox Width="2.80000025431315in" Height="0.2in" Left="1.10000014305115in" Top="1.5in" Value="= Fields.Email" Name="textBox16">
          <Style VerticalAlign="Middle">
            <BorderStyle Top="None" Bottom="Solid" Left="None" Right="None" />
            <BorderColor Top="Black" Bottom="Black" Left="Black" Right="Black" />
            <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
            <Font Size="9pt" />
            <Padding Left="0.03in" />
          </Style>
        </TextBox>
      </Items>
    </DetailSection>
    <PageHeaderSection Height="1in" Name="pageHeaderSection1">
      <Style BackgroundColor="238, 236, 225">
        <BorderStyle Top="Solid" Bottom="Solid" Left="Solid" Right="Solid" />
        <BorderColor Top="74, 69, 42" Bottom="74, 69, 42" Left="74, 69, 42" Right="74, 69, 42" />
        <BorderWidth Top="1pt" Bottom="1pt" Left="1pt" Right="1pt" />
        <Font Name="Edwardian Script ITC" />
      </Style>
      <Items>
        <PictureBox Value="Value" Width="7.7000002861023in" Height="0.799960613250732in" Left="0.199999968210856in" Top="0.0999999865889549in" Sizing="ScaleProportional" MimeType="image/png" Name="pictureBox1" />
      </Items>
    </PageHeaderSection>
  </Items>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False" ColumnCount="2" ColumnSpacing="0in">
      <Margins>
        <MarginsU Left="0.2in" Right="0.2in" Top="0.2in" Bottom="0.2in" />
      </Margins>
      <BorderWidth Default="0in" />
    </PageSettings>
  </PageSettings>
</Report>
Stef
Telerik team
 answered on 22 Nov 2013
3 answers
409 views
I am converting my reports over from Crystal Reports and have run into a little snag.  I list sometimes 800 weights to an order.  To list them vertically would be a show stopper.  In Crystal I went to the section expert and told it my layout was Horizontal (across then down).  Is there a way to do this in Telerik.  This is very important to us and if it cannot be done I will have to stay with Crystal which I do no want to do

Thank You
John Russo
Meat Processing Software
www.scaleprogrammers.com
Stef
Telerik team
 answered on 21 Nov 2013
1 answer
690 views
Hi all,

I want design a report with a table,  but the number of columns is dynamic. How I can do it?  I receive data from a Stored Procedure.
If you can, please send an example.

Best Regarsd,
Marcelo Videira
Stef
Telerik team
 answered on 20 Nov 2013
3 answers
130 views
Hi,
where/how can I change the default message that appears when parameters have not yet been selected by the user?
See attached picture.
IvanY
Telerik team
 answered on 20 Nov 2013
1 answer
201 views
Is there an example of how to use the Html5 reportviewer with a objectdatasource

public class DashboardController : Controller
{
     public ActionResult Index()
    {
        var model = data.GetReportData()
 
        return View(model);
    }
}
@(Html.TelerikReporting().ReportViewer()
        .Id("reportViewer1")
        .ServiceUrl("/api/reports/")
        .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.htmll")
        .ReportSource(new TypeReportSource{TypeName="MyReportLibrary, Dashboard"})
        .ViewMode(ViewModes.INTERACTIVE)
        .ScaleMode(ScaleModes.SPECIFIC)
        .Scale(1.0)
        .PersistSession(true)
)

How do I attached the model to the reportsource?
IvanY
Telerik team
 answered on 20 Nov 2013
1 answer
1.0K+ views
PLEASE REFER TO MY STACK OVERFLOW QUESTION FOR DETAILED EXPLANATION.

http://stackoverflow.com/questions/20039340/binding-data-to-a-telerik-report

I'm using ASP.NET MVC with telerik reporting. I'm trying to bind data to a dataset, which is assigned to a telerik report.

I have tried with below code but data is not showing up.

private void Report1_ItemDataBound(object sender, EventArgs e)
        {
            SqlDataAdapter adapter = new SqlDataAdapter();
            rep = new reportRepository();
            List<ReportViewModel> model = rep.GetData();

            // Creating and configuring the ObjectDataSource component:
            var objectDataSource = new Telerik.Reporting.ObjectDataSource();
            objectDataSource.DataSource = dsConvertion.ToDataSet(model); // GetData returns a DataSet with three tables
            objectDataSource.DataMember = "tblFirst"; /// Indicating the exact table to bind to. If the DataMember is not specified the first data table will be used.

            // Creating a new report
            Telerik.Reporting.Report report = new Telerik.Reporting.Report();

            // Assigning the ObjectDataSource component to the DataSource property of the report.
            report.DataSource = objectDataSource;

            // Use the InstanceReportSource to pass the report to the viewer for displaying
            Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
            reportSource.ReportDocument = report;

        }

Peter
Telerik team
 answered on 20 Nov 2013
3 answers
180 views

I am new to Telerik reporting and am trying to include a simple graph from data that has two columns (X, Y), for instance



1 345



2 10



...



12 3273 



The Graph wizard seems to assume a more complicated data structure and requires a category.



For the simple X Y graph I need there are no grouping or categories.



How do I graph this simple data.







The graph produced by the wizard also has "ALL" under the X axis for which I can not find the property displaying this text.



Petio Petkov
Telerik team
 answered on 20 Nov 2013
4 answers
260 views
Ive seen this post but no resolution. Is there a way to do page counting within a group. ie. Report is 15 pages long and the numbering would look like (page number-page count) .
Group 1 (1-5,2-5,3-5...) Group 2 (1-7,2-7,3-7...) Group 3 (1-3,2-3,3-3)

If this is not possible (which I seem to believe is the case, because the problem of resetting the pagecount) is it possible to reset the page number at the end of each group? The numbering would be simply the count inside the group.
Group 1 (1,2,3,4,5) Group 2 (1,2,3,4,5,6,7) Group 3 (1,2,3)

Any help is appreciated..

Thanks

Nick
Top achievements
Rank 1
 answered on 19 Nov 2013
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Missing User
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?