Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 14-11-2007
tefots tefots is offline
Miembro
 
Registrado: feb 2005
Posts: 108
Poder: 20
tefots Va por buen camino
problemas al exportar un qreport con techart a pdf

estoy intentando exportar a pdf unos reports realizados con qreport 4.x .

el problema que tengo esque estos reports tienen graficos teechart , y cuando exporto a pdf , los graficos no son exportados , es decir, desaparecen , tambien pasa lo mismo si exporto a html o a word.

alguien sabe como solucionarlo ?.


saludos.
Responder Con Cita
  #2  
Antiguo 15-11-2007
tefots tefots is offline
Miembro
 
Registrado: feb 2005
Posts: 108
Poder: 20
tefots Va por buen camino
Me respondo

bueno , me respondo a mi mismo , ya se como solucionar el problema

la solucion es exportar el teechart a un qrimage ,


Código Delphi [-]
      
Meta := chart1.chart.TeeCreateMetafile(True,chart1.Chart.GetRectangle);
      Try
        qrimage1.Picture.Metafile.Assign(Meta);
      finally
        Meta.Free;
      end;

ahora estoy intentando que automáticamente , al llamar a la siguiente funcion , en todos los reports que tengo , que me cree los qrimages que hagan falta dinamicamente , exportando todos los tqrcharts que existan en el qreport y asignandolos al qrimage que he creado dinamicamente.

pero algo va mal , no entiendo que pasa , pero el report casca y da un access violation al imprimir la banda.

aqui pongo la funcion , por si alguien me puede ayudar.
( si le quito el RtfImage.Parent:=banda ya no casca , pero no funciona).
sin embargo si creo los qrimages en diseño si funciona.


Código Delphi [-]
 
Procedure TrepDetalleDiario.CreaQrChartImagenes(Banda:TqrCustomBand);
var i:integer;
    RtfImage:TQRImage;
    Meta: TMetaFile;
Begin
for i:=0 to SELF.ComponentCount-1 do begin
  if SELF.Components[i] is TQRChart then begin
      RtfImage:=TQRImage.Create(banda);
      RtfImage.ParentReport:=self;
      RtfImage.Parent:=banda;
      RtfImage.Enabled:=True;
      RtfImage.visible:=true;
      RtfImage.size.Width:=TQRChart(Self.Components[i]).Size.Width;
      RtfImage.size.Height:=TQRChart(Self.Components[i]).size.Height;
      RtfImage.size.Top:=TQRChart(Self.Components[i]).size.Top;
      RtfImage.size.Left:=TQRChart(Self.Components[i]).size.Left;
      RtfImage.Width:=TQRChart(Self.Components[i]).Width;
      RtfImage.Height:=TQRChart(Self.Components[i]).Height;
      RtfImage.Top:=TQRChart(Self.Components[i]).Top;
      RtfImage.Left:=TQRChart(Self.Components[i]).Left;
      Meta := TQRChart(SELF.Components[i]).Chart.TeeCreateMetafile(True,TQRChart(SELF.Components[i]).Chart.GetRectangle);
      Try
        RtfImage.Picture.Metafile.Assign(Meta);
      finally
        Meta.Free;
      end;
  end;
End;
End;

la funcion la llamo desde aqui

Código Delphi [-]
 
procedure TRepDetallediario.QRBand2BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
CreaQrChartImagenes(sender);
end;

alguien sabe que estoy haciendo mal ?

Saludos
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
exportar un qreport a excel ingabraham Impresión 3 18-10-2007 00:04:47
Problema exportar qreport a pdf carlitos_775 Impresión 2 06-07-2006 08:27:24
Exportar mas de 1 hoja de QReport ? K4RL0S Impresión 0 15-10-2005 18:35:41
Exportar QReport a Html Luana Impresión 0 02-05-2005 22:44:56
QReport Pro ( Exportar a PDF ) Gabriel Impresión 4 21-02-2005 22:14:26


La franja horaria es GMT +2. Ahora son las 18:36:49.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi