Telerik Forums
Reporting Forum
2 answers
152 views
How to create the report in the controller without the aspx?
I made the following code below but I am not getting html print screen

public ActionResult test() {          
           var instanceReportSource            = new Telerik.Reporting.InstanceReportSource();
           instanceReportSource.ReportDocument = new myReport();
             
           ReportViewer report = new ReportViewer();
           report.ID           = "Teste";
           report.Width        = 100;
           report.ReportSource = instanceReportSource;
 
return ??
}
Diego
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
299 views
Hi. 

I bind against a ObjectDataSource that expose boolean properties that shall decide which of three versions of a particular table I display.

The detail section of the report is pretty large and this "polymorphic" table is a small part of it.

I bind the table Datasource against the "ReportItem.DataObject" property and its Visible attribute against the associated boolean.

However, these tables differ in size, and I would like to avoid the whitespace.

I could stack them on top of eachother (z order) in a panel that has "CanShrink" set to true, but this makes it hard to edit the report in the designer.

Is there any solution where:
  • I work with them in the designer, 
  • only the ones that evaluates to Visible=true will be displayed
  • no white space left after the ones that evaluates to Visible=false.
Peter
Telerik team
 answered on 01 Jul 2013
3 answers
439 views
For each row in a detail section, I need the field value from the same field in the previous row to calculate the difference. Is this possible and if yes, how?

:o)
Jon Ivar
Gaurav
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
850 views
I'm wondering if anyone can give me any pointers on how to add a custom font to my reports. The reports will be rendered as PDF. I have the font installed locally but want to be able to use it in my reports. Thanks!
Peter
Telerik team
 answered on 28 Jun 2013
1 answer
404 views
I'm really having a tough time getting the speed of my PDF exports down to something reasonable. The reports I'm generating are not really summary or aggregation reports, they're "everything" reports with a great deal of text. Report page counts can be tens, hundreds, or even thousands-- alas, the requirements are fixed. The export is so slow that I've had to run the ReportProcessor in a Windows Service to do it all asynchronously. Within the report designer's preview tab in Visual Studio the generation seems to take seconds instead of minutes or hours.

To anyone reading this, I'd appreciate some tips on formatting my reports to improve speed of export to PDF.
Squall
Top achievements
Rank 1
 answered on 28 Jun 2013
1 answer
174 views
this.Fields["DeliveryTermsID"].Value.Tostring()

does not work "Reports.TelSubRptContract does not contain a definition for 'Fields'

so what would work?  I am trying to pass values to a txtbox on the subreport from the datasource that it has been given.
Squall
Top achievements
Rank 1
 answered on 28 Jun 2013
2 answers
265 views
This is a weird one.  I have an ASP.Net page with the report viewer control.  The report is in a separate dll as per best practice recommendations.  When the page comes up, the report area is blank.  But, if I export the report to PDF, the report contents are there as expected.  What is going on with this? 

Clicking the Preview or refresh buttons does not help.

This is the code in the viewer page (the session variable does have a value and it comes in correctly:
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    'If Not IsPostBack Then
    Dim report1 As New PMP2Reports.DocumentsReviewed
    Dim objSession As Object
 
    objSession = Session("subIdx")
    If Not objSession Is Nothing Then
        report1.ReportParameters("subIdx").Value = objSession
    End If
 
 
    ReportViewer1.Report = report1
    ReportViewer1.RefreshReport()
    ' End If
 
End Sub


VS 2010, Reporting 2012 Q1

Thanks.
Jon_BCV
Top achievements
Rank 1
 answered on 27 Jun 2013
3 answers
138 views

Hi. This is probably an easy question for somebody to answer but it is driving a noobie like me nuts tonight. I have a report that has 3 parameters (date_start, date_end, worker). I set up the parameters as usual and assigned some default values to them.   I have some tables that use a sqldatasource to  display some data based on those parameters. This works fine. I have absolutley no isues with the tables displayign data using the parameters

What I am trying to do is use some code behind (presumably in itemdatabound event) to do a calculation and display some text in a textbox based on the number of days between start and end date parameters. I can get this calculated data to display. but it always displays values based on the default value of the parameters and not what is selected in the dropdowns for the parameters. if i clear the default values from the parameters, the report errors out because it thinks the default values for the dates are blank or null.
 
Does the itemdatabound event fire before the parameters are available to use and calculate against?

What should I be doing?
Peter
Telerik team
 answered on 27 Jun 2013
3 answers
236 views
I have an existing report that I am working with. The functional request I have is to suppress the automatic page break that occurs when the third group starts to render.

There are 4 groups that are built dynamically. Each group has a crosstab. The first two groups/crosstabs are fairly small and together they take up 25% of the page height. The third group takes up about 90% of the page height and as such defaults it's starting point as the top of the next page.

My client has asked that I suppress this functionality and force the group to start in line with the previous group and then break to another page in the event it will not fit. In some instances I have examples where it takes up 150% of the page space and in those cases it does start right after group#2 and spills onto the next page repeating the headers as expected. 

How can I force this behavior every time?
 
I have set the KeepTogether property to false in TableGroup and CrossTab objects but to no avail.

Are there other properties I need to set in order to insure the desired behavior occurs?
Stef
Telerik team
 answered on 27 Jun 2013
3 answers
208 views
Hi, I have the following problem with the Report Viewer for WPF control . I read the HTML code returned by 'Render' metod next i want to set this code to the reportviewewr control , How can I do it ??

This metdo that i use to get HTML code:

 Dictionary<string, object> lParameters = new Dictionary<string, object>();
 lParameters.Add("IDKON", 101);
var lResult = ReportServiceContext.I.Render("HTML", lRaporty[0].FullName, null, lParameters);

 if (lResult.Error == null)
{
       sring str = System.Text.Encoding.Default.GetString(lResult.DocumentBytes);
 }

Thank for help.

Gregor
Squall
Top achievements
Rank 1
 answered on 27 Jun 2013
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?