Telerik Forums
Reporting Forum
12 answers
350 views
Hi!

I have page with the following controls:
A textbox
A submit button
A label
A ReportViewer

The page is using telerik ajax and is setup so that when a user clicks on the submit button, the label and the reportviewer is updated.
Now when the user clicks the submit button, the following code is run:
ReportViewer1.Report = new MyReport();
var printScript = String.Format("{0}.PrintReport();", ReportViewer1.ClientID);
   ScriptManager.RegisterStartupScript(this, this.GetType(), "ReportPrint", printScript, true);

The problem where is that the javascript will run before the ajax has rendered the reportviewer and that gives my an error.

So my question is, how can I print the report, using AJAX, when the reportviewer is inside a AJAX update panel?

Regards
Per

Stef
Telerik team
 answered on 29 Mar 2016
2 answers
230 views

Hello

 

I am hoping someone can shed some light on my issue of printing labels.  I have follwed the guide  - How to: Create Multi-Column Report - Across the Page and Then Down .  The output is repeating by the number of records returned. ie. 8 records, data is repeated 8 times

For test purposes we have an SQL recordset that returnes 8 records (for the test).

As part of the recordset we also return an incremental record number (as RowNumber) e.g

RowNumber     Data

3      Some Data

4      Some Data

5      Some data

etc

 

We have added a list item into the details section , the Row group grouping expression is set to = Fields.RowNumber / 3.

The Static grouping expression is set to = Fields.RowNumber % 3.

 

We then get the 8 records repeated 8 times.  It works as 3 across then down, just 8 times.

(incidentally we start the incremental count from 3 to end up with blank labels at the end of the report rather than within it)

 

What am I missing?

Hope that makes sense

Any assistance would be appreciated.

 

Thanks Andrew

Andrew
Top achievements
Rank 1
Iron
 answered on 28 Mar 2016
6 answers
621 views
Hi there.

I am using Telerik Reporting and I have a need that when a user selects multiple people from a RadGrid, I need to create a single report (for audit purposes) for each person selected. I am creating the individual pdf reports programmatically and saving them to disk etc just fine. Another requirement is to also create a "combined" pdf report that has all of the individual reports within it. This pdf would be the one presented to the user. So, I did some reading and it looks like the ReportBook  feature should be able to help me.

I have code that is like this (simplified):

 

ReportBook reportBook = new ReportBook();

 

reportBook.DocumentName =

"Combined";

 

 

foreach (selected person)
{
    // generate the pdf report by exporting directly to disk
    
    // Add the report to the report book
    reportBook.Reports.Add(report);
}

Now, I need to create another PDF of the combined report.

I am not sure how to accomplish this. The examples/help articles don't show that detail.

Can you help me out?

Thanks, Mike

P.S. - I am really starting to understand and like your product. I love the fact that you can do so much programmatically.

 

David
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 28 Mar 2016
2 answers
77 views

Hi,

 

I have a report in which I will execute a pagebreak if the content of a field is true. I have attached a picture for understanding what I mean.

 

How can I solve this?

Thanks

Andreas

Andreas
Top achievements
Rank 1
 answered on 28 Mar 2016
1 answer
155 views
Design with a line graph on a report.  Data source is stored proc with single parm.  Execute in DS displays data fine.  Report design shows data.  However, a Preview in Report Designer does not render;  it just keeps spinning.
Nasko
Telerik team
 answered on 28 Mar 2016
1 answer
157 views

Hi,

I m using HTML5 telerik reports. It was working fine. From last few days it suddenly started giving following error on runtime:

"Internal Server Error:
An error has occurred.
Attempting to deserialize an empty stream."

Need support for this.

Nasko
Telerik team
 answered on 28 Mar 2016
1 answer
130 views

I am looking for a report generator which will do something rather complex, and Telerik reporting looks like it can probably do what is needed, but I'd like to confirm.

For the sake of an example, presume I have a large order, with items that have a price, a quantity, and a line price. The descriptions may be big and there are many pages, perhaps 20 or so in the printout. Each page must have, at the bottom of the page, the sub-total for that page (adding all the line prices). This part is shown in the online invoice demonstration, so is indeed possible.

At the end of the report, the last page(s) should have the page numbers and their values, so:

page 1   $2,000

page 2   $3,202

page 3   $2,039

Now, I think that it should be possible for the page totals to be picked up in the ItemDataBound events, and perhaps added to a list somehow which is then picked up at the end to be fed into the final section of the report. Am I right? Is this viable, or is it pushing it too far? Can a report even have multiple sections so that the last section can be inserted (sort of like two reports in one?).

I appreciate any thoughts anyone might have. Thank you.

Katia
Telerik team
 answered on 25 Mar 2016
1 answer
1.3K+ views
I have seen the article on how to export to pdf without going through the viewer, but it does not seem to aply to a report book (it may just be me :))

Could I have an example where several reports are added to a report book and then the report book is sent directly to PDF?
Stef
Telerik team
 answered on 25 Mar 2016
1 answer
193 views

Hi All,

 

I'm using ReportViewer1.PrintReport() in javascript to print the report directly to printer. But when ever I call this method, printer dialogue comes and i have to choose a printer. I want to avoid this dialogue window and print directly to the printer. Is there any method for this?

 

Looking for your help.

Stef
Telerik team
 answered on 25 Mar 2016
1 answer
182 views

Hi

Im using the following code to print report viewer directly to the printer from client side.

 

In ASPX

<div style="display:none">
            <telerik:ReportViewer ID="ReportViewer1" runat="server" Height="105px" Width="693px">
            </telerik:ReportViewer>
</div> 

In ASPX.cs, on button click

Report1 report = new Report1();
string selectCommand = @"select EmployeeID,EmployeeName from master_employee";
string connectionString = "Data Source=STATIONXXX;Initial Catalog=abc;User Id=sa;Password=123";
Telerik.Reporting.SqlDataSource sqlDataSource = new Telerik.Reporting.SqlDataSource(connectionString, selectCommand);
report.DataSource = sqlDataSource;

ReportViewer1.Report = report;
string PrintScript = string.Format("{0}.PrintReport()", this.ReportViewer1.ClientID);
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Print", PrintScript, true);

 

 

But when i press print button i'm getting the following error

 

"Error printing the report: TypeError:toolbar.GetButtonByName is not a function"

 

Im using google chrome as browser.

 

Can any one help me on this?

Stef
Telerik team
 answered on 25 Mar 2016
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?