Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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
 
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
 
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.