Funciones especiales Neoreport (gestor de informes)
Gestor de reportes gratuito y perfecto para vuestras aplicaciones (sean del tamaño que sean) .net (2.0). Podeis descargarlo aquí.
Special functions are special string that you can insert into some text properties such as Label text, OleDb DataSource connection string or Image ImageFile to get some dynamic values.
This is the list of supported functions.
Report related functions
{@ReportPath}
The report path.
This can be useful if used into a connection string or an image path to indicate a relative path to a .mdb or a picture file.
i.e.:
Image1.ImageFile = "{@ReportPath}imagesmypicture.jpg"
{@PageCount}
The total number of pages of the generated report.
This can be used with {@PageNumber} to write the current page info:
i.e.:
Label1.Text = "Page {@PageNumber} of {@PageCount}"
{@PageNumber}
The current page number.
This can be used with {@PageCount} to write the current page info:
i.e.:
Label1.Text = "Page {@PageNumber} of {@PageCount}"
{@RecordCount}
The total number of record in the generated report.
This can be used similarly to {@PageCount} and {@PageNumber} to write the current record info:
i.e.:
Label1.Text = "Article {@RecordNumber} of {@RecordCount}"
{@RecordNumber}
The current record number in the generated report.
This can be used similarly to {@PageCount} and {@PageNumber} to write the current record info:
i.e.:
Label1.Text = "Article {@RecordNumber} of {@RecordCount}"
Data related functions
These functions If used into a GroupSection them are executed ont the records included into the group by the property GroupFieldList.
If used into others sections it does the sum for all the records in the report.
These functions have the following syntax:
{@() }
where
is the function name, i.e. COUNT or SUM
is the field against which the function is executed.
is an optional list of options separated by spaces.
The option syntax is
()
where
can be
f
for the format
The format used to write the data. This can be i.e. 0.00 if you want a number formatted with 2 decimal digits.
n
for the null text
The null text is the text to be printed if the data into the field is Null.
Examples
{@SUM(UnitPrice)}
Prints the sum of the field UnitPrice using the current settings for numbers.
{@SUM(UnitPrice) f(0.00)}
Prints the sum of the field UnitPrice with 2 decimal digits.
{@SUM(UnitPrice) f(#,##0.00)}
Prints the sum of the field UnitPrice with thousand separator and 2 decimal digits.
{@FIELD(UnitPrice) f(0.00) n(*Price not available*)}
Prints the content of the field UnitPrice with 2 decimal digits and prints “*Price not available*” if the UnitPrice is Null .
{@FIELD(UnitPrice) n(*Price not available*)}
Prints the content of the field UnitPrice or “*Price not available*” if the UnitPrice is Null .
Supported functions
{@AVG()}
Compute the average of the field.
{@COUNT()}
Compute the count of the record in the group.
{@FIELD()}
Return the value of the field.
{@MAX()}
Return the max value for the field into the group.
{@MIN()}
Return the min value for the field into the group.
{@NR_FIELD()}
Return value of the field in the next record.
{@SUM()}
Return the sum of the value of the field into the group.
posted in Programacion | 0 Comments