Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help needed
Message
From
16/07/2008 13:40:19
 
General information
Forum:
ASP.NET
Category:
Reporting
Title:
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01331601
Message ID:
01331732
Views:
9
http://www.code-magazin.de/Article.aspx?quickid=0501071


>Hi All, just dipping my toes into calling a CR from a C# app - this is what I have so far
>
>
>
>using System;
>using System.Collections.Generic;
>using System.Text;
>using CrystalDecisions.CrystalReports.Engine;
>using CrystalDecisions.Shared;
>
>
>namespace PassParamToCrystalandPrint
>{
>    class Program
>    {
>       static ReportDocument rd;
>
>        static void Main(string[] args)
>        {
>
>            ParameterValues myparameterValues = new ParameterValues();
>            ParameterDiscreteValue myparamDiscreteValue = new ParameterDiscreteValue();
>
>            myparamDiscreteValue.Value = "0171300977";
>
>            myparameterValues.Add(myparamDiscreteValue);
>
>            rd = new ReportDocument();
>            rd.Load(@"P:\Crystal\GetClaimsByMaster.rpt");
>            rd.ParameterFields["@MasterRef"].CurrentValues.Clear();
>            rd.ParameterFields["@MasterRef"].CurrentValues.Add(myparameterValues[0]);
>
>            // What do I need to code here ?
>            // I tried Refresh() but that reloads the report from disk :-(
>
>            if(rd.Rows.Count > 0)
>                rd.PrintToPrinter(1, true, 1, 1);
>
>            rd.Close();
>        }
>    }
>}
>
>
>
>as usual - any help much...
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform