This is a migrated thread and some comments may be shown as answers.

Exporting the report

4 Answers 203 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 28 Sep 2007, 01:51 PM
Hi,
    1. In reporting tool by default there are 3 export format. It does not have export to excel and export to word. I need those in my application.
Does reporting tool supports the above mentioned exports as well ? Or I will have to write code for that. 

    2. I have to place picture box at runtime in my application. For that I have created an image folder in my application and have written the following (Code in VB.net):
         Picturebox1.value = ~(images/img.gif)
However it is not working. Please tell me how to assign the value at run-time.

Thanks,
Rahul
    

4 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 28 Sep 2007, 04:12 PM
Hello Rahul,

To our great regret we still lack both Excel and Word export formats. We're currently working on the Excel and it will be available for the next version due at the end of the year.

Currently you can use only absolute paths/URL for the PictureBox. We consider this a little bit restirictive and we'll add support for relative URLs for the upcomming service pack due in a couple of weeks.

Until then you can use a user defined function to resolve the relative URL:

Public Shared Function ResolveUrl(ByVal relativeUrl As String) As Image
    Dim path As String = HttpContext.Current.Server.MapPath(relativeUrl)
    Return Image.FromFile(path)
End Function


Add this method to your report's class and rebuild. Now if you open the Expression Builder (from the PictureBox context menu) and you'll see it under the User Functions node. Use this expression for your picture box:

=ResolveUrl('~/images/img.gif')

I hope this helps.
 

Regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 01 Oct 2007, 02:57 PM
Hi,
      1. Since the reporting tool does not supports export to excel and word I want to add above two items in the Export combo box. How to add them ? And in which event shall I write the code for export ?I want to show all the export format in one combo box itself.

     2. The following code for assigning value to picturebox suggested by you did not worked:

Public Shared Function ResolveUrl(ByVal relativeUrl As String) As Image
    Dim path As String = HttpContext.Current.Server.MapPath
                        (relativeUrl)
    Return Image.FromFile(path)
End Function

I am getting the error : ''FROM FILE' IS NOT THE MEMBER OF 'System.Web.UI.WebControls.Image''

Could you help me?

Thanks,
Rahul
 
  
    

0
Svetoslav
Telerik team
answered on 01 Oct 2007, 03:30 PM
Hi Rahul,

  1. To add an additional export format one must implement a Telerik Reporting rendering extension based on a number of rules. This functionality is not completed yet, and is for internal use only (that means that only Telerik can develop such extensions to the reporting engine). This means that you cannot add any rendering extension or any items to the export format combobox. We hope this functionality together with the excel export will be ready for the next version due at the end of the year.
     
  2. As to the second, question, please add a reference to the System.Drawing assembly and explicitly use System.Drawing.Image:
            return System.Drawing.Image.FromFile(path)

Best wishes,

Svetoslav

the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Trayko Stoilov
Telerik team
answered on 20 Dec 2007, 04:10 PM
Hello Rahul,

I hope you are doing well.

It is my pleasure to let you know that we have just released Telerik Reporting Q3 2007. In this release, you will find many new features, including the one you have been asking for - Export to Excel.

The Excel Rendering Extension preserves the look and feel of the original report and gives you the opportunity to manipulate the data locally. It does not rely on the Microsoft Office engine, meaning that you do not need Microsoft Excel installed on the machine. This saves costs for new Office licenses and time-consuming installations. Exported files can be opened on the client with Microsoft Excel 97 and later.

To find out more about the new Telerik Reporting Features, please review What’s New in Telerik Reporting Q3 2007 and the Release Notes.

We will be happy to hear your feedback about the latest version of our reporting product.

Merry Xmas!

Greetings,
Trayko Stoilov
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Rahul Khinvasara
Top achievements
Rank 1
Trayko Stoilov
Telerik team
Share this question
or