|
|
Home » Developing U++ » UppHub » Very Simple Report Generator (Use QTF format)
Re: Very Simple Report Generator (Use QTF format) [message #25855 is a reply to message #25854] |
Tue, 16 March 2010 02:21 |
|
I've forgot to say. The next version will call nested queries, and will probably easily insert a table into a table or several tables to combine in a single table. Here's an example:
Real Code for Generate Report:
void AnketaListDlg::PrintResumeList_ReportFinish(){
rep.SubstVar("##DATE",AsString(GetSysDate()));
rep.SubstVar("##TOTAL",AsString(TOTAL));
}
void AnketaListDlg::PrintResumeList_CalcBody(){
RepGenSubProc repPositions(rep, "##POSB","##POSE");
RepGenSubProc repPositions1(rep, "##POSB1","##POSE1",true);
RepGenSubProc repEducations(rep, "##EDUB","##EDUE");
repPositions.RepGenSubProcBody = THISBACK(PrintResumeList_CalcPosBody);
repPositions1.RepGenSubProcBody = THISBACK(PrintResumeList_CalcPosBody);
repEducations.RepGenSubProcBody = THISBACK(PrintResumeList_CalcEduBody);
Sql sql;
TOTAL=0;
sql * SqlSelect(SqlAll()).From(ANKETA);
while (sql.Fetch()) {
rep.RepGenCalculateBodyBeforeSubst();
TOTAL++;
gANK_ID = sql[ANK_ID];
rep.SubstVar("##TOTAL",AsString(TOTAL));
rep.SubstVar("##FIO",(String)sql[ANK_NAME]);
rep.SubstVar("##NUM",AsString(sql[ANK_ID]));
rep.SubstVar("##ANKDATE",AsString(sql[ANK_DATE]));
rep.SubstVar("##PHONE",AsString(sql[ANK_PHONE]));
rep.SubstVar("##PHONE1",((String)sql[ANK_PHONE]));
rep.SubstVar("##BIRTHDAY",AsString((Date)(sql[ANK_BIRTHDAY])));
rep.SubstVar("##CHILDREN",AsString(sql[ANK_CHILDREN]));
rep.SubstVar("##OWNCAR",Single<ConvYesNo>().Format(sql[ANK_OWNCAR]));
rep.SubstVar("##SMOKER",Single<ConvYesNo>().Format(sql[ANK_SMOKER]));
rep.SubstVar("##CANBLINDTYPE",Single<ConvYesNo>().Format(sql[ANK_CANBLINDTYPE]));
rep.SubstVar("##SPEEDOFTYPING",AsString(sql[ANK_SPEEDOFTYPING]));
rep.SubstVar("##SPEEDOFTYPLAT",AsString(sql[ANK_SPEEDOFTYPINGLAT]));
rep.SubstVar("##FILEMAKING",Single<ConvYesNo>().Format(sql[ANK_FILEMAKING]));
rep.SubstVar("##SALARY",AsString(sql[ANK_SALARY]));
rep.SubstVar("##CURRENCY",AsString(sql[ANK_CURRENCYOFSALARY]));
rep.SubstVar("##HOMEADDRESS",AsString(sql[ANK_HOMEADDRESS])); //
if (rep.ExistVar("##PHOTO")) {
Image im_photo = PNGRaster().LoadString(sql[ANK_PHOTO]);
rep.PlaceImage("##PHOTOMIN",im_photo,Size(300,300));
rep.PlaceImage("##PHOTOMID",im_photo,Size(800,800));
rep.PlaceImage("##PHOTOMAX",im_photo,Size(1200,1200));
rep.PlaceImage("##PHOTOEXTRA",im_photo,Size(4200,4200));
}
repPositions.DoCalc();
repPositions1.DoCalc();
repEducations.DoCalc();
rep.RepGenCalculateBodyAfterSubst();
}
}
void AnketaListDlg::PrintResumeList_CalcPosBody(){
Sql sql;
sql * SqlSelect(SqlAll()).From(ANKETAPOSITION).Where(ANP_ANKETAID == gANK_ID);
while (sql.Fetch()) {
rep.RepGenCalculateBodyBeforeSubst();
rep.SubstVar("##POSNAME",PositionConvert().Format((int)(sql[ANP_POSITIONID])));
rep.RepGenCalculateBodyAfterSubst();
}
}
...
...
...
...
And in header file (In Parent window TopWindow class definition):
int TOTAL;
RepGen rep;
void PrintResume_ReportFinish();
void PrintResume_CalcPosBody();
void PrintResume_CalcEduBody();
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Tue, 16 March 2010 02:33] Report message to a moderator
|
|
|
|
|
Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: koldo on Wed, 23 December 2009 10:25
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Wed, 23 December 2009 18:29
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: tojocky on Thu, 24 December 2009 17:18
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sat, 26 December 2009 20:25
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Mon, 28 December 2009 12:18
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sun, 03 January 2010 23:09
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sun, 03 January 2010 23:26
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Mon, 04 January 2010 14:22
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Wed, 06 January 2010 20:56
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Fri, 08 January 2010 20:04
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Mon, 11 January 2010 23:53
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Wed, 13 January 2010 12:22
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Wed, 13 January 2010 22:37
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Thu, 14 January 2010 14:09
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Thu, 14 January 2010 23:44
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Fri, 15 January 2010 22:37
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sat, 16 January 2010 01:32
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sat, 16 January 2010 10:39
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sat, 16 January 2010 11:25
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Sat, 16 January 2010 13:53
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sat, 16 January 2010 19:20
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sun, 17 January 2010 10:53
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Sun, 17 January 2010 15:56
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: mdelfede on Sun, 17 January 2010 16:44
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Novo on Sun, 17 January 2010 18:57
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: mdelfede on Sun, 17 January 2010 19:05
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Novo on Sun, 17 January 2010 20:02
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Sun, 17 January 2010 20:31
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Sun, 17 January 2010 21:24
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Fri, 22 January 2010 00:21
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Tue, 26 January 2010 21:32
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Wed, 23 December 2009 20:22
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Thu, 24 December 2009 15:01
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: tojocky on Thu, 24 December 2009 09:13
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Thu, 24 December 2009 13:25
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Sun, 14 March 2010 16:55
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Tue, 16 March 2010 11:43
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Tue, 16 March 2010 14:40
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Tue, 16 March 2010 21:15
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: Didier on Tue, 16 March 2010 23:23
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Mon, 05 April 2010 17:13
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Wed, 07 April 2010 08:04
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Wed, 07 April 2010 10:08
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: forlano on Tue, 27 April 2010 19:06
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: mubeta on Fri, 07 January 2011 21:26
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: tojocky on Sat, 08 January 2011 10:18
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: mubeta on Sat, 08 January 2011 15:21
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: mubeta on Mon, 10 January 2011 19:58
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Fri, 17 August 2012 19:04
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Sat, 18 August 2012 01:04
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Mon, 20 August 2012 11:45
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Mon, 20 August 2012 17:50
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Tue, 21 August 2012 10:17
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Wed, 22 August 2012 00:10
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Fri, 24 August 2012 17:27
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Mon, 03 September 2012 17:32
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Tue, 04 September 2012 09:17
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: jibe on Tue, 20 November 2012 17:42
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: wimpie on Thu, 17 October 2013 02:52
|
|
|
Re: Very Simple Report Generator (Use QTF format)
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: wimpie on Thu, 17 October 2013 10:26
|
|
|
Re: Very Simple Report Generator (Use QTF format)
By: lucy313 on Wed, 25 December 2013 03:59
|
Goto Forum:
Current Time: Fri Mar 29 07:12:11 CET 2024
Total time taken to generate the page: 0.01416 seconds
|
|
|