Hyperlink Properties

 

That optional property allows to specify an Hyperlink (URL) that can be used later if you export the report to HTML format, using the command <File> <Export to HTML format> or to PDF format using the command <File> <Print to PDF>.

 

Example 1: you apply to the image properties in a report an Hyperlink pointing to the bookmark from another report: the formula #Graph of Events by Hour of the Day will search the bookmark named Graph of Events by Hour of the Day in the same report or the reportbook containing the current report.

 

Example 2: you apply to the image properties in a report an Hyperlink pointing to another PDF file whose name is build by a formula as the following example: ='Firewall_Daily_'+ rightstr('0'+str(year( Previous )),2)+ rightstr('0'+str(month( Previous )),2)+ rightstr('0'+str(day( Previous )),2)+'.pdf'

 

Example 3 you apply to the image properties in a report an Hyperlink giving the Web Site of a Company:

 

image\url_properties.gif

 

Then you export to HTML format the report. When opening the pages with an Internet navigator, you can click on the Company Logo to jump to the hyperlink address thus defined:

 

image\url_propertie2.gif

 

You can use the General Tab in the Properties Dialog Box to see or modify the Hyperlink address.

 

Example 4 you apply to a report field an hyperlink in order to open another report giving a value to a parameter. Thus, once the first report exported to HTML (locally or through Web Server), it will be possible to click on any value corresponding to the concerned field to get another report giving more detail about the chosen item.

 

How to feed that hyperlink?

 

Using Web ClicknDECiDE Web Menu, insert the 2 required reports, the report calling and the report called, as in the next example:

 

image\url_propertie3.gif

 

If you set on the option from Web ClicknDECiDE Web Menu using the command <View> <Show Ids>, the previous picture will look like:

 

image\url_propertie4.gif

 

Run the above example through a browser: the menu will display the 2 report names.

To know the URL address of the called report, make a right mouse click on the report "Sales for the chosen salesman from Salesmen list" and select the command <Copy the shortcut> as in the next example:

 

image\url_propertie5.gif

 

The clipboard contains now the URL address for that item, as follow:

 

http://192.168.3.20/d7cgiwin/d7webrun.dll?template=fr/menu/vision.htm&__mnu_alias=1&__mnu_itemid=
250&__wfs_title=Sales+for+the+chosen+salesman+from+Salesmen+list

 

in that above address we can see the server IP address but also the ID number for the menu item (here 250) containing the called report.

 

To give that URL (after some small modification explained later) in the calling report (here the report Salesmen), open that report under ClicknDECiDE Builder and display the properties for the field corresponding to the salesman name: (that example is given in the DemoWeb.wfv project in the Sample directory) and select the box Hyperlink in the General Tab:

 

image\url_propertie6.gif

 

Modifications to be done in the URL address thus copied:

- Replace http://192.168.3.20 by the equal sign followed by a single quote.

- Add after the report name a single quote and give the parameter name and the corresponding value as follow: + '&salesmancode='+str(SAL)

Here the parameter name is salesmancode

The value to be given is the value of the field SAL changed to a string using the Str function.

 

Warning:

 

the result for that example is the following:

='/d7cgiwin/d7webrun.dll?template=fr/menu/vision.htm&__mnu_alias=1&__mnu_itemid=250&__wfs_title=Sales+for+the+chosen+salesman+from+Salesmen+list' + '&salesmancode='+str(SAL)

 

Of course the query used by the called report contains the parameter "salesmancode" on the SAL field corresponding to the salesman code (equal sign in the criteria dialog box).
The called report will display thus the detailed information only for the chosen salesman.

 

Through a browser, run the first report Salesmen selecting for example the year 2001: a part of the result will look like:

 

image\url_propertie7.gif

 

Click now on the salesman Meyer Diane for example. The detailed report is called thanks to the URL thus defined and the parameter value given by the URL.

 

image\url_propertie8.gif

 

How to give several parameters and what to do if some of them are ignored ?

 

If there are several parameters it is enough to concatenate the information in the URL string as in the following example:

 

='/d7cgiwin/d7webrun.dll?template=fr/menu/vision.htm&__mnu_alias=DemoWeb&__mnu_itemid=250&__wfs_title=Sales+for+the+chosen+salesman+from+Salesmen+list' + '&salesmancode='+str(SAL)+ '&paramarea=''+AREA+'&paramdatebegin='+ParamAsString('paramdatebegin')+'&paramdateEnd='+ParamAsString('paramdateEnd')

 

If, when using through the Web, a parameter can be ignored, you can manage it as follow:

 

In the previous example, supposing that the parameter Salesmancode could be ignored, the syntax will become:

 

='/d7cgiwin/d7webrun.dll?template=fr/menu/vision.htm&__mnu_alias=DemoWeb&__mnu_itemid=250&__wfs_title=Sales+for+the+chosen+salesman+from+Salesmen+list' + '&salesmancode='+if(isdefined(sal),str(SAL),'IGNORE')+ '&paramarea=''+AREA+'&paramdatebegin='+ParamAsString('paramdatebegin')+'&paramdateEnd='+ParamAsString('paramdateEnd')

 

The function IF(IsDefined(parameter), action if true, action if false) allows to insert in a formula in a report a text or another text according to the condition true or false.That function can be used for example to modify the Report Title if the paramater has been ignored or not.