Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help needed
Message
 
À
17/07/2008 08:10:40
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01331601
Message ID:
01332179
Vues:
7
Hi Tracy, I did get it working but I abandoned the path I was following, what I did in the end was load the data into a DataTable and used SetDataSource to feed it to Crystal
using System;
using System.Collections.Generic;
using System.Text;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data;

namespace PassParamToCrystalandPrint
{
    class Program
    {
       static ReportDocument report;
    
        static void Main(string[] args)
        {
           
            report = new ReportDocument();
            report.Load(@"P:\Crystal\GetClaimsByMaster.rpt");

            report.SetDataSource(PKData.GetReportData()); // This static method returns a DataTable
            

            if (report.Rows.Count > 0)
                report.PrintToPrinter(1, true, 1, 1);

            report.Close();
        }
    }
}
It's not the preferred way but I really needed to get it working quickly - I tried all the Parameter refresh and lots of other stuff but none of it worked - feel free to help me on this :-)
Regards,
Peter J. Kane



Pete
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform