Telerik Forums
Reporting Forum
1 answer
235 views

Hi

 

How do I insert a 600 x 241 rectangle into a report header programmatically?

I've tried:

var myReport = new Report();
var header = new ReportHeaderSection();
header.Items.Add(new Shape
{
    ShapeType = new PolygonShape(4, 45, 0) { Bounds = RectangleF.FromLTRB(0, 225, 600, 466) },
    Size = new SizeU(Unit.Pixel(600), Unit.Pixel(241)),
    Location = new PointU(Unit.Pixel(0), Unit.Pixel(225)),
    Style = { Color = Color.DarkGray, LineWidth = Unit.Pixel(1) }
});
myReport.Items.Add(header);

But all I get is a square. Why isn't it expanding to a rectangle?

I've also tried using an ellipse (and got a circle funnily enough). The output doesn't change if I leave out the Bounds either.

Jeremy
Top achievements
Rank 1
 answered on 28 Apr 2016
1 answer
394 views

Hi,

I've been trying to set a specific parameters visible property based on another parameters value.

I have a boolean parameter that allows the displaying of more data in the report.

I have a 2nd boolean parameter that is hidden. If set to false the 1st bool parameters visible property to should then be set to false.

At the point of construction of the report, I check both 

 this.Report.ReportParameters["IsParamVisible"];

 this.ReportParameters["IsParamVisible"];

but the values are never set at that point so they do nothing.

How do I do this?

I'm using Telerik Reporting Q2 2015

 

Cheers

Katia
Telerik team
 answered on 27 Apr 2016
1 answer
376 views

Hello,

I have created a simple report using the standalone report designer and saved it as a .trdx file.
Here is my code to generate a pdf file:

Reporting.Report report = new Reporting.Report();
Reporting.XmlReportSource xmlReportSource = new Reporting.XmlReportSource();

// simple text box (Test2) in a report header

xmlReportSource.Xml = @"<?xml version='1.0' encoding='utf-8'?>
<Report Width='6.5in' Name='Report2' xmlns='http://schemas.telerik.com/reporting/2012/3.7'>
  <Items>
    <PageHeaderSection Height='0.200039307276408in' Name='pageHeaderSection1' />
    <DetailSection Height='0.299960772196452in' Name='detailSection1' />
    <PageFooterSection Height='1in' Name='pageFooterSection1' />
    <ReportHeaderSection Height='1in' Name='reportHeaderSection1'>
      <Items>
        <TextBox Width='1.20000016689301in' Height='0.19999997317791in' Left='2.64583333333333in' Top='0.395833333333333in' Value='Test2' Name='textBox1' />
      </Items>
    </ReportHeaderSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left='2pt' Right='2pt' />
      </Style>
      <Selectors>
        <TypeSelector Type='TextItemBase' />
        <TypeSelector Type='HtmlTextBox' />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind='Letter' Landscape='False' ColumnCount='1' ColumnSpacing='0in'>
      <Margins>
        <MarginsU Left='1in' Right='1in' Top='1in' Bottom='1in' />
      </Margins>
    </PageSettings>
  </PageSettings>
</Report>";
report.DataSource = xmlReportSource;
Processing.ReportProcessor reportProcessor = new Processing.ReportProcessor();
Reporting.InstanceReportSource instanceReportSource = new Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report;
File.WriteAllBytes(fileName, reportProcessor.RenderReport("PDF", instanceReportSource, null).DocumentBytes);

File created successfully, but it's empty, althogh report designer previews report properly.
What am I doing wrong?
I use Telerik.Reporting, Version=8.2.14.1222
Thanks in advance
Michael

Katia
Telerik team
 answered on 27 Apr 2016
1 answer
381 views

Hi,

I'm using Telerik 2013 Q2 (for .NET Windows).

I'm trying to generate a Dynamic Report, where the Columns are getting generated at run time.

When I use the code mentioned in the below link for grouping, the report shows only the first row of each group!!!

http://docs.telerik.com/reporting/data-items-how-to-add-groups-to-table-item-and-crosstab-item


Telerik.Reporting.TableGroup group1 = new Telerik.Reporting.TableGroup();

group1.Name = "Col1";
group1.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.Col1"));


Why it is not showing all the rows of each group???

Kindly let me know.

with regards,
Krish TS

Stef
Telerik team
 answered on 27 Apr 2016
7 answers
640 views

Hi,

I recently started working with Telerik Reports and looks good.

Currently I'm working on Windows .NET application and need to create a fully dynamic simple report.

The report query varies based on the user selection on the windows application (report name, database table name, db columns, db condition, db grouping columns).

Based on the above selection, the query gets built dynamically (kind of a query builder tool).

This query result should be dynamically populated in the Telerik Report.

How can I acheive the Telerik report to handle these kind of dynamic queries?

I came across multiple forums asking for similar kind of question but I'm getting lost with multiple replies.

Kindly help on what is the clear way for doing this (with db column grouping too)? with any sample attachment please.

with regards,

Krish TS

Stef
Telerik team
 answered on 27 Apr 2016
3 answers
139 views

Hi

As the title says, your ssl certificate seems to have expired yesterday and the report viewer isn't working anymore therefore.
Example: GET https://kendo.cdn.telerik.com/2013.2.918/js/kendo.all.min.js net::ERR_INSECURE_RESPONSE

Our customers already noticed, please refresh.

Regards

Stef
Telerik team
 answered on 27 Apr 2016
3 answers
1.4K+ views
In my report I have used textboxes with "Fields" property to dynamically bind the data using CSV data sources. But in these text boxes I need to use line breaks/new lines using only one Fielld. For example I should be able to make csv field as "Janitha \n Silva" and in text box automatically new line should be added. I know that this can be done by using htmltextboxes. But I need to know is there any way to do this by using only textboxes, not htmltextboxes. 
Katia
Telerik team
 answered on 27 Apr 2016
1 answer
216 views

Hello. I have created a report using the Standalone Designer. I am able to display the report in an MVC view using an HTML5 Report Viewer but I have not been able to display data using ObjectDataSource and an in-memory business object.

I found this post by Stef on the forums (16 Jul 2014):
“The HTML5 Report Viewer and the Reporting REST service does not use the MVC concept. Thus if you have a model containing data or other information required in your reports, you need to implement a logic to access that model in the reports' controller e.g. to store the data and access it by key in the service's resolver, or to modify the reports to use such data source component, that wraps a data retrieval method having access to that model.”

¿Could you please elaborate how this is done?

The post continues: “… A demo of a report that uses a custom data retrieval method is available in the local examples under C:\Program Files (x86)\Telerik\Reporting Q2 2014\Examples\CSharp\ReportLibrary\DataBinding. The ListBoundReport uses an ObjectDataSource to retrieve data from a custom business object. This business object can be modified anywhere in the application, when the report is requested its ObjectDataSource will search for the assigned data retrieval method and will get the data.”

I have reviewed the example but I still don’t get how it works. The objectDataSource1 has DataSource assigned but no DataMember assigned. Shouldn’t the DataMember property contain the data retrieval method name mentioned in Stef’s post to get the data? In any case, how does it know what instance of the class should be used to retrieve the data from? Let’s say I have a Product class and there are 2 instances of this class: productA and productB, How do I tell ObjectDataSource to use product for instance?

Thank you very much in advanced,
Humberto

Stef
Telerik team
 answered on 25 Apr 2016
10 answers
606 views
Can someone help me with code to put inside my Win Form vb.net that will allow me to pass a Parameter to my Q1 2010 report that will affect the SQL WHERE Clause?  I am creating a Purchase Order Report and need to pass the report the PO Number that the report needs to generate. 

This has to be the simpliest of all report questions and I fill dumb for asking but I can't find any help on telerik website.  I have spent hours looking. 

Thanks!
Stef
Telerik team
 answered on 25 Apr 2016
5 answers
449 views
Is there a way to disable those warning icons that appear on the corner of an element when 2 or more elements overlap ?

Stef
Telerik team
 answered on 25 Apr 2016
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?