D
DjordjeD
I need to call(reference) class member
"PrintDestination.PrintDestinationPrinter" from another file. How do I
do it, I tried
"ReportRenderer.PrintDestination.PrintDestinationPrinter" but it
doesn't work. Please help!
here is my class:
*****************************************
using System;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data;
using ABELSoft.Reporting.User.Facade;
namespace ABELSoft.Reporting.User.Facade
{
/// <summary>
/// Summary description for ReportRenderer.
/// </summary>
public class ReportRenderer
{
private CrystalDecisions.CrystalReports.Engine.ReportDocument
m_ReportDocument;
private string m_sReportName;
private PrintDestination m_PrintDestination;
private string m_sDestinationName;
private DataSet m_ReportData;
public void RenderReport()
{
switch( m_PrintDestination )
{
case PrintDestination.PrintDestinationScreen:
{
ReportPreviewFac Preview = new ReportPreviewFac();
Preview.ReportSource = m_ReportDocument;
Preview.ShowDialog();
break;
}
case PrintDestination.PrintDestinationPrinter:
{
m_ReportDocument.PrintToPrinter( 1, false, 0, 0 );
break;
}
case PrintDestination.PrintDestinationFile:
{
m_ReportDocument.Export();
break;
}
}
}
public enum PrintDestination
{
PrintDestinationPrinter,
PrintDestinationScreen,
PrintDestinationFile
}
#endregion public routines
}
}
"PrintDestination.PrintDestinationPrinter" from another file. How do I
do it, I tried
"ReportRenderer.PrintDestination.PrintDestinationPrinter" but it
doesn't work. Please help!
here is my class:
*****************************************
using System;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data;
using ABELSoft.Reporting.User.Facade;
namespace ABELSoft.Reporting.User.Facade
{
/// <summary>
/// Summary description for ReportRenderer.
/// </summary>
public class ReportRenderer
{
private CrystalDecisions.CrystalReports.Engine.ReportDocument
m_ReportDocument;
private string m_sReportName;
private PrintDestination m_PrintDestination;
private string m_sDestinationName;
private DataSet m_ReportData;
public void RenderReport()
{
switch( m_PrintDestination )
{
case PrintDestination.PrintDestinationScreen:
{
ReportPreviewFac Preview = new ReportPreviewFac();
Preview.ReportSource = m_ReportDocument;
Preview.ShowDialog();
break;
}
case PrintDestination.PrintDestinationPrinter:
{
m_ReportDocument.PrintToPrinter( 1, false, 0, 0 );
break;
}
case PrintDestination.PrintDestinationFile:
{
m_ReportDocument.Export();
break;
}
}
}
public enum PrintDestination
{
PrintDestinationPrinter,
PrintDestinationScreen,
PrintDestinationFile
}
#endregion public routines
}
}