Telerik Forums
Reporting Forum
5 answers
95 views
Hi,
       I am using Telerik reporting in my pages. I get an Script error in ie9, ie10 on loading a report viewer inside the radwindow as 'Array' is undefined. Can you please provide me a working solution






Thanks
Stef
Telerik team
 answered on 23 May 2013
3 answers
90 views
We are developing a reporting system for an enterprise web application.  The report definitions (*.trdx) are all being built using the stand alone Telerik Report Designer so there is no code behind pages associated with the definition files. One of the business requirements is to save sets of parameter values for each report.  I have devised a way to show just the parameters area of a report, but I am not able to access the values set by the user.  All the documentation and other forum threads state that I should be able to hook up listeners to the ReportDocument ItemDataBinding and ItemDataBound events.  I have done that, but the event handlers are not being triggered when a user sets a value and the report viewer refreshed the data.

Here is the setup:
  • A report viewer object is added to an .aspx page (C#).
  • In the code behind, the report definition file is loaded, deserialized and attached to the report viewer via the ReportSource        

   var reportDefinitionFile = Server.MapPath(
"~/app/reports/repository/rpt/" + _reportPath);
  
   var xmlSerializer =
new ReportXmlSerializer();
   reportDocument = (Telerik.Reporting.Report)xmlSerializer.Deserialize(reportDefinitionFile);
   var reportSource =
new InstanceReportSource();
   reportSource.ReportDocument = reportDocument;
   trdParameters.ReportSource = reportSource;

      trdParameters is the report viewer control.  reportDocument is a private variable at the Page level and has been hooked up the listener reportDocument_ItemDataBound:
protected override void OnInit(EventArgs e)
{
    reportDocument.ItemDataBound += new EventHandler(reportDocument_ItemDataBound);
 
    base.OnInit(e);
}
 
private void reportDocument_ItemDataBound(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.Report rpt = (Telerik.Reporting.Processing.Report)sender;
    var obj = rpt.Parameters;
}

When the page is called, the parameters are rendered properly and the report generates properly but event handler is never triggered. Any time a user changes a parameter, the report viewer makes an AJAX call to the Telerik reporting dll and I cannot find a way to intercept that.

I am using Q1 2013 version of Telerik Reporting.

Any ideas?
Unknown
Top achievements
Rank 1
 answered on 23 May 2013
3 answers
119 views
Hi there, this is the structure of my data
{int id, int ring, string phase} where id=1, 2, ..., 16, ring=1,2,3,4, phase = short string 

The report I want is shown on desired_report.gif

What you see in the boxes are
|=============================
| Sequence - {id}                               | <==== title of the box 
=============================
| Ring {ring}        |   {phase}               | <==== this section grows vertically (per id/sequence)
=============================

I tried doing something similar without much success all I've got is this report shown in havethis_report.gif
the layout of the report (design mode) is shown in layout_report.gif

the structure of the report is shown in explorer_report.gif

for the list lstDetailData I have the following :
row group expression: "(Field.Ids+Fields.Ring-2)%32"
column group expression: "(Field.Ids+Fields.Ring-2)/32"

What occurred to me is to hide the title every four elements like this:
            textBox4.Bindings.Add(new Binding("Visible", "= Fields.Ring = 1"));
            txtId.Bindings.Add(new Binding("Visible", "= Fields.Ring = 1"));

but you can still see some spaces left when that element is not visible, shown in almosthere_report.gif
my questions:

1) can this even be done using telerik reporting?
2) how do I make the space of a hidden object on a report also go away.?

regards and thanks in advance.
Wadigzon
Top achievements
Rank 1
 answered on 22 May 2013
3 answers
296 views
I have a page that produces a number of reports by booths (for a trade show)
a few booths (10 out of 200) need a subreport to be added
I tried adding the subreport when the reports are built - the control is added but the report itself does not appear
I moved my logic to the ItemDataBound event of the report selected and nothing appears
what am I doing wrong?
Private Sub VRSummaryStore_ItemDataBound(sender As Object, e As EventArgs)
    Dim srPowerBoys As SubReport
    Dim thisReport As InstanceReportSource
    Dim myFoot As Telerik.Reporting.ReportFooterSection
    Dim X_Unit, Y_Unit As Telerik.Reporting.Drawing.Unit
    Dim APoint, UPoint As Telerik.Reporting.Drawing.PointU
    Dim subReport As Reports.VRPowerBuys
    Dim dsSubReport As DataSet
    Dim BoothNumber As Integer
 
    myFoot = Me.ReportFooterSection1
    APoint = Me.srActualTotals.Location
 
    srPowerBoys = New SubReport
    srPowerBoys.Style.BackgroundColor = System.Drawing.Color.Chartreuse
    myFoot.Items.Add(srPowerBoys)
    srPowerBoys.Left = Me.srActualTotals.Left
    srPowerBoys.Top = APoint.Y + Me.srActualTotals.Height
    srPowerBoys.Size = Me.srActualTotals.Size
    thisReport = New InstanceReportSource
    subReport = New Reports.VRPowerBoys
    thisReport.ReportDocument = subReport
    BoothNumber = Me.Report.ReportParameters(0).Value
    dsSubReport = DataManager.GetDataSP("rpt_store_powerboys_show", BoothNumber.ToString)
    subReport.DataSource = dsSubReport
End Sub
Elliott
Top achievements
Rank 2
 answered on 22 May 2013
1 answer
193 views
Hello,
I am new to Telerik software so i need your help.I want to bind datatable to reportviewer on button click (button on aspx page). The data in the ReportViewer
should be updated based on textbox value on my aspx page.

1)I am using a stored procedure which takes two arguments of DateTime type and returns a datatable. I want to Bind this Datatable to ReportViewer.
Or
2) I want to rebind DataSource on my report based on parameters passed from aspx file (2 parameters of datetime type).

Help Please

Gimmik
Top achievements
Rank 1
 answered on 22 May 2013
1 answer
87 views
Can anyone tell me the coding to add text after a dataset? I want to keep it all in the same text box because of formatting issues. Here's my current coding = Fields.CTD. I want to be able to add the word "Cancer" after CTD so that my data set populates and then the work "Cancer" right after the dataset. I tried using a different text box, but the formatting is all screwed up when I do that. Thanks
Gimmik
Top achievements
Rank 1
 answered on 22 May 2013
1 answer
157 views
I am currently making a report that has images in the table, I have added a row where I merged all the cells together to house the PictureBox. I have selected ScaleProportional because we want to maintain the aspect ratio, however the image always appears centered. We want to have the image left justified but I can't make that happen. In the reports constructor I tried adding

pictureBox1.Docking = DockingStyle.Left;

but it didn't do anything. Is this even possible to do?
Stef
Telerik team
 answered on 22 May 2013
2 answers
103 views
hi friend, 
i need a help in chart Report.
i need to create a report with multiple chart , the chart creates at runtime as requested by the user.
i need to create report as attached file....
how to make it possible...give me a good solution...
thanks in advance.....

Stef
Telerik team
 answered on 22 May 2013
7 answers
968 views

I would like to run reports designed by the standalone designer from my application.
So far I have managed to load the report definition (.trdx file) and run it in the app.

What's the best way to specify the connection string dynamically from the application?
I did not find a pointer in the docs.
Changing the ConnectionString attribute on the SqlDataSource Node in the XML Document in memory would probably be an option, but is there a direct Telerik API for that?

I am confused a bit with the different options to set the Windows Forms Report Viewer ReportSource property:

If I use XmlReportSource to load a trdx file, I apparently do not get all the functionality of the Report object (DataSource, ReportParameters),

However, the following code seems to work:

// ReportDefinitionFile is the path to my .trdx file
 
var xmlSerializer = new ReportXmlSerializer();
var reportDocument = (Report)xmlSerializer.Deserialize(ReportDefinitionFile);
  
var reportSource = new InstanceReportSource();
reportSource.ReportDocument = reportDocument;
  
SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder();

.... // initialize connection string
 
 
SqlDataSource sds = (SqlDataSource)reportDocument.DataSource;
sds.ConnectionString = scsb.ConnectionString;
 
this.reportViewer1.ReportSource = reportSource;
this.reportViewer1.RefreshReport();



Regards
Erwin
Myth
Top achievements
Rank 1
 answered on 22 May 2013
3 answers
372 views
Hi there

I have report that has a frame background image, when I export the report to a PDF it works 100%, but it doesn't display correctly in the ReportViewer. I understand that this has something to do with it rendering as HTML?

Is there a way to either set the ReportViewer "view" as PDF? I just need the reportviewer to display it the same a PDF would look.

I would like to keep it in the ReportViewer as a client can first view/confirm before exporting to PDF.

Thank you.
IvanY
Telerik team
 answered on 22 May 2013
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
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?