Telerik Forums
Reporting Forum
3 answers
112 views
Ideally, I would like to do accomplish the following:

IEnumerable<MyPoco> pocos = _reportingTasks.GetMyPocos();

 var report = new MyPocoReport {DataSource = pocos};

ReportViewer1.ReportSource = new InstanceReportSource {ReportDocument = report};


Basically, because of how are dependencies are set up, I would like to hand my report a pre-populated list rather than setting the DataSource and DataMember properties on the objectDataSource and letting the report execute my query.  All the examples I have found either perform data access in the DataSource object or pre-populate a collection in the constructor (like the List Bound report demo).  Any thoughts?
IvanY
Telerik team
 answered on 13 Jul 2012
1 answer
365 views
The documentation indicates that parameter values can be static:
"Parameters can contain single values or multiple values, use a static or query-based valid values list
Yet goes on to say
"To define available values for a parameter you need to setup the following nested properties:
 DataSource –

Is it possible to create static parameter values at design time?  (E.g. Y,N )
how?

Elian
Telerik team
 answered on 13 Jul 2012
1 answer
182 views
Hi,
i tried to add a multiple sorting to a table object, but it didnt worked the way it should.

Could you give me a short example how to add multiple sortings?

Thanks,
Michael
Elian
Telerik team
 answered on 13 Jul 2012
3 answers
1.9K+ views
I am new to Telerik. I have working code to create/export to PDF. How do I adapt this code to export to Excel? The PDF version just builds a string and inserts it into the body of the report.

Code is below, any help is greatly appreciated.

 

private Telerik.Reporting.Report GetPlainReport(bool showPageCountFooter = true)

{

Telerik.Reporting.

 

Report report = new Telerik.Reporting.Report();

report.PageSettings.Landscape =

 

false;

report.PageSettings.Margins.Bottom =

 

new Telerik.Reporting.Drawing.Unit(2.5D, Telerik.Reporting.Drawing.UnitType.Cm);

report.PageSettings.Margins.Left =

 

new Telerik.Reporting.Drawing.Unit(2.5D, Telerik.Reporting.Drawing.UnitType.Cm);

report.PageSettings.Margins.Right =

 

new Telerik.Reporting.Drawing.Unit(2.5D, Telerik.Reporting.Drawing.UnitType.Cm);

report.PageSettings.Margins.Top =

 

new Telerik.Reporting.Drawing.Unit(2.5D, Telerik.Reporting.Drawing.UnitType.Cm);

report.PageSettings.PaperKind = System.Drawing.Printing.

 

PaperKind.A4;

Telerik.Reporting.

 

PageHeaderSection header = new Telerik.Reporting.PageHeaderSection();

header.Height =

 

new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);

Telerik.Reporting.

 

TextBox txtTitle = new Telerik.Reporting.TextBox();

txtTitle.Location =

 

new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm));

txtTitle.Name =

 

"htmlTitle";

txtTitle.Style.Font.Bold =

 

true;

txtTitle.Style.Font.Name =

 

"Arial";

txtTitle.Style.Font.Size =

 

new Telerik.Reporting.Drawing.Unit(16D, Telerik.Reporting.Drawing.UnitType.Point);

txtTitle.Style.TextAlign = Telerik.Reporting.Drawing.

 

HorizontalAlign.Left;

txtTitle.Size =

 

new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(16D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm));

txtTitle.Value =

 

"{Parameters.Title.Value}";

header.Items.Add(txtTitle);

Telerik.Reporting.

 

DetailSection body = new Telerik.Reporting.DetailSection();

body.Height =

 

new Telerik.Reporting.Drawing.Unit(22.5D, Telerik.Reporting.Drawing.UnitType.Cm);

Telerik.Reporting.

 

HtmlTextBox htmlBody = new Telerik.Reporting.HtmlTextBox();

htmlBody.Location =

 

new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm));

htmlBody.Name =

 

"htmlBody";

htmlBody.Size =

 

new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(16D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(22.5D, Telerik.Reporting.Drawing.UnitType.Cm));

htmlBody.Value =

 

"{Parameters.Body.Value}";

body.Items.Add(htmlBody);

Telerik.Reporting.

 

PageFooterSection footer = new Telerik.Reporting.PageFooterSection();

footer.Height =

 

new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);

 

if (showPageCountFooter)

{

Telerik.Reporting.

 

TextBox txtFooter = new Telerik.Reporting.TextBox();

txtFooter.Location =

 

new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm));

txtFooter.Name =

 

"htmlFooter";

txtFooter.Style.TextAlign = Telerik.Reporting.Drawing.

 

HorizontalAlign.Right;

txtFooter.Size =

 

new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(16D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm));

txtFooter.Value =

 

"=PageNumber + ' / ' + PageCount";

footer.Items.Add(txtFooter);

}

report.Items.AddRange(

 

new Telerik.Reporting.ReportItemBase[] { header, body, footer });

report.ReportParameters.Add(

 

new Telerik.Reporting.ReportParameter("Title", Telerik.Reporting.ReportParameterType.String, null));

report.ReportParameters.Add(

 

new Telerik.Reporting.ReportParameter("Body", Telerik.Reporting.ReportParameterType.String, null));

 

return report;

}


Elian
Telerik team
 answered on 13 Jul 2012
0 answers
100 views
Hi,

   I am working on Telerik Reporting, i have created the report using CrossTab control. I am showing the report in report viewer. I am using Reporting Q2 2011 version is 5.1.11.928. I have created the report using crosstab wizard, the report contains more rows and columns when exporting to PDF border is not closed in fist page. Please refer the screen shot for this issue. Please help me solve this issue.

Thanks,
Nisha
Nisha
Top achievements
Rank 1
 asked on 13 Jul 2012
0 answers
140 views
Hi,
   
   I am working on Telerik Reporting, i have created the report using CrossTab control. I am showing the report in report viewer.
 I am using Reporting Q2 2011 version is 5.1.11.928. I have created the report using crosstab wizard, for setting banner i have place two picture box in page header. In one picture box i have uploaded the image and changed the docking=Fill, so it fills the page header fully, for second picture box i have uploaded logo and placed above the first picturebox. In design it is perfect when we exported to word , excel that logo moves down and the design is not proper. I have attached screen shots for this issue. Please help to resolve this problem.

Thanks,
Nisha
Nisha
Top achievements
Rank 1
 asked on 13 Jul 2012
0 answers
190 views
Hi,

    I am working on Telerik Reporting, i have created the report using CrossTab control. I am showing the report in report viewer. I am using Reporting Q2 2011 version is 5.1.11.928. I have created the report using crosstab wizard. It contains more number of rows and columns. In detail section(design1.jpeg) i have place the crosstab wizard while exporting to PDF, border is changing page by page. In first page(refer: page1.jpeg) found a space between page header and details in next pages(refer: page2.jpeg) crosstab moves upwards and it joins with page header. I need to display the space between page header and detail in all pages. I have attached both design screen and pdf screen shots. Is there any solution to solve this issue please help me asap.

Thanks,
Nisha


   
Nisha
Top achievements
Rank 1
 asked on 13 Jul 2012
3 answers
302 views
Hi,

I new in telerik report .

I was asked to evaluate whether telerik report suitable for our application and able to convert existing report written in crystal and ReportBuilder2012

I downloaded and installed the telerik report trial . my pc has mssql2008R2 and mssql2012 installed .

i try create a report using telerik designer (standalone) wizard . when execute query , the result show up but on the report when I click on preview , nothing show up . just a blank paper .

am i missing something ?

how do I convert crystal report ? I don't see any convert option in telerik designer?
Steve
Telerik team
 answered on 13 Jul 2012
2 answers
237 views
Hi there

I am creating a report at runtime and adding a AHREF tag to a htmltextbox, but when I run the code on the production server I get

An error has occurred while processing HtmlTextBox 'certNumberTextBox': '=' is an unexpected token. The expected token is ';'. Line 1, position 93 

The format of the URL is www.domain.com/page.aspx?cid=a4/2342/ad.1&code=000

Any idea why this would be happening?
Jako
Top achievements
Rank 1
 answered on 13 Jul 2012
1 answer
250 views
Hi,

We are using Telerik WebForms Reports, version 6.1.12.621.  The problem we are having is that when our reports are printed, or generated to an XPS file, the generated reports do not contain any checkboxes or vertical lines.  They do show, however, in the report viewer control in the browser.  I have included screen captures showing the checkboxes and lines appearing in the designer and when displayed in the report viewer, and also a screen capture illustrating them missing when the report is printed or generated to an xps file.  Horizontal lines, borders, etc seem to print fine.

Any suggestions would be greatly appreciated.

Thanks,
Kevin
IvanY
Telerik team
 answered on 12 Jul 2012
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?