OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MReporting.TRptFormatQuery Class Reference

tools to format an SQL query so that it is useful for the SQL server More...

Public Member Functions

 TRptFormatQuery (string ASQLStmt="", List< OdbcParameter > AOdbcParameters=null, TParameterList parameters=null, int column=-1, int depth=-1)
 constructor More...
 
bool IsZeroOrNull ()
 returns true if the value is zero or null More...
 
TVariant ConvertToVariant ()
 only a workaround for text on the report that is not used for sql queries More...
 
override string ToString ()
 convert to string for debugging purposes only More...
 
void Add (string sql)
 add more text to the sql statement More...
 
void Add (TVariant v, string format="")
 add more to the variant More...
 
void Add (TRptFormatQuery AQueryToAdd)
 combine two sql statements with parameters More...
 
void AddOdbcParameters (string APrefix, string AName, string APostfix, TVariant AValue)
 add an odbc parameter, and replace the placeholders More...
 
void ReplaceVariables ()
 replace all place holders with values stored in the parameters list More...
 

Protected Member Functions

void ReplaceVariablesPattern (String searchOpen, String searchClose)
 Replace parameters with ODBC Parameters More...
 

Properties

string?? SQLStmt [get]
 read the sql statement More...
 
bool IsVariant [get]
 returns true if this is not an sql statement but a single value that can be accessed through the VariantValue property More...
 
TVariant VariantValue [get]
 returns the value if it is not an SQL statement. More...
 
List< OdbcParameter > OdbcParameters [get]
 read the odbc parameters More...
 

Detailed Description

tools to format an SQL query so that it is useful for the SQL server

Constructor & Destructor Documentation

◆ TRptFormatQuery()

Ict.Petra.Server.MReporting.TRptFormatQuery.TRptFormatQuery ( string  ASQLStmt = "",
List< OdbcParameter >  AOdbcParameters = null,
TParameterList  parameters = null,
int  column = -1,
int  depth = -1 
)
inline

constructor

Member Function Documentation

◆ Add() [1/3]

void Ict.Petra.Server.MReporting.TRptFormatQuery.Add ( string  sql)
inline

add more text to the sql statement

◆ Add() [2/3]

void Ict.Petra.Server.MReporting.TRptFormatQuery.Add ( TRptFormatQuery  AQueryToAdd)
inline

combine two sql statements with parameters

◆ Add() [3/3]

void Ict.Petra.Server.MReporting.TRptFormatQuery.Add ( TVariant  v,
string  format = "" 
)
inline

add more to the variant

◆ AddOdbcParameters()

void Ict.Petra.Server.MReporting.TRptFormatQuery.AddOdbcParameters ( string  APrefix,
string  AName,
string  APostfix,
TVariant  AValue 
)
inline

add an odbc parameter, and replace the placeholders

◆ ConvertToVariant()

TVariant Ict.Petra.Server.MReporting.TRptFormatQuery.ConvertToVariant ( )
inline

only a workaround for text on the report that is not used for sql queries

Returns

◆ IsZeroOrNull()

bool Ict.Petra.Server.MReporting.TRptFormatQuery.IsZeroOrNull ( )
inline

returns true if the value is zero or null

◆ ReplaceVariables()

void Ict.Petra.Server.MReporting.TRptFormatQuery.ReplaceVariables ( )
inline

replace all place holders with values stored in the parameters list

◆ ReplaceVariablesPattern()

void Ict.Petra.Server.MReporting.TRptFormatQuery.ReplaceVariablesPattern ( String  searchOpen,
String  searchClose 
)
inlineprotected

Replace parameters with ODBC Parameters

Parameters
searchOpen
searchClose

◆ ToString()

override string Ict.Petra.Server.MReporting.TRptFormatQuery.ToString ( )
inline

convert to string for debugging purposes only

Property Documentation

◆ IsVariant

bool Ict.Petra.Server.MReporting.TRptFormatQuery.IsVariant
get

returns true if this is not an sql statement but a single value that can be accessed through the VariantValue property

Returns

◆ OdbcParameters

List<OdbcParameter> Ict.Petra.Server.MReporting.TRptFormatQuery.OdbcParameters
get

read the odbc parameters

◆ SQLStmt

string?? Ict.Petra.Server.MReporting.TRptFormatQuery.SQLStmt
get

read the sql statement

◆ VariantValue

TVariant Ict.Petra.Server.MReporting.TRptFormatQuery.VariantValue
get

returns the value if it is not an SQL statement.


The documentation for this class was generated from the following file: