Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Werkzeuge (https://www.delphipraxis.net/63-sonstige-werkzeuge/)
-   -   Fastreport Variable (https://www.delphipraxis.net/90137-fastreport-variable.html)

manfred_h 12. Apr 2007 10:35


Fastreport Variable
 
Halo zusammen

habe in meinem Projekt mehrere Reporte mit den gleichen Variablen
( es sind echt viele versch. Variablen ).

bisher habe ich das so versucht:

Delphi-Quellcode:
  with DM_reports.rep_camp_ov, DM_reports.rep_member do
  begin
//  Fastreport Variable set START

    Variables['var_camp_region']    := '''' + lbl_region.Caption + '''';
    Variables['var_camp_country']   := '''' + lbl_country.Caption + '''';
Das Problem ist aber das die Variablen nur beim letzten Report gesetzt werden.
>> DM_reports.rep_member

für Tipps dankbar
Shalom
Manfred

Dezipaitor 12. Apr 2007 11:23

Re: Fastreport Variable
 
Du musst schon für alle Reports, diesen Schritt einzeln wiederholen.

Das With sollte man sowieso nur "seltenst" verwenden.

manfred_h 12. Apr 2007 13:02

Re: Fastreport Variable
 
Zitat:

Zitat von Dezipaitor
Das With sollte man sowieso nur "seltenst" verwenden.

Wieso denn das?
Delphi-Quellcode:
  with DM_reports.rep_camp_ov do
  begin
//  Fastreport Variable set START

    Variables['var_camp_region']    := '''' + lbl_region.Caption + '''';
    Variables['var_camp_country']   := '''' + lbl_country.Caption + '''';
    Variables['var_camp_zone']      := '''' + lbl_zone.Caption + '''';
    Variables['var_camp_area']      := '''' + lbl_area.Caption + '''';
    Variables['var_camp_no']        := '''' + lbl_admin_camp_no.Caption + '''';
    Variables['var_camp']           := '''' + lbl_camp_city.Caption + '''';
    Variables['var_camp_lang']      := '''' + lbl_lang.Caption + '''';
    Variables['var_camp_est']       := '''' + lbl_est.Caption + '''';
    Variables['var_camp_est_aux']   := '''' + lbl_est_aux.Caption + '''';

    Variables['var_camp_cabinet_last_v'] := '''' + lbl_cabinet_last_v.Caption + '''';
    Variables['var_camp_cabinet_next_v'] := '''' + lbl_cabinet_next_v.Caption + '''';
    Variables['var_camp_m_last_v']       := '''' + lbl_m_last_v.Caption + '''';
    Variables['var_camp_m_next_v']       := '''' + lbl_m_next_v.Caption + '''';

    Variables['var_camp_rating']    := '''' + lbl_camp_rating.Caption + '''';
    Variables['var_camp_distance']  := '''' + lbl_distance.Caption + '''';
Sowas habe ich überall in meinem Projekt und das ganze ist doch auch sehr
praktisch.
Was soll den der Nachteil sein?

mkinzler 12. Apr 2007 13:03

Re: Fastreport Variable
 
Wenn manche Eigenschaften dann nicht mehr eindeutig zugeordnet werden können.

manfred_h 12. Apr 2007 13:09

Re: Fastreport Variable
 
Wenn ich jetzt aber in dem Fall ca. 50 Variablen so "erstelle" ist das ok?

HaJo 28. Aug 2007 17:40

Re: Fastreport Variable
 
welchen Sinn machen so viele Variablen denn noch? Gehören die nicht besser in eine Datentabelle??


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:49 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz