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

Getting Awway from Crystal Reports 11.5, I hope

1 Answer 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bruce St.Clair
Top achievements
Rank 2
Bruce St.Clair asked on 19 Jan 2009, 04:46 PM

We currently use Crystal Reports 11.5 in our desktop app and wish to get away from Crystal in the worst way.  Let me explain how we do our reporting with Crystal and hopefully Telerik can perform the same functions we need.

1.       Our support/report team creates a report with Crystal and saves it as a rpt file.  The data source is ole db for sql.

2.       The rpt is imported into MSSQL database as a blob.

3.       Upon selecting the report to run we extract the report to the local file system as report.rpt

4.       Code Snippet to set report connection

ConnectionInfo conInfo = new ConnectionInfo();

conInfo.DatabaseName = DB.m_dbname;

conInfo.UserID = "UserName";

conInfo.Password = "Password";

conInfo.ServerName = DB.m_server;

 

m_rptdoc.SetDatabaseLogon(conInfo.UserID, conInfo.Password, conInfo.ServerName, conInfo.DatabaseName);

DBSelection(conInfo);

crViewer.ReportSource = m_rptdoc;

5.       Then we watch for the print event from crystal. If they print the file we grab the printed version of the file and archive it in the database.

//m_rtpdoc is the crystal report

string keywords = m_rptdoc.SummaryInfo.KeywordsInReport;

foreach (ParameterField pf in m_rptdoc.ParameterFields)

      {

      if (pf.Name == "PatientID" ||

      pf.Name == "POSDocID")

      {

      pf.CurrentValues.Clear();

      pf.CurrentValues.AddValue(ids.IDAtThisLevel(1));

      }

6.       We also watch to see what parameters crystal will ask for and if we already have them we pass them with code behind.

 

Hopefully somebody can shed some light on if this is doable with Telerik.  Thank You

1 Answer, 1 is accepted

Sort by
0
Hrisi
Telerik team
answered on 20 Jan 2009, 02:42 PM
Hello Bruce,

It is not obvious how to explain what is the Telerik way for doing such task, but I shall try:

1-3. Telerik Report definition is ordinary .NET class and there is a common practice to store them in class library. Of course, you can serialize the type or instance of the report definition and store it in the database. 

4. Telerik Reporting does not provide its own data layer but depends on the existing .NET objects. How to prepare data for the report is still your custom logic and is not related to the report definition. Anyway, after data is ready to use, you should set the DataSource property of the Report.

5. To print the report programmatically you can use the approach described here.

6. The report parameters can be used for  filtering, sorting or grouping criteria. Additionally the parameters can be used in the data retrieving layer.

We hope this helps you start out with our Reporting product.

Sincerely yours,
Hrisi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Bruce St.Clair
Top achievements
Rank 2
Answers by
Hrisi
Telerik team
Share this question
or