Telerik Forums
Reporting Forum
3 answers
327 views

Hi All,

 I have been using report viewer from past many months with textbox layout for detail section.

Recently  I switched from textbox layout to Table layout for detail section owing to issues like anchoring etc.

Now, I am facing a big issue of pagination where in all the data of the report is getting displayed on a single page.

There was no such issue with textbox layout.

Any help shall be appreciated.

 

Regards,

Anurag

Nasko
Telerik team
 answered on 17 Sep 2015
2 answers
105 views

Created a report in the standalone designer and need to utilize it form within Visual Studio.  I have a parameter in both the SQL query and a report parameter, both named Cust_ID.

 

In trying to utilize the uriReportSource, as described in other forum posts, I get an error message as seen in the attached screenshot.

The statement.trdx is in the same directory as my view_statement.aspx page that is trying to render it within the rptstatement viewer.

This is my code:

Public Class view_statement
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        If Not IsPostBack Then
            Dim report As New Telerik.Reporting.UriReportSource()
            report.Uri = "statement.trdx"
            If Request("Cust_ID") IsNot Nothing Then
                Dim CustID As Integer = 0
                If Integer.TryParse(Request("Cust_ID").ToString(), CustID) Then
                    report.Parameters.Add(New Telerik.Reporting.Parameter("Cust_ID", CustID))
                End If
            End If
            rptStatement.ReportSource = report
        End If
 
    End Sub
 
End Class

 

Where am I going wrong?

Thank you,

David

David
Top achievements
Rank 1
 answered on 16 Sep 2015
1 answer
382 views

My site is deployed to IIS and is hosting the HTML5 ReportViewer. When accessing the ServiceURL over HTTP everything is working. When access the ServiceURL over HTTPS I'm getting an error "CANNOT POST /myreports/api/reports/clients".

Am I missing a step here ?

BTW - My site is a NodeJS site, hosted on IISNode, with an Angular front-end.

Thanks,

Ciaran

 

Stef
Telerik team
 answered on 16 Sep 2015
4 answers
1.4K+ views
I recently downloaded and installed the Telerik Reporting solution for a large project I am creating. I have created a report with two subreports. My datasource for the master report is a business object (WorkOrder). The datasource for the two subreports is a SqlDataSource. An abbreviated version of the business objects are shown below.
[Serializable]
public class WorkOrder
{
    public long WorkOrderId { get; set; }
    public virtual ICollection<WorkOrderItem> WorkOrderItems { get; set; }
}
  
[Serializable]
public class WorkOrderItem
{
    public long WorkOrderItemId { get; set; }
    public long WorkOrderId { get; set; }
    public int Type { get; set; }
}

Each subreport selects from the table WorkOrderItems. The subreport that does not repeat records has a select statement of

SELECT * FROM WorkOrderItems
WHERE (Type = 2)
ORDER BY StartDate

The subreport that repeats has a select statement of

SELECT * FROM WorkOrderItems
WHERE (Type = 1 OR Type = 3) AND (Quantity > 0)
ORDER BY Type DESC

The subreport contains a table that lists all WorkOrderItems. If there are 5 items in the query, the subreport is displayed 5 times.  If there are 2 items, the subreport is displayed 2 times. I can tell the subreport is being called multiple times because I get the complete header. Also, I get an extra record in the table that contains no data.

This is a huge project and I can post some code if needed, but it would take quite a bit of work to pare it down. And then who knows if the error will disappear or not.

This is all being used in an MVC project to show the report as a PDF to the user.  Here is the code I am using to generate the report.

WorkOrder workOrder = Repository.WorkOrderByKey(id);
ReportWorkOrder report = new ReportWorkOrder();
report.DataSource = workOrder;
 
ReportProcessor reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport("PDF", report, null);
return File(result.DocumentBytes, "application/pdf", "WorkOrder.pdf");

Any help would be greatly appreciated.

Thanks


Stef
Telerik team
 answered on 16 Sep 2015
1 answer
666 views

I would like to set the Datasource of my report to a business object (ObjectDataSource) that has all of it's data already populated.  ie. when the report requests the data, it does not need to go out to any datastore to retrieve it, the object is already initialized with the data it requires.

I have a class with a method that returns a list of objects.

    

public class SummaryReportData
{
   public List<SummaryData> RetrieveData( )
   {
      return SummaryDataList;
   }          
   public List<SummaryData> SummaryDataList { get; set; }  
}

 

When I am launching my report, I am retrieving the data I would like to display from my data service, and setting it on the object that the report will be requesting the data from.   Like so: 

var report = new MonthlySummaryReport();
             
var dataObject = new SummaryReportData();
dataObject.SummaryDataList = someDataService.GetSummaryReportData(100);
report.DataSource = dataObject;
 
ReportToDisplay = new InstanceReportSource();
ReportToDisplay.ReportDocument = report;

 (this is a wpf application, so I am databinding the 'ReportToDisplay' report source to the viewer.  This works as expected)

I then have the report setup to use an ObjectDataSource, Business Object set to "SummaryReportData", and the DataMember is set to "RetrieveData".

What ends up happening is, even though I have pre-initialized the SummaryReportData object with my data, when the report renders it is creating a new instance of that object, calling it's constructor, and then calling the "RetrieveData" method, which returns an empty list.

How do I get the report to use the object instance I am supplying it, instead of recreating it when it launches?

jeff
Top achievements
Rank 1
 answered on 15 Sep 2015
1 answer
701 views

I need to be able to set the line height for content within a multiline textbox.  There does not seem to be a setting for this.  Is it possible through a style, or other means?

See attached screenshots for samples (Wrong.png is what I can currently do in a Telerik Report, and Target.png is what I would like it to look like).

Thank you,
Alex

Stef
Telerik team
 answered on 14 Sep 2015
1 answer
225 views

I need to be able to set the width of the bars, within my report.  In the attached screenshot, you'll see bars that are too narrow.  I'd like to make them as wide as each column would allow, with padding or margin on either side from keeping them from colliding with one another.

The first screen shot is what I was able to produce (telerik-version.png)

The second, is what I would like to produce (target.png).  

 Any help is greatly appreciated!

Regards,
Alex

Nasko
Telerik team
 answered on 14 Sep 2015
1 answer
86 views

We are using Telerik Reporting to generate pdfs on our site.  Everything works as expected for days at a time, then suddenly stops working for all users. When we restart the app pool it starts working again. We are using Q2 2013 SP1 of Telerik Reporting. Any suggestions? (other than upgrading unless you know that this issue was addressed in an update) Here is the error stack:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Telerik.Reporting.Processing.ItemFactory.ResolveRuntimeItemType(Type t)
   at Telerik.Reporting.Processing.ItemFactory.Create(Object itemDef)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(ReportSource reportSource, IRenderingContext processingContext)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(ReportSource reportSource, Hashtable deviceInfo, IRenderingContext processingContext)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo)

Stef
Telerik team
 answered on 12 Sep 2015
1 answer
96 views
I am facing issue of sending additional values from html5 javascript report viewer to asp.net web api. I just want to know, how to send additional parameters from html5 javascript reportviewer to asp.net web api and how to read the same at server in c#.
Stef
Telerik team
 answered on 12 Sep 2015
1 answer
489 views

I am usinh HTML5 Telerik Report Viewer to display reports uisng ReportBook feature. I have only one parameter which is appearing on the right hand side of the report viewer as  a combo box. As I don't need multiple selection, I want to display this as a dropdown and on the top of the report viewer.

 This is exactly how it appears ii ASP.Net ReportViewer Control but with Html5 reportviewer its completely different. Will I be able to customize this easily ?

Stef
Telerik team
 answered on 12 Sep 2015
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?