Print Report Copy to Accounting, Copy to Client, Copy to Treasury in Crystal Reports

1

Hello, I am printing the copies of my report with the following line

Docrpt.PrintToPrinter(3, false, 0, 0); );//Imprimo 3 copias

but how do I make the 1 copy have a label that says Accounting, Client, Treasury (to say the least),

I need to do this from code, programmatically place these labels without having to make several sections as shown in this thread crystal-reports-11-how-to- print-different-data-on-multiple-pages

and without using parameters.

    
asked by ger 21.03.2018 в 18:19
source

1 answer

2

Create a parameter within the rpt called destination_copy or whatever you want to call it

load the report normally with the option setparameter passes the name of the first copy print this copy change the value of the parameter print the second copy print again

and so for each copy that is needed

        ReportDocument Reporte = new ReportDocument();

        if (File.Exists(PathReporte))
        {
            Reporte.Load(PathReporte);
            // Asocia el conjunto de datos con el reporte
            Reporte.SetDataSource(origen de datos);


            Reporte.SetParameterValue("TITULO", "Copia a contabilidad");
            Reporte.PrintToPrinter(1, false, 0, 0); );//Imprime la primera hoja
            Reporte.SetParameterValue("TITULO", "Copia cliente");
            Reporte.PrintToPrinter(1, false, 0, 0); );//Imprime la segunda hoja
            Reporte.SetParameterValue("TITULO", "Copia a tesoreria");
            Reporte.PrintToPrinter(1, false, 0, 0); );//Imprime la tercera hoja
    
answered by 21.03.2018 / 20:51
source