Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 5th, 2009, 06:14 PM
Authorized User
 
Join Date: Apr 2009
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Report Viewer unstead of crystal reports

Hi,

Has any one used microsoft ReportViewer unstead of crystal? If so I would welcome any suggestion.

The ReportQuery.cs instantiates a new crystal document ie (page 395)
---
ReportDocument report = New ReportDocument()
report.Load (server.MapPath(currentReport.FileName))
--
is there an equivalent way in using microsoft reportViewer

thanks in advance
  #2 (permalink)  
Old June 9th, 2009, 05:07 PM
Authorized User
 
Join Date: Mar 2009
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hey Luckstar,

We have done a project that used ReportViewer and from what I can remember you will need to dim a variable to the class LocalReport (Microsoft.reporting.webforms namespace) we did something like this:

vb =

Code:
 
Imports  Microsoft.Reporting.Webforms
 
Dim report as new LocalReport
Dim dt as datatable = GetMydataTable()
Dim dataSource  as new ReportDataSource("ReportData",dt)
Dim renderedBytes AsByte()
 
report.Reportpath = server.MapPath("")
report.DataSources.Add(dataSource)
 
renderedBytes  = report.Render("PDF",nothing,nothing,nothing,nothing,nothing,nothing)
kind of something like that

c#

Code:
 

{ 
    LocalReport report = new LocalReport(); 
    datatable dt = GetMydataTable(); 
    ReportDataSource dataSource = new ReportDataSource("ReportData", dt); 
    byte[] renderedBytes = null; 
    
    report.Reportpath = server.MapPath(""); 
    
    report.DataSources.Add(dataSource); 
    
    renderedBytes = report.Render("PDF", null, null, null, null, null, null); 
}
Hope this helps.

Funny thing is that I was wondering which reporting tool to use crystal vs ReportViewer. We had so many problems before using crystal that we went to reportviewer. But now that Vince included a sample, which I will try, was wondering if we could use crystal now. What are your thoughts?

-realkewl
  #3 (permalink)  
Old June 10th, 2009, 04:04 PM
Authorized User
 
Join Date: Apr 2009
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thank you so much I will have a go just the lead I needed.

the reason I am going report viewer is my customer does not want crystal ;he just wants microsoft. In my experience many customers see crystal as an expensive package and tend to avoid it,
particularily in web apps where licenses can be costly ( Even though I explain its integration with visual studio and we are using its objects etc..)

I tend to favour Report Viewer as also we have a team using SQL server reporting services and I understand report viewer is a reporting services component and therefore the web app rerpoting
and reports generated with SQL server reporting services integration should be straight forward.

regards

Last edited by luckystar; June 10th, 2009 at 04:15 PM.. Reason: added
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports ActiveX Viewer omarmalik Crystal Reports 0 September 14th, 2006 05:39 AM
tooltips showing on crystal reports viewer ejan Pro VB 6 0 December 21st, 2004 02:47 AM
Update the Crystal Reports viewer Automatically sanjaykabra82 Crystal Reports 3 July 9th, 2004 11:02 PM
Crystal Reports Viewer problem MikeJames42 Crystal Reports 0 April 14th, 2004 08:04 AM
VB and Crystal Reports Viewer MikeJames42 Pro VB 6 0 April 7th, 2004 02:39 AM



All times are GMT -4. The time now is 05:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.