Arsip: How To Create Component On-The-Fly Inside Report Builder?

 
user image
more 12 years ago

l_christianto

Here's the situation : I want to make a report that contains barcode components, But the number of the component depends on the data. So I want to make the barcode component on-the-fly in the DetailBand For experiment I just want to create 1 barcode on-the-fly I already tried this: MyBarcode := TppBarcode.Create(self); MyBarcode.Alignment := taLeftJustify; MyBarcode.Name := 'MyBarCode1'; MyBarcode.UserName := 'BarCode1'; MyBarcode.AutoSize := true; MyBarcode.Top := 10; MyBarcode.Left := 10; MyBarcode.Data := '1234567890'; MyBarcode.PrintHumanReadable := true; MyBarcode.Visible := True; MyBarcode.SetParentComponent(ppDetailBand1); ppMyReport.Print; And the barcode still didn't appear. Can somebody help me? Thank You Chris.
user image
more 12 years ago

bagussb

nyumbang aja dikit, kalo saya biasa create component pada runtime seperti ini :
with TButton.Create(Form1) do
  begin
    Name := 'ButtonX';
    Parent := Form1;
    Top := 10;
    Left := 10;
    Visible := True;
  end;
btw.. emang komponennya kalo pada saat design time bisa muncul di reportnya.. setau saya, tolong di koreksi kalo salah, ga semua komponen bisa dimunculin di report... :mrgreen:
user image
more 12 years ago

l_christianto

Makasih atas reply-nya Sori kalo pake bahasa Inggris, soalnya rencananya mo posting ke forum luar negeri, tapi waktu aku coba untuk signup ke forumnya susah banget... Jadi bukan sok-sok an pake bahasa Inggris. Aku udah nyoba-nyoba lagi ternyata bisa... Ternyata uda ada di HELP nya Report Builder kok, cuma bacanya kurang teliti aja Caranya MyBarcode := TppBarcode.Create(self); MyBarcode.Alignment := taLeftJustify; MyBarcode.Name := 'MyBarCode1'; MyBarcode.UserName := 'BarCode1'; MyBarcode.AutoSize := true; MyBarcode.Top := 10; MyBarcode.Left := 10; MyBarcode.Data := '1234567890'; MyBarcode.PrintHumanReadable := true; MyBarcode.Visible := True; MyBarcode.Band := ppDetailBand1; Programnya uda bener tinggal bagaimana add komponen tersebut ke band report nya. Baris terakhir di atas jawabannya. MyBarcode.Band := ppDetailBand1; Semoga membantu juga bagi pemakai Report Builder lain yang ingin membuat komponen secara runtime Thx, Christianto
user image
more 12 years ago

DelphiExpert

Good luck Chris ... :)
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com