|
|
Home » Developing U++ » UppHub » Very Simple Report Generator (Use QTF format)
Re: Very Simple Report Generator (Use QTF format) [message #25830 is a reply to message #24050] |
Sun, 14 March 2010 16:55 |
|
forlano
Messages: 1182 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
sergeynikitin wrote on Tue, 22 December 2009 23:14 | I make my 3 cents in the common fund decisions.
For my needs, I made a simple report editor which allows users to easily edit the reporting forms.
Allows:
- Substitute the arbitrary variables and functions (defined at the stage of application programming);
- Generate reports on the database (well, or for any tabular data);
- Insert images, and graphics functions (including data from the database);
|
Hello,
I was trying to put the Sergey's test case package in the form of class. But I'm having problem with the callbacks in the constructor. I want they become member functions of the class but I do not know how to do it. At the moment the compiler complains. Perhaps the fix is very easy. Here is my experiement. I called the class MakeBadge:
Thank you,
Luigi
#include <RepGen/RepGen.h>
using namespace Upp;
class MakeBadge {
Vector<String> STRINGS;
int STRINGS_COUNT;
int STRINGS_I;
int TOTAL;
RepGen rep;
void ClentCallbackReportVar();
void ClentCallbackReportFinish();
void ClentCallbackCalcStart();
void ClentCallbackCalcBody();
void ClentCallbackCalcFinish();
MakeBadge();
}
//Client Callbacks
void MakeBadge::ClentCallbackReportVar() {
rep.SubstVar("##NAMECORRFROM","Кредит-NEW-банк");
rep.SubstVar("##BANKCORRFROM","НацПроМ1& БАнк банк");
};
void MakeBadge::ClentCallbackReportFinish() {
rep.SubstVar("##TOTAL",Format("%`",TOTAL));
};
void MakeBadge::ClentCallbackCalcStart() {
STRINGS_COUNT = STRINGS.GetCount();
STRINGS_I = 0;
TOTAL = 0;
};
void MakeBadge::ClentCallbackCalcBody() {
//LOG("ClentCallbackCalcBody");
Vector<String> V = Split(STRINGS[STRINGS_I],';',false);
//DUMPC(V);
rep.SubstVarInLoopBody("##PROJECTN",TrimBoth(V.At(0)));
rep.SubstVarInLoopBody("##PROJECTN",TrimBoth(V.At(0)));
rep.SubstVarInLoopBody("##PROJECT`_NAME",TrimBoth(V.At(1)));
rep.SubstVarInLoopBody("##DETAILID",TrimBoth(V.At(2)));
rep.SubstVarInLoopBody("##COMPANY",TrimBoth(V.At(3)));
rep.SubstVarInLoopBody("##WAREH`_COMP",TrimBoth(V.At(4)));
rep.SubstVarInLoopBody("##QUANT",TrimBoth(V.At(5)));
rep.SubstVarInLoopBody("##SIT",TrimBoth(V.At(6)));
String pictaddr;
if (V.GetCount()>=8 && !TrimBoth(V.At(7)).IsEmpty()) {
pictaddr = TrimBoth(V.At(7));
if (!pictaddr.IsEmpty()) {
#ifdef PLATFORM_X11
pictaddr = GetHomeDirectory()+"/MyApps/RepGenTest/"+pictaddr;
DUMP(pictaddr);
#endif
Image im = StreamRaster::LoadFileAny(pictaddr);
rep.PlaceImageInLoopBody( "##IMAGE", im, Size(1100,700) );
// rep.PlaceImageInLoopBody( "##IMAGE", im );
}
}
else {
rep.SubstVarInLoopBody("##IMAGE","");
}
TOTAL += 1;
if(++STRINGS_I==STRINGS_COUNT) rep.LoopDone();
};
void MakeBadge::ClentCallbackCalcFinish() {
//LOG("ClentCallbackCalcFinish");
};
MakeBadge::MakeBadge()
{
STRINGS = Split(LoadFile("DATA.csv"), '\n', true);
rep.RepGenReportVar = callback(ClentCallbackReportVar);
rep.RepGenReportFinish = callback(ClentCallbackReportFinish);
rep.RepGenCalculateStart = callback(ClentCallbackCalcStart);
rep.RepGenCalculateBody = callback(ClentCallbackCalcBody);
rep.RepGenCalculateFinish = callback(ClentCallbackCalcFinish);
SetLanguage(GetSystemLNG()& 0xfffff);
rep.SetTemplate(LoadFile("REPORT_TEMPLATE.QTF"));
rep.Perform();
}
|
|
|
|
|
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 06:19:43 CET 2024
Total time taken to generate the page: 0.01731 seconds
|
|
|