EndUser Report - Adding a Datapipeline to Dataview and then assign the sql statement
I understand how to add new dataviews to a enduser report in code. And how
to build the sql statements for the datapipelines with the SqlBuilder
methods.
But what is the proper way to assign a custom sql statement to the new
dataview datapipeline?
We have sql statements built in another visual query builder. What I want
to accomplish is using this custom sql statement in a new report that is
fully built in code - no report wizard.
Currently, I can build the report with no problems using a query and
DBpipeline that is currently on the form. The labels and fields are built
from the assigned datapipeline very much like the report wizard does.
What I would like to do is use the query that has already been here but
assign in the dataview datapipeline created for the enduser report. The sql
and fields selected will not be modified by the enduser in the report. In
fact, I plan to turn off the data tab from the enduser design view.
The report will always be run with a sql statement that is built outside of
the report. And I need the sql statement to be in a dataview so the report
is self-contained and able to be copied with data capabilities intact.
I think this is probably pretty simple, but cannot find in the help which
Sql text or MagicSql text to assign in the TdaSql object for the pipeline.
And it may be that I should be running an update or resync in the object to
reset the field assignments.
If there is a full example of this, please point me in the right direction.
Thanks ahead of time.
Bill Brittain
to build the sql statements for the datapipelines with the SqlBuilder
methods.
But what is the proper way to assign a custom sql statement to the new
dataview datapipeline?
We have sql statements built in another visual query builder. What I want
to accomplish is using this custom sql statement in a new report that is
fully built in code - no report wizard.
Currently, I can build the report with no problems using a query and
DBpipeline that is currently on the form. The labels and fields are built
from the assigned datapipeline very much like the report wizard does.
What I would like to do is use the query that has already been here but
assign in the dataview datapipeline created for the enduser report. The sql
and fields selected will not be modified by the enduser in the report. In
fact, I plan to turn off the data tab from the enduser design view.
The report will always be run with a sql statement that is built outside of
the report. And I need the sql statement to be in a dataview so the report
is self-contained and able to be copied with data capabilities intact.
I think this is probably pretty simple, but cannot find in the help which
Sql text or MagicSql text to assign in the TdaSql object for the pipeline.
And it may be that I should be running an update or resync in the object to
reset the field assignments.
If there is a full example of this, please point me in the right direction.
Thanks ahead of time.
Bill Brittain
This discussion has been closed.
Comments
You should be able to update the SQLText property to add custom sql code.
Take a look at the following examples of creating all the dade components
needed and editing the SQL code using the SQL object.
http://www.digital-metaphors.com/tips/CreateDataModuleAndEditSQLText.zip
http://www.digital-metaphors.com/tips/CreateDataModCustOrderLinkedDataViewsADO.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The demo you pointed to was perfect. I was using almost identical code
except for the sql assignment.
I was assigning to the SQLText.Text as a string instead of the SqlText
directly using a TStrings list.
That made the difference so there must be some update event occurring upon
the change of SqlText.
Thank you so much for your help.
Bill Brittain