Friday, September 16, 2011


1.Consider a scenario where we need to open a PDF File by searching its existence by two different paths  in remote locations(if present in path 1 that  PDF file is opened,if not present in path 1ook in path 2 and open the PDF file ) by clicking the link in  SSRS reports.

Firts we need to Check in Path 1,if file exists open the file else check in path 2 and open the file.
these two paths are stored in a file.

1.Open the Report and go to Layout tab.

2.Go to Report---->Report Properties--->Click on Code tab write Custom code as shown.

Click ok

3.Point to the cell ,click on which pdf to be opened,then Right click and go to Properties-->Navigation--->Jump to the URL and write the" =javascript:void(" as shown
open the PDF file in a new window -->click ok.

4.Go to Preview tab -->Click view report will open with a hyperlink on the column clicking on which PDF will open.
1,When Complete URL of the path is not in one column of the table, concatenate them in a such a way that all shades in URL are forward slashes(\).

2.When Clicked on the hyperlink and if PDF doesnot open as the URL is not Populated correctly then replace all single slashes(\) with double slashes(\\) when using java script.

scenario 2


Consider a scenario in which we need to use stored procedures in SSRS reports.
While creating a Dataset,we can use 3 kinds of " Query Type".

3.Stored Procedure
Among the three, stored procedure is the best query type to be used with respect to performance of the reports.
Here are the steps to use procedure in the report

1.Select the Datasource.

2.Create Dataset and select the stored procedure which is refering for this report.

3.Click on the Query Designer and try to enter the parameters for this procedure .Click on "OK"
you will be able to see the output for the procedure.

>In the report requirement if only time field should be displayed.where a sin the Stored procedure(Date time) field is modified to display only time field.Like[TIME]=CAST(MAX(p.Visit Date Time)AS TIME) in Report_1.we are modifying the stored procedure for this simple requirement which may not be desirable.
Below is the logic where there will not be any modification required in the stored procedure as a whole.

> =Format(Today11+Fields!Time.value),"HMM").It will display only time in desired format(2300HRS Format).


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.