Telerik Forums
Reporting Forum
1 answer
222 views
Hi there.

I had a PDF report working fine a bit ago and it stopped working and I think the only thing that changed was the database. One of my co-workers did a bunch of cleanup on his local version of the db, made a backup and I used that backup on my db now.

Anyway, that may or may not be the problem and I am looking for ideas.

A few important things to note about my report:

I am using a stored procedure, so I am manually making that binding happen in the code behind:

 

public My_Report()

 

{

InitializeComponent();

 

this.DataSource = null;

 

 

this.NeedDataSource += new System.EventHandler(this.My_Report_NeedDataSource);

 

}

 

private void My_Report_NeedDataSource(object sender, System.EventArgs e)

 

{

 

this.sqlConnection1.ConnectionString = ConfigurationManager.ConnectionStrings["MyDataContext"].ConnectionString;

 

 

 

//Transfer the ReportParameter value to the parameter of the select command

 

 

this.sqlDataAdapter1.SelectCommand.Parameters["@PersonID"].Value = this.ReportParameters["PersonId"].Value;

 

 

this.sqlDataAdapter1.SelectCommand.Parameters["@OperatorID"].Value = this.ReportParameters["OperatorId"].Value;

 

 

//Take the Telerik.Reporting.Processing.Report instance and set the adapter as it's DataSource

 

Telerik.Reporting.Processing.

Report report = (Telerik.Reporting.Processing.Report)sender;

 

report.DataSource =

this.sqlDataAdapter1;

 

 

// set the table datasource as well

 

table1.DataSource = report.DataSource;

 

// get the picture paths for the person and the company logo

 

pbPerson.Value =

this.ReportParameters["PersonPicturePath"].Value;

 

pbContractor.Value =

this.ReportParameters["ContractorPicturePath"].Value;

 

pbOperator.Value =

this.ReportParameters["OperatorPicturePath"].Value;

 

}

}

Also, I am creating the pdf and saving it to the file system, then opening the pdf as content in my page. Here is how I am save the pdf report to the file system:

 

 

void SaveReport(Telerik.Reporting.Report report, string fileName)

 

{

 

ReportProcessor reportProcessor = new ReportProcessor();

 

 

RenderingResult result = reportProcessor.RenderReport("PDF", report, null);

 

 

using (FileStream fs = new FileStream(fileName, FileMode.Create))

 

{

fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);

}

}

Then, my pdf shows as embedded content in my aspx page like this:

 

 

<EMBED id="showPDF" runat="server" type="application/pdf" width="750" height="550"></EMBED>

A bit more info:

I am able to run the sproc standalone from inside sql-server management studio with no problems. Also, a pdf report does get created, but it only has header information. The detail section which has the table based on the sproc and a picture box is simply blank.

Anyway, all of this was working in the very recent past and is not working now.

Any ideas on why this is happening would be greatly appreciated!

Mike

 

Michael Love
Top achievements
Rank 1
 answered on 30 Oct 2009
1 answer
86 views
Hi

The default method for getting a value from  the datasource to the report is with =Fields.Datafield.

This assumes Table(0). If I have multiple selects returning multiple tables how to I get to these data items.

Andy
Steve
Telerik team
 answered on 29 Oct 2009
2 answers
185 views
Hi,
I need to localize my reports for Swedish and English.
I have read the article: http://www.telerik.com/help/reporting/advanced-localizing-reports.html but I don't understand how for example the column "Birth date" know what field in the resx file to pick.

If I have for example name/value pair in resx file:
Label_BirthDate     "Birth date"

Then I need to set Label_BirthDate on the textbox in the report, right? So, how do I do that?

Regards,
Mattias
Steve
Telerik team
 answered on 29 Oct 2009
1 answer
211 views

We are working on a telerik controls based project in which we have to generate a report and export it to a PDF format.

Everything is working fine and I am getting a pop-up the moment I click on ExportToPdf button. It asks to open, save or cancel. Save is working but if I select Open I am getting the following error.

Adobe Reader could not open 'RadGrid Export[2].pdf' because it is either not a supported file type or because the file has been damaged.

When I googled I found few links which says to download latest dlls’ which also is not working.

Any kind of help is appreciated.

Daniel
Telerik team
 answered on 29 Oct 2009
3 answers
91 views
Hello everyone,

First of all I would like to say Hi. I am new one on the forum and I must say I am very impress about Telerik product.

I am a new Developer in our Company and I have been asked to take care of Reports generation for our Web page.
When I try to open any report template in Design mode I receive error message:

[A]Telerik.Reporting.Report cannot be cast to [B]Telerik.Reporting.Report. Type A originates from 'Telerik.Reporting, Version=2.5.8.519, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' in the context 'LoadNeither' at location 'C:\Documents and Settings\michal.zubek\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies\s1-ldctp01\Telerik.Reporting.dll'. Type B originates from 'Telerik.Reporting, Version=2.5.8.519, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' in the context 'LoadFrom' at location 'C:\Projects\VS2008\AshWebPdfClasses\AshWebPdfClasses\bin\Telerik.Reporting.dll'.


Do you know how to correct this issue?

Thank you very much for your help.
Michal
Top achievements
Rank 1
 answered on 29 Oct 2009
1 answer
97 views
Hello,

          I am using nested grid in my application.
          I required same functionality as shown in telerik Grid example:


         Its working fine if i use same example in my application,
         But I have used RadDock in my page.
         so, if i keep radgrid inside RadDock, it does not collapse & also paging is not working properly.

          If i remove dock control & keep RadGrid Seperate outside of RadDock, it works perfectly alright.


Please Reply me,



Thanks  & Regards
Kunal




Pero
Telerik team
 answered on 29 Oct 2009
1 answer
73 views
Hello,

         I am using Rad Editor in my application. When i apply skin = ''Default'' it displays proper Rad Editor.
         But,
               When i apply skin = "Office2007", Rad Editor display one horizontal line without any controls next to all the tools.
               I think there is some problem in Rad Editor rendering in aspx page of style Office2007.

         Please reply me as soon as possible, as i have kept Office2007 theme in my whole application.
         so, i need to compulsory use same for the Rad Editor.




Thanks & Regards,
Kunal
Rumen
Telerik team
 answered on 29 Oct 2009
1 answer
74 views
Hi,

We set the StateServer = Sql in the web.config file, now all the reports wont work.

Is this supported in the latest version of Telerik Reporting?

Thanks.,
Steve
Telerik team
 answered on 28 Oct 2009
4 answers
198 views
Is it possible to set the file name for the report?
If so, can it be set using expressions (so it'll be based on report data, time, or other dynamic values)?
antonio martinez
Top achievements
Rank 1
 answered on 27 Oct 2009
2 answers
52 views
Hi,

I placed one htmltextbox and below one chart in three sections(3 html and 3 charts)

Every things showing well in html view. But If I export to rtf or word, one chart is placing on text(Frame). But other charts are exporting properly.

and If u see attached screen shot chart x axis labels are displaying 2 or 3 lines even though place is available in the chart. I set width but it is not working.

I don't know what is the reason.

Please help me.

Regards,

B.Sridhar
Steve
Telerik team
 answered on 27 Oct 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?