none
Microsoft Reporting vs Crystal Reports RRS feed

  • General discussion

  • Hi all.  I'm getting scared and frustrated with Crystal Reporting.  I've been using CR for 10+ years, but this last round of 2010 release where it didn't look like CR was going to be part of VS was worrisome to say the least.  I know, MS says it will be there, but they told me the same thing about another product and, poof, it was going.  

    So, my question is:  For those of you whom have used both CR and msReporting, what are some of the pros and cons?  I read one post where it said msRpt couldn't use multiple tables.  Well, for me that seals the deal right there.  Hopefully, the post was ancient and this is no longer an issue.

    Also, I played with msRpt a bit.  I am able to create a viewer and data set with a table adapter fairly easy.  But, most of my use of a reporting tool is to report error logs.  And those error logs I build in an XML file.  I typically create a data set without a table adapter and populate the dataset virtually, (not really using the xsd for anything more than formatting the report).  Yet when I tried this same method with the report viewer, it can't "see" the dataset class.  I can only assume it would be because of the lack of table adapter. 

    So, can msRpts work without a table adapter for ad-hoc reporting and dataset construction, how is the speed on large data sets from sql, how does it fair under multiple groups and all that ____?

    Thanks.


    Greg Kowieski The World On-Line
    Saturday, May 8, 2010 7:34 PM

All replies

  • I do alot of reports, most all my work is creating reports. I've been using Crystal and just switched over to MS. The reasons that sold me are smaller install package, faster speed, and built into VS, not necessarily in that order.

    The speed issue really suprised me. I set up a test case with a set of master records and then child records in a subreport. I seperated retrieving the data from rendering the report and then created both a Crystal and MS report that were the same. With 10 master records, Crystal was about 0.5 seconds faster to display. With 100 records, MS was half the time of Crystal. As the numbers of master records increased, the gap increased. MS was clearly faster.

    I only work with disconnected datasets and not table adaptors. I have to calculated much of the data desired, so I populate a report dataset and then render the report. So there is no problem reporting from a dataset.

    Designing in the UI is a bit different, and I'm not sure of the granularity in placement of objects. The only edge I've found for Crystal is they have templated for Avery type labels and I haven't see this yet in MS. Other than that, MS seem to have everything as Crystal, but is faster and deploys smaller.

    Documentation on MS seems to be scarce. There is only one book I've found for client side reporting and it's fairly basic.

    Seeing that Crystal for VS 2010 is delayed just makes me happier I made the switch.

    Bernie

    Sunday, May 9, 2010 5:54 AM
  • Hi,

    we've got to answer that question (CR vs MR) in our team, to. So evaluation is just on it's way...

    The picture up to now is (only regarding desktop apps and up to 2008):

    -CR seems well documented, more ressources available than MR
    -Huge API in CR (just try to print a MR-report without preview, that's ridiculous!)
    -CR somehow slower than MR with huge amount of data
    -Designing reports against custom BusinessObjects is really worse (Wizard isn't even able to "see" objects in another project!) in CR
    -CR's preview integration into our apps is much better than in MR (just try to make your own toolbar!)
    -MR's integration in the dev environment is superior to CR (which's habit to implement it's own DB-connection is bad taste)

    -Both seem to lack designers, our users can use at runtime from within our apps (not external!) to manipulate reports which we prefer to store in the DB (seems to be quite easy with MR as it's only XML to be stored!) for better managability and deployment.

    It seems as if reporting software for .NET isn't really a strongpoint ;-)

    Volker

    Monday, May 10, 2010 2:48 PM
  • since you use disconnected datasets also, maybe you can help me out.  I created an xml schema xsd to be used as my datasource.  I'm able to format the report just fine.  But I'm getting an error regarding missing data source.

     

     Public Sub showErrorReportMS(ByVal nXmlDataLocation As String)
        Dim myViewer As New MSReportViewer
        myViewer.ReportViewer1.ProcessingMode = ProcessingMode.Local
        Dim rep As LocalReport = myViewer.ReportViewer1.LocalReport
        ' rep.ReportPath = "MSProcessingReport.rdlc"
    
        Dim ds As New DataSet
        ds.ReadXml(nXmlDataLocation)
    
        Dim dsOrders As New ReportDataSource
        dsOrders.Name = "Order_Data"
        dsOrders.Value = ds.Tables("Order")
        rep.DataSources.Add(dsOrders)
        myViewer.Show()
        myViewer.ReportViewer1.RefreshReport()
      End Sub

    This is the schema for the report dataset

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:element name="root">
      <xs:complexType>
       <xs:sequence>
        <xs:element name="Order">
         <xs:complexType>
          <xs:sequence>
           <xs:element name="SOPNumber" type="xs:string" />
           <xs:element name="SOPType" type="xs:unsignedByte" />
           <xs:element name="LineSeq" type="xs:unsignedShort" />
           <xs:element name="CompSeq" type="xs:unsignedByte" />
           <xs:element name="ItemNumber" type="xs:string" />
           <xs:element name="Qty" type="xs:decimal" />
           <xs:element name="PONumber" type="xs:unsignedByte" />
           <xs:element name="Test" type="xs:string" />
          </xs:sequence>
         </xs:complexType>
        </xs:element>
       </xs:sequence>
      </xs:complexType>
     </xs:element>
    </xs:schema>

    If I use rep.ReportPath = "MSProcessingReport.rdlc" I get an error stating it doesn't know where the report is, (its looking in my bin directory).  The report is an embedded resource.

    So I left out the reportPath and then it indicates "a data source instance has not been supplied for the data source 'xmlProcessedDataSet'.  I'm not quite sure why it would not see the datasource I populated with the ds.

     

    Any ideas or simple examples of the method?


    Greg Kowieski The World On-Line
    Tuesday, May 11, 2010 3:08 PM
  • Greg,

    Here's a method that displays a report. It's actually the button click function from some test code, but it does what you want.

    The first thing I see is you are not declairing the report name. In my code see the line;

    mrvMicrosoftViewer.LocalReport.ReportEmbeddedResource =

    "RV_Tester.rpMicrosoftReport.rdlc";

    You need to use the syntax "programname.reportname.rdlc" with your program name and report name.

     Does this help any?

    Bernie

        private void btnCreateMicrosoft_Click(object sender, EventArgs e)
        {
          msStartTime = DateTime.Now;
          try
          {
    
            mrvMicrosoftViewer.LocalReport.ReportEmbeddedResource = "RV_Tester.rpMicrosoftReport.rdlc";
            mrvMicrosoftViewer.LocalReport.SubreportProcessing +=
                new SubreportProcessingEventHandler(SubreportProcessingEventHandler);
            mrvMicrosoftViewer.RenderingComplete += 
                new RenderingCompleteEventHandler(RenderingCompleteEventHandler);
    
            ReportDataSource rds = new ReportDataSource();
            rds.Name = "dsMyData_Patients";
            rds.Value = dsData.Tables["Patients"];
            mrvMicrosoftViewer.LocalReport.DataSources.Add(rds);
            //mrvMicrosoftViewer.SetDisplayMode(DisplayMode.PrintLayout);
            //mrvMicrosoftViewer.ZoomMode = ZoomMode.Percent;
            //mrvMicrosoftViewer.ZoomPercent = 100;
            //mrvMicrosoftViewer.ShowProgress = true;
            //mrvMicrosoftViewer.CurrentPage = 1;
            this.mrvMicrosoftViewer.RefreshReport();
          }
          catch (Exception ex)
          {
            MessageBox.Show(ex.Message, "btnCreateMicrosoft");
          }
          
        }
    
        
    Tuesday, May 11, 2010 4:45 PM
  • Hi Greg,

    here's what I did (and it works well):

    (It's in the On-Load event of my preview form, whereas the new/konstruktor is called with all that _dt (datatabel, noct dataset), _Sourcename (identical to initial sourcename at designtime), _ReportPath (exact name, incl. evtl. namespace of the rdlc-file) and _Parameters (to set caption of report etc.)) It shold work with already placed viewer control, to.

    Dim _rView As ReportViewer = New ReportViewer
    
          _rView.Dock = DockStyle.Fill
    
          Me.Controls.Add(_rView)
    
          With _rView
            .LocalReport.DataSources.Add(New ReportDataSource(_SourceName, _dt))
            .LocalReport.ReportPath = _Path
            .LocalReport.SetParameters(_Parameters)
            .RefreshReport()
          End With

    My Report is an embedded ressource, to. Therefore I don't handle a file-system-path, but something like: (be aware of different namespace if used!)

    Dim

    _printPreview As New frmPrintPreview(_DTProtokoll, "dsLog_Protokoll", "rptErrorLog.rdlc", paras)

    HTH?

    Volker

     

    Tuesday, May 11, 2010 6:25 PM
  • Thanks for the help guys!  I'm still getting an error.  "A data source instance has not been supplied for the data source 'xmlProcessedDataSet'.  I was able to get it past the other stuff though.

     Public Sub showErrorReport(ByVal nXmlDataLocation As String)
        Dim myViewer As New MSReportViewer
        myViewer.ReportViewer1.ProcessingMode = ProcessingMode.Local
        myViewer.ReportViewer1.LocalReport.ReportEmbeddedResource = "ezSalesEntry.MSProcessingReport.rdlc"
    
        Dim ds As New DataSet
        ds.ReadXml(nXmlDataLocation)
    
        Dim dsOrders As New ReportDataSource
        dsOrders.Name = "Order_Data"
        dsOrders.Value = ds.Tables("Order")
        myViewer.ReportViewer1.LocalReport.DataSources.Add(dsOrders)
        myViewer.Show()
        myViewer.ReportViewer1.RefreshReport()
      End Sub
    Could this be because I built the report off the dataset xmlProcessedDataSet, (when you bind the report).  Do I need to unbind the report or something?  When I look at the report data tab, it shows (Built-in-fields, Parameters, images, root).  The root has my schema attached to it.  It seems like when I issued the Datasources.add(dsOrders) it would have overwritten the old datasource.   Perhaps not?

     


    Greg Kowieski The World On-Line
    Tuesday, May 11, 2010 8:35 PM
  • Try adding a new test report and bind it to the dataset. Just throw the fields on the page for testing and see what happen. That might be easier than trying to work though all the connections until you get one that works.

    Let us know if the new report works.

    Bernie

    Wednesday, May 12, 2010 3:56 AM
  • Hi Greg,

    it seems that the error can be reproduced. It appears when I handle a wrong ReportDataSource.Name. The name has to be the same as provided at runtime. So, if you use table 'xyz' from dataset 'abc' for designing your report, you must use 'abc_xyz' as name. In your case you used 'xmlProcessedDataSet' when designing and assign 'Order_Data' at runtime, which isn't a match...

    HTH?

    Volker

    Wednesday, May 12, 2010 7:11 AM
  • You hit the nail on the Head!  I made the following Modification and all is well in the world again.

     

      Public Sub showErrorReport(ByVal nXmlDataLocation As String)
        Dim myViewer As New MSReportViewer
        myViewer.ReportViewer1.ProcessingMode = ProcessingMode.Local
        myViewer.ReportViewer1.LocalReport.ReportEmbeddedResource = "ezSalesEntry.MSProcessingReport.rdlc"
    
        Dim ds As New DataSet
        ds.ReadXml(nXmlDataLocation)
    
        Dim dsOrders As New ReportDataSource
        dsOrders.Name = "Order_Data"
        dsOrders.Value = ds.Tables("Order")
        myViewer.ReportViewer1.LocalReport.DataSources.Add(dsOrders)
        myViewer.Show()
        myViewer.ReportViewer1.RefreshReport()
      End Sub
    Just in-case I have this problem in the future, you can also change the datsetProperty of the report to the name used in the code.


    Greg Kowieski The World On-Line
    Thursday, May 13, 2010 4:33 PM