İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

QUICK REPORT İLE KIRILIM VE KIRILIM TOPLAMI

A

Anonymous

Misafir
QUICK REPORT İLE KIRILIM VE KIRILIM TOPLAMI 0 24 Ara 2001 16:31
Eklendi

Merhaba arkadaşlar ,
Ben delphide çok yeniyim,
Birşey yapmak istiyorum fakat bir türlü başaramadım.

Diyelimki bir dosya var bunda kayıtlar şu şekilde Table1

1.1.2001 elma yeşil 5 tane
2.2.2001 elma yeşil 2 tane
3.3.2001 elma yeşil 3 tane
4.4.2001 elma kırmızı 4 tane.

Amacım quick reportu kullanarak şyle bir liste yapmak

1.1.2001 elma yeşil 5 tane
2.2.2001 elma yeşil 2 tane
3.3.2001 elma yeşil 3 tane
Toplam 10 elma yeşil
4.4.2001 elma kırmızı 4 tane
Toplam 4 kırmızı elma

yani kırılım alarak toplam yazdırma lütfen yardııım
 
A

Anonymous

Misafir
yazdırma işleminden önce şunu yap ;

tabloyu aynı kayıtlara göre sıra ile filtrele bu iş için buffer tabloda kullanabilirsin. Sonra bunları sıra ile yazıcıya gönder fakat sen heralda aynı çıktı üzerinde bu işlemi yapmak istiyorsun bir sn sana kodu göndereceğim.
 
A

Anonymous

Misafir
Teşekkür ederim bekliyorum
Table'ı verdiğimde ve sırasıda uygun olduğuda quick report bana o listeyi verebilmeli.
İlgin için şimdiden çok teşekkürler
 
A

Anonymous

Misafir
Şu an o konun üzerinde uğraşıyorum. Bitince buraya mesaj bırakırım mailini bırakırsın forward ederim.
 
A

Anonymous

Misafir
Forum alanını kullanabilirmiyiz acaba bu konu ile ilgili olarak....

.PAS uzantılı dosyalar text tabanlı oldugu icin buraya koyulabilir

ORNEK

**************

unit fMalzemeKodSec;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Db, DBTables, ExtCtrls, Grids, DBGrids, Buttons, dxDBGrid,
dxTL, dxDBCtrl, dxCntner;

type
TMalzemeKodSec = class(TForm)
FormPanel: TPanel;
ScrollBox1: TScrollBox;
MKodSecDbGrid: TdxDBGrid;
MKodSecDbGridStokKodu: TdxDBGridMaskColumn;
MKodSecDbGridMalKodu: TdxDBGridMaskColumn;
MKodSecDbGridMalzemeAd: TdxDBGridColumn;
MKodSecDbGridStokYerAd: TdxDBGridMaskColumn;
MKodSecDbGridMiktar: TdxDBGridMaskColumn;
MKodSecDbGridBirimAd: TdxDBGridColumn;
Panel1: TPanel;
Label1: TLabel;
Edit1: TEdit;
Panel2: TPanel;
SpeedButton1: TSpeedButton;
SpeedButton3: TSpeedButton;
procedure Edit1Change(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
StokKodSt : String;
function Execute : boolean;

end;

var
MalzemeKodSec: TMalzemeKodSec;

implementation

{$R *.DFM}

uses modDMStox;

function TMalzemeKodSec.Execute : boolean;
begin
if MalzemeKodSec = nil then
begin
Application.CreateForm(TMalzemeKodSec, MalzemeKodSec);
MalzemeKodSec.Showmodal;
end else
MKodSecDbGrid.DataSource.DataSet.Refresh;
MalzemeKodSec.Showmodal;
case MalzemeKodSec.modalresult of
mrOK : result := true;
else result := false;
end;
end;


procedure TMalzemeKodSec.Edit1Change(Sender: TObject);
begin
if Edit1.Text <> '' then
begin
with MKodSecDbGrid.DataSource.DataSet do
begin
Filtered := False;
Filter := 'StokKodu='+''''+Edit1.Text+'*''';
Filtered := True;
if Edit1.Text = '' then Filtered := False;
end;
end else MKodSecDbGrid.DataSource.DataSet.Filtered := False;

end;

procedure TMalzemeKodSec.SpeedButton1Click(Sender: TObject);
begin
StokKodSt := DMStox.StokTableStokKodu.AsString;
ModalResult := mrOK;

// (GetParentForm(FormPanel) as TdxPopupEditForm).ClosePopup(True);
end;

procedure TMalzemeKodSec.SpeedButton3Click(Sender: TObject);
begin
ModalResult := mrCancel;

// (GetParentForm(FormPanel) as TdxPopupEditForm).ClosePopup(False);
end;

procedure TMalzemeKodSec.FormActivate(Sender: TObject);
begin
MKodSecDbGrid.DataSource.DataSet.Refresh;
end;

end.

(*
//closes the form containing PopupGrid
procedure TfmPopup.PopupGridDblClick(Sender: TObject);
begin
(GetParentForm(PopupGrid) as TdxPopupEditForm).ClosePopup(True);
end;

procedure TfmPopup.PopupGridKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ((Key in [VK_UP, VK_DOWN]) and (ssAlt in Shift)) or
((Key = VK_F4) and not (ssAlt in Shift)) or (Key = VK_ESCAPE) then
(GetParentForm(PopupGrid) as TdxPopupEditForm).ClosePopup(False);
if Key = VK_RETURN then PopupGridDblClick(nil);
end;

procedure TfmPopup.PopupGridMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (Button = mbLeft) and (PopupGrid.GetHitTestInfoAt(X, Y) in RowHitTests) then
PopupGridDblClick(nil);
end;
*)



*****************************


object MalzemeKodSec: TMalzemeKodSec
Left = 403
Top = 507
Width = 724
Height = 275
BorderIcons = []
Caption = 'MalzemeKodSec'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -10
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = False
OnActivate = FormActivate
PixelsPerInch = 96
TextHeight = 13
object FormPanel: TPanel
Left = 0
Top = 0
Width = 716
Height = 248
Align = alClient
Caption = 'FormPanel'
TabOrder = 0
object ScrollBox1: TScrollBox
Left = 1
Top = 34
Width = 714
Height = 213
Align = alClient
TabOrder = 0
object MKodSecDbGrid: TdxDBGrid
Left = 0
Top = 0
Width = 710
Height = 209
Bands = <
item
end>
DefaultLayout = True
HeaderPanelRowCount = 1
KeyField = 'StokKodu'
ShowGroupPanel = True
SummaryGroups = <>
SummarySeparator = ', '
Align = alClient
ParentShowHint = False
ShowHint = False
TabOrder = 0
DataSource = DMStox.StokDataSource
Filter.Active = True
Filter.AutoDataSetFilter = True
Filter.Criteria = {00000000}
OptionsBehavior = [edgoAutoSearch, edgoAutoSort, edgoDragScroll, edgoEditing, edgoEnterShowEditor, edgoImmediateEditor, edgoTabThrough, edgoVertThrough]
OptionsDB = [edgoCancelOnExit, edgoCanNavigation, edgoConfirmDelete, edgoUseBookmarks]
OptionsView = [edgoBandHeaderWidth, edgoIndicator, edgoUseBitmap]
ShowPreviewGrid = False
object MKodSecDbGridStokKodu: TdxDBGridMaskColumn
Width = 108
BandIndex = 0
RowIndex = 0
FieldName = 'StokKodu'
end
object MKodSecDbGridMalKodu: TdxDBGridMaskColumn
Width = 114
BandIndex = 0
RowIndex = 0
FieldName = 'MalKodu'
end
object MKodSecDbGridMalzemeAd: TdxDBGridColumn
Width = 211
BandIndex = 0
RowIndex = 0
FieldName = 'MalzemeAd'
end
object MKodSecDbGridStokYerAd: TdxDBGridMaskColumn
Width = 108
BandIndex = 0
RowIndex = 0
FieldName = 'StokYerAd'
end
object MKodSecDbGridMiktar: TdxDBGridMaskColumn
Width = 66
BandIndex = 0
RowIndex = 0
FieldName = 'Miktar'
end
object MKodSecDbGridBirimAd: TdxDBGridColumn
Width = 62
BandIndex = 0
RowIndex = 0
FieldName = 'MalzemeBirimi'
end
end
end
object Panel1: TPanel
Left = 1
Top = 1
Width = 714
Height = 33
Align = alTop
Color = 12242402
TabOrder = 1
object Label1: TLabel
Left = 7
Top = 10
Width = 44
Height = 13
Caption = 'Stok Kod'
end
object Edit1: TEdit
Left = 59
Top = 7
Width = 158
Height = 21
Hint = 'Stok Kodlarini filtrelemek icin buraya giriniz..'
ParentShowHint = False
ShowHint = True
TabOrder = 0
OnChange = Edit1Change
end
object Panel2: TPanel
Left = 228
Top = 1
Width = 57
Height = 33
BorderStyle = bsSingle
Color = 8421631
TabOrder = 1
object SpeedButton1: TSpeedButton
Left = 5
Top = 7
Width = 19
Height = 19
Hint = 'Sonucu Tasi'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00555555555555
555555555555555555555555555555555555555555FF55555555555559055555
55555555577FF5555555555599905555555555557777F5555555555599905555
555555557777FF5555555559999905555555555777777F555555559999990555
5555557777777FF5555557990599905555555777757777F55555790555599055
55557775555777FF5555555555599905555555555557777F5555555555559905
555555555555777FF5555555555559905555555555555777FF55555555555579
05555555555555777FF5555555555557905555555555555777FF555555555555
5990555555555555577755555555555555555555555555555555}
NumGlyphs = 2
ParentShowHint = False
ShowHint = True
OnClick = SpeedButton1Click
end
object SpeedButton3: TSpeedButton
Left = 31
Top = 7
Width = 19
Height = 19
Hint = 'IPTAL/Kapat'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000130B0000130B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
333333333333333333333333333333333333333FFF33FF333FFF339993370733
999333777FF37FF377733339993000399933333777F777F77733333399970799
93333333777F7377733333333999399933333333377737773333333333990993
3333333333737F73333333333331013333333333333777FF3333333333910193
333333333337773FF3333333399000993333333337377737FF33333399900099
93333333773777377FF333399930003999333337773777F777FF339993370733
9993337773337333777333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333333333333}
NumGlyphs = 2
ParentShowHint = False
ShowHint = True
OnClick = SpeedButton3Click
end
end
end
end
end

**************
ve sonrakide DFM dosya


Bu sebeple forum sahası kod aktarımında kullanılabilir.
 
A

Anonymous

Misafir
Bu islem icin QReportun bir bandini kullanabilirsin. Yani hazir olarak sunulmush zaten.. Artı bu konuda örneklerde olmasi lazım


Type : TQRBandType

The band types are –


RbTitle
Printed on the first page of the report after the page header

RbPageHeader
Printed on top of each page. Printing on the first page can be switched off with the Options property

RbDetail
Printed once for every record/row in the connected dataset

RbPageFooter
Printed at the bottom of each page. Printing on the last page can be switched off with the Options property

RbSummary
Printed after all detail bands and potential group footers at the end of the report.

RbSubDetail
Reserved for use by the TQRSubDetail component. Do not set this band type manually

RbColumnHeader
Printed a the top of each column on every page in a multi column report. Printed once after the page header in a single column report

RbGroupFooter
Footer band for TQRGroup or TQRSubDetail components. Printed when the group breaks or all detail bands have been printed for the TQRSubDetail

RbGroupHeader
Header band for TQRGroup or TQRSubDetail components. Printed before any detail bands for a given group or TQRSubDetail

RbOverlay
Included for backwards compatibility with QuickReport version 1. Do not use this band type

RbChild
Reserved for use by the TQRChildBand component. Do not set this band type manually
 
A

Anonymous

Misafir
Bu tür bir kırılım hesabı için rbdetail ve rbsubdetail (veya rbchild) kullanılabilir fakat :

Kırmızı, yeşil, sarı gibi elmaların nitelendirme değerleri bir dosyada ve diğer
1.1.2002 yesil elma 3 adet
2.1.2002 kirmizi elma 2 adet
.
.
gibi bilgiler diğer bir dosyada olmak kaydı ile hazır QR componenetleri ile yapılabilir.


Eğer bu veriler tek bir dosyada ise bu mantığa uygun olarak 2 farklı dosyaya bölebilir veya yapmak istediğin şekilde farklı bir dosyaya bir program bloğu içinde oluşturursun. Bu oluşturduğun dosyayı QR içinde Detailband olarak dökebilirsin.

Kolay gelsin...

Uzun yıllar sonra form sayfalarına göz atabilecek vakjit bulabildiğme seviniyorum..3-4 yıldır işlerimin yoğunluğundan fırsat bulamıyordum. Hep yabanci sitelerde forumlara girerdim. Görüyorumki türkiye de de delphi, C/c++ ve diğer hemen hemen her konuda site ve forum oluşmuş. Bu açıdan çok eski mesajlara bakarak cevaplar yazabiliyorum. sonuçda her yeni öğrenen aynı aşamalardan geçiyor...Bu nedenle geç de olsa bu tür konulara takılan hali hazırda birlerinin varlığını hissdebiliyor ve yardımımın dokunmasını istiyorum..
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst