|
|
Home » Developing U++ » UppHub » Very Simple Report Generator (Use QTF format)
|
|
|
|
|
|
|
|
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #37098 is a reply to message #37074] |
Tue, 21 August 2012 21:23   |
|
jibe wrote on Sat, 18 August 2012 03:04 | Yes, I saw that. But if the example shows how to use ##BT and ##ET and let me guess how it works, there is nothing about ##BP and ##EP. I think that a lot of people would appreciate a short explanation about that !
|
##BT and ##ET - body repeatable block (begin and end) in table structure ( {{ .. :: .. :: .. .... .. }} ) - automaticaly find boundary of columns.
##BP and ##EP - body repeatable block (begin and end) in plain text (may be in contract or article, for ex.)
Additionally, We can create custom body repeatable block for nested table data. (for example ##LANGBT and ##LANGET for languages, person can speaking)
This operation is very simple:
RepGenSubProc repLangs(rep, "##LANGBT","##LANGET");
repLangs.RepGenSubProcBody = THISBACK(PrintResume_CalcLangBody);
and definition of PrintResume_CalcLangBody
void AnketaListDlg::PrintResume_CalcLangBody() {
#undef VAR
#define VAR(x) rep.SubstVar("##" #x,AsString(sql[ANL_##x]));
Sql sql;
sql * SqlSelect(SqlAll()).From(ANKETALANGUAGE).Where(ANL_ANKETAID == gANK_ID).OrderBy(ANL_LANGUAGE);
while (sql.Fetch()) {
rep.RepGenCalculateBodyBeforeSubst();
VAR(LANGUAGE);
VAR(FINDLEVEL);
VAR(LEVEL);
rep.RepGenCalculateBodyAfterSubst();
}
}
##BT and ##ET can also create variable-columns reports.
SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
[Updated on: Tue, 21 August 2012 21:30] Report message to a moderator
|
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #37101 is a reply to message #37100] |
Wed, 22 August 2012 01:32   |
|
Yes. RepGen is made for this situations.
Yes We need adapt RepGen in part to define database variables and database loops and conditions. In other RepGen is fully ready to your project.
BTW, see RepGenTest - with first template. It is print labels.
SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Apr 28 14:15:08 CEST 2025
Total time taken to generate the page: 0.04537 seconds
|
|
|