MagicSQLText Problem
Can Anyone Help
I want to modify my sql on the fly so have done the following code
{*** Preview The Report ***}
frmMain.repWork.Template.FileName := sRepDir + sPath + sReport;
frmMain.repWork.Template.LoadFromFile;
GetSQLObject(frmMain.repWork,lSQL);
If sCriteria <> '' Then
{*** Inserts Criteria Before Any Group By's ***}
{*** Or Order By's ***}
InsertCriteria(lSQL.MagicSQLText,sCriteria);
{EnDIF}
ShowMessage(lSQL.MagicSQLText.Text);
However this works for one of my reports, but my other report it is not
putting in my criteria on the report I have tryed using
lSQL.EditSQLAsText this works and fixes the problem however the report
no longer prints any of the variables.
Can Anyone help, Thankyou
Lee
I want to modify my sql on the fly so have done the following code
{*** Preview The Report ***}
frmMain.repWork.Template.FileName := sRepDir + sPath + sReport;
frmMain.repWork.Template.LoadFromFile;
GetSQLObject(frmMain.repWork,lSQL);
If sCriteria <> '' Then
{*** Inserts Criteria Before Any Group By's ***}
{*** Or Order By's ***}
InsertCriteria(lSQL.MagicSQLText,sCriteria);
{EnDIF}
ShowMessage(lSQL.MagicSQLText.Text);
However this works for one of my reports, but my other report it is not
putting in my criteria on the report I have tryed using
lSQL.EditSQLAsText this works and fixes the problem however the report
no longer prints any of the variables.
Can Anyone help, Thankyou
Lee
This discussion has been closed.
Comments
Please post future questions related to the Data workspace to the DADE
newsgroup.
Try downloading the following example:
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Sorry about that was doing rap stuff at the time finding the code for
editing DADE on the fly in this group, not thinking that it was DADE
,that is the example I used part off you do not have statements in that
example code on how to insert criteria 'where' clauses it is only order
bys' and Group By's Sorry if I missed something will post this to the
DADE section now.
Lee Bambury
Sorry about that was doing rap stuff at the time and found the code to
modify the DADE in this newsgroup was not thinking that it belonged to
DADE will move this thread across.
I have tryed to use the example that is what I have parts of but there
does not seem to be any crteria on how to insert where clauses sorry
not an expert with RBuilder still learning.
Cheers For The Reply
Lee