Telerik Forums
Reporting Forum
1 answer
218 views
Hello
when I export a report to pdf  , It automatically  shows page in  133% zoom rather than 100% one .
Can we change this kind of pre-settings of PDF rendering.
Also when it converts images of a reprort (such as charts ,banners ) into pdf ,images loose some resolution ,looks a bit blurred .Is there a way of handling  this problem ?

Thanks in advance.
Steve
Telerik team
 answered on 12 Jun 2009
1 answer
265 views

Can we create global objects so that we can reuse the variables in two or more subreports just like PageNumber or PageHeader.

 

Any help would be appreciated. Thanks

Steve
Telerik team
 answered on 12 Jun 2009
1 answer
169 views
Hi Telerik Team!

We have a method which exports a report to pdf file.

The problem is that generated file size is ~1MB (it's a simple PDF with logo and 3 or 4 text lines).

I read other post in this Forums and i see an answer about FontEmbedding but i can't configure this in my application.

My version of Telerik Reporting is Q2 2007 SP1 in a local application in C# 2.0

This is my method:

    Hashtable deviceInfo = new Hashtable();
            deviceInfo["FontEmbedding"] = "None";
            deviceInfo["DocumentAuthor"] = "Businet"; 

            byte[] reportBytes = Telerik.Reporting.Processing.ReportProcessor.Render(exportFormat, report, deviceInfo, out mimeType, out extension, out encoding);
            reportName += "." + extension;

            using (FileStream fs = new FileStream(reportsLocation + reportName, FileMode.Create))
            {
                fs.Write(reportBytes, 0, reportBytes.Length);
            }

I think that deviceInfo is not applied because the generated file not have "Author" property.

Thanks for advance.
Steve
Telerik team
 answered on 12 Jun 2009
1 answer
91 views
Scenario:

I have a report.  When it is run it only displays records with a boolean flag != 1.  After it runs, it needs to flip the flag to 1 so it won't show again.


Attempted solutions:

  1. Make the report window modal, and when it is closed, update the database setting the flag to 1 for all records in the report.  This worked perfectly except users on terminal services would leave the report open, get timed out, records don't get updated, they have to reopen/reprint the report to fix it.
  2. Make the VB form that contains the report set the flags in the OnPreRender, this happens too soon and the data is not there when the report is displayed.  Tried OnPreRenderComplete as well.  Also tried the reportviewer object's prerender... all of these happened too early.
  3. Add the updating code to the select query, so that we get the records we need and THEN immediately update the boolean flag.  This I feel is the proper solution unless there is a better one I've not thought of yet; however when the print dialog is displayed, evidently it makes another trip to the database and runs the stored proc again... therefore the printed report is blank.  I feel this is either just the default behavior or it's because I'm using the NeedsDataSource event to run the storedproc/fill the data set.

Request:

So my question would be simply is there any way in the report obj or in the typed dataset it pulls from, to cache the data and make sure the results in the preview/print window match the initial html preview?  If not, is there a way to make it not render the html preview at all and instead have the first request for data be the print dialog?
Steve
Telerik team
 answered on 12 Jun 2009
3 answers
182 views
Hello everybody,

I'm wondering if Is there anyone who can help me with this one.

Basically, I have a report organized as follows:

- Page Header section;
- Report Header Section
- Detail section (empty);
- Report Footer Section;

In the Page Header, I have a fixed size header, with several fields and static info;
In the Report Header I have a crosstab containing dynamic info coming from DataBase;
In the detail, I have nothing.
In the Report Footer (or Page Footer, I still don't know), I'll have info identical to the one on the Page Header.

What Im trying to accomplish is to make sure that my crosstab is always of thew same width as the shape delimiting the info on the Page Header.

I've tried almost every event of the Report to no avail... How can I make this thing work?

Thanks!
Stargazer
Top achievements
Rank 2
 answered on 12 Jun 2009
1 answer
113 views
Hi. I am currently experimenting (newbie) with Telerik reports in VS 2008. I have programmatically bound a SQLAdapter object to a datasource of a Telerik report. The next question becomes how do I display the data on the report now. Do I need to somehow programmatically tap into the datasource and create the detail fields.? When I go to preview the report in the Report Design of Visual Studio iget an error that says "Exception has been thrown by target of invocation. Object reference not set to an instance of an object" . The end goal here is to display this in a web report viewer on an .aspx page but I am pretty sure i need to get the report itself working first. Any direction one could provide would be greatly appreciated. Below is my code to bind the report datasource just as a reference. The report currently does infact build. Any help would be greatly appreciated.

--Jason

 

public Report1()

 

{

 

/// <summary>

 

 

/// Required for telerik Reporting designer support

 

 

/// </summary>

 

InitializeComponent();

 

 

SqlConnection connSomsys = new SqlConnection(ConfigurationManager.ConnectionStrings["connSomsys"].ConnectionString);

 

 

SqlCommand sqlSelectCommand1;

 

 

sqlSelectCommand1 =

new SqlCommand("sprocgetorders", connSomsys);

 

sqlSelectCommand1.CommandType =

CommandType.StoredProcedure;

 

 

SqlDataAdapter adap = new SqlDataAdapter(sqlSelectCommand1);

 

 

this.DataSource = adap;

 

 

//

 

 

// TODO: Add any constructor code after InitializeComponent call

 

 

//

 

}

Hrisi
Telerik team
 answered on 12 Jun 2009
10 answers
1.1K+ views
Dear support,

I have a report in WinForm environment. After the report object was built and it was loaded into Reportviewer by:
    Dim frm As New Reportviewer(report)
    frm.Show(Me)

It takes nearly 3 mins to generate 140 pages to screen and when I click "export to pdf" from "Reportviewer", it takes nearly another 3 mins. The speed is not too slow, but SLOW. I assume it only takes 5seconds because the process is in RAM.

Any enhancement is planned in this area.
My version is 2.0.1.0.

Benson.
Steve
Telerik team
 answered on 12 Jun 2009
2 answers
150 views
Hi, if I have a stored procedure that could return either a number or rows or no rows for a given report parameter, but if the stored proc returns no rows can I update the textbox to show either "No rows found" or with the data returned from the stored procedure.

I don't think I can use the IsNull because there are no rows returned for this particular report parameter. When in the textbox I have =Fields.ColumnName I get an error saying "index is out of range" when no rows are returned, otherwise if data is returned it shows the field ok. Is there a solution for this ?

Thanks a lot,

Pete.
Pete
Top achievements
Rank 1
 answered on 12 Jun 2009
1 answer
85 views
All the examples and videos, talk about best practice and creating the reports in a separate class file.

All I want to do is create a few reports in an existing web app and run drive the reports from a stored proc. Are there any examples on how to do this.

Andy
Steve
Telerik team
 answered on 12 Jun 2009
1 answer
228 views
Hi,

I am using the latest version of Reporting (as of Jun6), I get this exception when tryign the view a report in the ReportVeiwer control. This is all windos based.
I have a report in a class library, the business object in another class library, and the executing Winforms app with the viewer in it.

Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Telerik.Reporting.ExcelRendering.Excel97.ExcelReport.resources" was correctly embedded or linked into assembly "Telerik.Reporting.Processing" at compile time, or that all the satellite assemblies required are loadable and fully signed.

I can run sample apps from Telerik without problems, and I am using business object from one of your samples (Master-Detail sample from an earlier forum thread). That works fine when I create a new solution with the same structure, but does not work when using it in my existing solution.

Any idea why this can be?

I made sure all the references are there. But even the simplest, non-nested business object cannot be rendered into a report.

RptOrders

orders = new ObjDataSourceMasterDetail.Reports.RptOrders();

 

 

orders.DataSource = Order.CreateOrderList(); //taken from sample provided by Telerik

 

 

this.reportViewer1.Report = orders;

 

 

reportViewer1.RefreshReport(); //exception occurs after call to RefreshReport()

 


The report itself is simple. It has one textbox with "=Fields.OrderID" etc. and all that gets rendered correctly, but only after a series of exceptions come up, starting with the MissingManifestResourceException, then this is followed by a ArgumentOutOfRangeException, which is followed by a TargetInvocationException.
No stacktraces are available. In all 3 cases the stacktrace has only one less than helful line. There are no inner exceptions either.
I cannot narrow it down to a component or anything else.

I also made sure I have all the references that the sample project has, too. The sample works, renders the report perfectly, my my app doesn't.

Help!!!
Steve
Telerik team
 answered on 12 Jun 2009
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?