Saturday, February 25, 2012

Custom Data Extension - Query String

Hi,
--Question
I have a created a custom data extension and I want to populate the query
string with some default text, how can I do this? I've initialised the
command text property to my desired default but it always shows an empty
string in the designer? I've included the background as to why I want to do
this below.
Any help would be much appreciated
--Background info
I have created a custom data extension which works just fine when I hard
code the 3 parameters required. These parameters are actually instruction for
my DAL to work with so they are essential to know up front, rather than
typical parameters that would be passed to a SP to filter data. My parameters
are XmlConfigFile and DataProviderID, my DAL then creates an object using
info from the config file for the specified DataProviderID. Since these
params are essential to return any data I want them to be passed via the
query string, I also want the default query string to have them populated
with empty strings
e.g. @.XmlConfigFile='' ; @.DataProviderId=''
This way the report designer just needs to add the values an not remember
the parameter names.The CommandText property gets set by report designer based on the
user-specified values. From the designer point of view, the CommandText
property is "set-only". It will never get the value of the property.
Not sure if this would work for your situation, but you could generate a
"report template" which has a prepopulated dataset with command text.
Instead of creating a new report, report authors should instead create the
new report based of that template.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Neil" <Neil@.discussions.microsoft.com> wrote in message
news:BDF78560-A993-4CBD-A126-3B8DB7D70C2E@.microsoft.com...
> Hi,
> --Question
> I have a created a custom data extension and I want to populate the query
> string with some default text, how can I do this? I've initialised the
> command text property to my desired default but it always shows an empty
> string in the designer? I've included the background as to why I want to
> do
> this below.
> Any help would be much appreciated
> --Background info
> I have created a custom data extension which works just fine when I hard
> code the 3 parameters required. These parameters are actually instruction
> for
> my DAL to work with so they are essential to know up front, rather than
> typical parameters that would be passed to a SP to filter data. My
> parameters
> are XmlConfigFile and DataProviderID, my DAL then creates an object using
> info from the config file for the specified DataProviderID. Since these
> params are essential to return any data I want them to be passed via the
> query string, I also want the default query string to have them populated
> with empty strings
> e.g. @.XmlConfigFile='' ; @.DataProviderId=''
> This way the report designer just needs to add the values an not remember
> the parameter names.

No comments:

Post a Comment