explico algo adicional lepe
el reporte ya esta diseñado pero no en el modo de diseño de delphi
simplemente ya alguien lo diseño y necesito enviarle los datos que pide el reporte para que el me haga un preview ejemplo:
el reporte se llama "balance _general.qr2" yo lo tomo de una ruta llamada "rutarepotes" := c\reportes, solo debo enviarles los parametros que el me pide lo y lo hago con este codigo:
// Envia datos al Repoteador para hacer el Preview--------------------------------
procedure TConsultaBalGeneralForm.ReportPrinterDialogBeforeOpenDataset(
DataSet: TDataSet);
begin
if DataSet is TQuery then
begin
If TQuery(DataSet).ParamCount>0 Then
begin
TQuery(DataSet).CLOSE;
TQuery(DataSet).Params.ParamByName('ID_EMPRESA').asstring :=RXREPID_EMPRESA.AsString;
TQuery(DataSet).Params.ParamByName('ID_SUCURSAL').asstring :=RxREPID_SUCURSAL.AsString;
TQuery(DataSet).Params.parambyname('FECHA_CORTE').AsDATETIME :=INT(FechaF.Date);
TQuery(DataSet).Params.parambyname('FECHA_CORTE_ANT').AsDATETIME :=INT(FechaI.Date);
IF RadioClase.Checked THEN
TQuery(DataSet).Params.ParamByName('NIVEL_CUENTA').Asstring :='1';
IF RadioGrupo.Checked THEN
TQuery(DataSet).Params.ParamByName('NIVEL_CUENTA').Asstring :='2';
IF RadioCuenta.Checked THEN
TQuery(DataSet).Params.ParamByName('NIVEL_CUENTA').Asstring :='3';
IF RadioSubCuenta.Checked THEN
TQuery(DataSet).Params.ParamByName('NIVEL_CUENTA').Asstring :='4';
IF RadioAuxiliar.Checked THEN
TQuery(DataSet).Params.ParamByName('NIVEL_CUENTA').Asstring :='5';
end;
end;
end;
bueno si alguien sabe como enviarle parametros a un reporte si me explica mil gracias a todos por contestar..
ha olvidaba un pequeño detalle estoy ytilizando los componentes de qrdesing y el componente es ReportPrinterdialog o ReporDesingnerDialog
