Jump to content

CRO_Tomislav

Members
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. CRO_Tomislav

    Share a data between two units in dynamic loaded BPL.

    Big THX to all of you !!! On a base of your information's/instruction's I manage to solve my problem... Perhaps a Delphi is not a such a scary tool… 😎
  2. CRO_Tomislav

    Share a data between two units in dynamic loaded BPL.

    THX
  3. CRO_Tomislav

    Share a data between two units in dynamic loaded BPL.

    XML is not a problem, Accessing to Quer1 on MDI Form1 is a problem... Can You provide me an example for Application.Screen to access a Query1 on a MDI form Form1?
  4. CRO_Tomislav

    Share a data between two units in dynamic loaded BPL.

    (Sub)Unit2 doesn't know for Form1 in code: ProfileID.Text := Form1.Query_User.FieldByName('userID').AsString; As my form is opened from package by menue item in Main form by: procedure TForm_Maom.Button1Click(Sender: TObject); var AClass :TFormClass; begin if not IsMDIChildOpen(Form_Glavna,'Form1') then begin if PackageModule <> 0 then begin AClass := TFormClass(GetClass('TForm1')); if AClass <> nil then TComponentClass(AClass).Create(Self); end; end; end;
  5. CRO_Tomislav

    Share a data between two units in dynamic loaded BPL.

    This is intrested but; Exactly my goal is: I inherited a project in Delphi which has a huge units with a lot of code. Mostly of that code is used to create some XML files. Idea is to separate from this unit a code which is generate this XML files to separate units. But for do that I need to access from this (sub)units to Form and grab query results to populate this XML files or even modify and run a querys As this is doesn’t work "ProfileID.Text := Form1.Query_User.FieldByName('userID').AsString;" in a (sub)unit; do You have some idea what would be elegant solution for this?
  6. I need a help. If I make a project with one form and two units a showed basic code is working ok. unit Prva; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Mask, Vcl.ExtCtrls, Vcl.DBCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses Druga; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin Druga.Demo; end; end. unit Druga; interface uses Dialogs; function Demo:boolean; implementation uses Prva; function demo: boolean; begin ShowMessage(Form1.Edit1.Text); end; end. If I press a button on Form1 it run function in Druga.pas and show message with a text filled in Edit1 component. The problem is If I try to do the same thing with a Form and units which are in dynamic loaded bpl package. It doesn’t work. It seams that it can’t found a Form or component by its name… How to solve this? THX in advance
  7. CRO_Tomislav

    Android app - reading barcodes/QR codes

    As I am new to FireMonky and Android development, can You send me a modificated project aTestApp.? It will be a much easier for me to understand it so I can try to make my own... THX in advance Tomislav
  8. CRO_Tomislav

    Android app - reading barcodes/QR codes

    It doesn't work on android, It keeps crashing up on app. start...
  9. CRO_Tomislav

    Android app - reading barcodes/QR codes

    Dear all. I am looking for a way to read barcodes/QR codes with android phones. I search a web, looking on a zlib, TMS component, WinSoft component... Is it a good way to go with a zlib or should I buy some commercial component for reading a codes? Any suggestion? Is it some willing to share a simple working example/project of using a ZLib for Android phone? THX in advance Tom
  10. CRO_Tomislav

    Transfer variable or fixed tekst to FastReport

    Hello. It still didn't trasfer all varaibles fo frxReport1... When I rename variable OSKAR_Month in report... - it works! Thanks for help Tomislav
  11. Dear all. I am new to FastReport and I have some basic issue with him… On a Delphi Form with others components I have a frxReport1. In that report, in a section of variables I create a new group of variables named MyVar. In that group I create 4 variables named: OSKAR_Month, OSKAR_Year, OSKAR_Days, OSKAR_Hours with default expressions. On a vcl form I have a button which has for test next code: with frxRbeport1 do begin Variables.Variables['OSKAR_Year']:= QuotedStr(IntToStr(YearOf(MonthCalendar1.Date))); Variables.Variables['OSKAR_Month']:= QuotedStr(FormatDateTime('mmmm',MonthCalendar1.Date)); Variables.Variables['OSKAR_Days']:= LabelData3.Caption; Variables.Variables['OSKAR_Hours']:= LabelData4.Caption; end; frxReport1.ShowReport(True); I am trying to transfer some simple variables or fixed tekst to report but this code doesn't work. Only OSKAR_Year is transferred. How to transfer this data to report? THX in advance Tomislav
  12. CRO_Tomislav

    Summary row at the end of select

    Hi. Yes, I am using MasterSource porperty to connect Query2 to Query1. I inherited some Delphi projects and in those project’s I found a many Delphi forms where solutions of summarize columns is solved on that way which You describe... The SQL in Query2 I was recently found on a net and I get idea to reduce some things on a forms in project. As a Query2 didn't work in MasterSource property connected Query's - I was wonder what is the reason...
  13. CRO_Tomislav

    Summary row at the end of select

    Programerdelphi2k: Thanks on replay but this is not what I am looking for: The result of Query2 for employee wizh id=1 shuld look like: id fk_id_emplyee date payment _____________________________________________ 1 1 2023-01-07 20,00 2 1 2023-01-14 15,00 TOTAL 35,00 Query1 and Query2 are parent-child related The SQL code works OK on a single table, if I try to use it on a child table - it does not. THX
  14. CRO_Tomislav

    Summary row at the end of select

    Hi. Stano, I am try to learn... Please, can You please modify a Query2? THX
  15. CRO_Tomislav

    Summary row at the end of select

    Hello. If I do not use GROUP BY id, I get listed all records from table payments. If I change Query2 in: SELECT id, fk_id_employee, date, payment FROM payment GROUP BY id UNION SELECT 'TOTAL', '','', sum(payment) as total_payment FROM payment WHERE fk_id_employee =mDBGrid1.DataSource.DataSet.FieldByName('id').AsString ORDER BY date I receive data from table payment for each active record in DBGrid1 (employee) related on parent-child but without totals. There is row which should be include TOTAL but a sum fileds are empty...
×