|
<Substitutions></Substitutions>
This area is where you add prompts for Iron Speed Designer to ask questions. Iron Speed Designer needs
to know more about your third-party control before it can implement it into your application.
You do this by adding variables for Iron Speed Designer to use with your Code Template. As always, you
will use of the one of the predefined pairings; in this example I am using the <variable></variable>
pair to name my control.
<Variable>
<Name>MyWebViewer</Name>
<Description>The name of the instance of this control</Description>
<Type>UniqueId</Type>
</Variable>
|
There are a number of variables that I can specify to have Iron Speed Designer prompt for.
These include:
| Variable Name |
Description |
| Button |
shows all the gen:buttons in the current aspx page |
| ColumnType |
shows all possible column types---boolean, image, int, char, etc. |
| Control |
shows all controls in the current aspx page |
| FieldLabel |
shows all fieldlabels in current aspx page |
| FieldName |
shows all fieldnames in from a database table |
| FieldValue |
shows all fieldValues in current aspx page |
| Filter |
shows all filters in current aspx page |
| DropDownList |
shows all dropdowns in current aspx page |
| Table |
shows all table controls in current aspx page |
| TableName |
shows all tables in a database |
| ListItem |
allows you to specify any list of items |
| CrystalReportsClass |
shows all crystal report class in current application |
| RecordControl |
shows all Record controls in current aspx page |
| TableControl |
shows all Table controls in current aspx page |
| RecordControlClass |
shows all names of record controls classes in current aspx page |
| TableControlClass |
shows all names of table controls classes in current aspx page |
| File |
allows you to browse and pick a file |
| ResourceValue |
allows you to get a value from the resource file |
The first thing I want to do is prompt the user for the location of an ActiveReports report
file (.rpx ). See the XML segment for a variable below:
In the example above we identify five pieces of information needed for Iron Speed Designer to
help us select a file.
- Variable Name
- Description
- Additional Description
- Type
- File Extension
With this information in hand, Iron Speed Designer can present the following to us when configuring
the third-party control after having placed the control onto a web page in the Design tab:
You can see, the first variable has the name "ActiveReportFileName". It is asking us to specify the
location of an existing ActiveReports report file. In the Description area I have provided a description
to use as an example.
When I click the Browse button, I see that the File Select dialog limits the display to files with an
.rpx extension as shown below:
<Variable></Variable>
Next, we tell Iron Speed Designer (and by default Visual Studio) about any .DLLs that your third-party
control uses.
The example below shows how I created a prompt asking the user to locate and select a particular DLL required
for an ActiveReports report.
Note: you will need to create one of these XML pairings for each DLL that your
control needs.
Fortunately, Iron Speed Designer remembers the DLLs you select the first time you run this code template,
so you will not be faced with the prospect of having to select these every time you use the template in the
future. The selections are still there to be overwritten if need be.
The picture below shows the code template remembering my previously selected .DLL files.
Remember that the DLLs you select are version specific. When you upgrade to a different version of
your control you will have to change your code template and DLL selections. I will discuss this in
more detail later.
With this code template for ActiveReports I required references to four different files; that is why
there are four pairs.
Below is the references section in Visual Studio after running the Configuration Wizard. (Note: I compiled
my Iron Speed Designer application first.)
<AdditionalDescription></AdditionalDescription>
Here you will put information that would be helpful to the user. In this case I have put an example
of the type of file that I want the user to select. You could easily add whatever other text message
you want here.
<Type>File</Type>
This tells Iron Speed Designer that you want to select a file. This reference triggers the Browse dialog
to appear.
And last but not least...
<FileExtension>rpx</FileExtension>
Because I don't want users to select a file that is incorrect for the third-party control that I
am using, I make sure they only select ActiveReports report files.
|