RTF_CreateReport, RTF_FindQuestion, RTF_OpenFile, RTF_ReplaceAllLuciaFeatures, RTF_ReplaceLuciaFeature, RTF_ReplacePicture, RTF_ReplaceQuestion, RTF_ReplaceVariables
Description
RTF_CreateReport(
char *SourceFile
);
This function creates a report from a specified report template. The template file is parsed and its filled with appropriate data.
Note
This function fills the specified report template with data. Make sure you always call this function on a copy of the report template, since when the template gets filled with data, it cannot be used as a template anymore. The report template is a .rtf file that contains specific tags marking places where the data should be inserted.
See Also
RTF_OpenFile
Description
RTF_FindQuestion( char *DestinationFile
, char *Question
, int *Length
, char *Directory
);
This function is for internal use only! Use RTF_CreateReport instead. RTF_FindQuestion locates a “question” - a specific tag within the RTF file and provides information about it.
Directory parameter is the found default value for the question (filled by the function).
Parameters
Note
This function finds a specific string of the form $$$question$ or $$$question$$number$ in the input file. The question is returned as the Question parameter, while the number is returned as the Length parameter. The Directory parameter obviously contains the Length value in a string form.
See Also
RTF_ReplaceQuestion
Description
RTF_OpenFile(
char *DestinationFile
);
This function opens an RTF file for viewing.
Note
This function opens the specified RTF file for viewing. The file is opened in a default application registered for handling RTF files, which would usually be WordPad or Microsoft Word. The file should have .rtf extension for the function to run properly.
See Also
RTF_CreateReport
Description
RTF_ReplaceAllLuciaFeatures(
char *SourceFile
);
This function is for internal use only! Use RTF_CreateReport instead. RTF_ReplaceAllLuciaFeatures replaces special tags within the source .rtf file by their values.
Note
Special tags within the source .rtf file are replaced with their values. The tags can specify current time, date, measured data from the application, etc...
Description
RTF_ReplaceLuciaFeature( char *SourceFile
, char *Feature
);
This function is for internal use only! Use RTF_CreateReport instead.
Description
RTF_ReplacePicture( char *SourceFile
, char *DestinationFile
, intPicture
, intWidth
, intHeight
, intMode
);
This function is for internal use only! Use RTF_CreateReport instead. RTF_ReplacePicture replaces the first occurrence of the string $$$ picture $$$ in the source file with the picture of specified parameters. The results of the replacement are stored to specified destination file.
Parameters
Mode
Specifies how is the width and height information treated.
The picture is stretched to fill the entire document. The width and height specified are ignored. | |
The width and height values specify the size of the picture in percents. That means that width and height set to 100 will keep the picture in its original size. | |
The picture will be inserted in its calibrated size. That means that the picture should have identical physical dimensions in the document as the dimensions the picture was calibrated for. The width and height parameters are ignored. |
Note
The function replaces the first $$$ tag with a picture of given dimensions. The pictures are taken from current picture buffers of the application.
Description
RTF_ReplaceQuestion( char *SourceFile
, char *DestinationFile
, char *Question
);
This function is for internal use only! Use RTF_CreateReport instead. RTF_ReplaceQuestion replaces the first occurrence of a specific tag within the .rtf file with specified data.
Parameters
Note
Use this function to replace first occurrence of $$$question$ in the source file by whatever string specified. The results of replacement are stored into the destination file.
See Also
RTF_FindQuestion, RTF_ReplacePicture
Description
RTF_ReplaceVariables( char *SourceFile
, char *DestinationFile
);
This function is for internal use only! Use RTF_CreateReport instead. RTF_ReplaceVariables reads the specified .rtf source file into memory and replaces all variables within it with appropriate values. A variable can be basically any piece of script contained within the &&& delimiters.
Parameters
Note
This function parses the .rtf file and replaces all occurrences of tags in the form &&& script &&& with a result of the script execution.