I was deploying my .aspx page that shows SSRS reports on Microsoft Report Viewer Control. After deploying the website, the report came successfully but the dundas charts weren't showing up.
After struggling for a long time, following steps i had to perform showed up the charts:
a. Copied the following dundas dll's to this location - 'C:\Program Files\Microsoft SQL Server\MSSQL.x\Reporting Services\ReportServer\bin'
- DundasRSChart.dll
- DundasRSChartDesigner.dll
- DundasWebChart.dll
b. Added the following code to the 'rsreportserver.config' file at 'C:\Program Files\Microsoft SQL Server\MSSQL.x\Reporting Services\ReportServer' location (inside the <Extensions> element):
</Service>
<Extensions>
<ReportItems>
<ReportItem Name="DundasChartControl" Type="Dundas.ReportingServices.DundasChart,DundasRSChart" />
</ReportItems>
<Delivery>
c. Added the following code to the 'rssrvpolicy.config' file at 'C:\Program Files\Microsoft SQL Server\MSSQL.x\Reporting Services\ReportServer' location (Make sure the following <IMembershipCondition> tag exists within the element <CodeGroup>):
</CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="DundasChartControl" Description="This code group grants FullTrust to DundasChartControl assemblies."> <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100d
16006505277d0860ce7d429331480cb3b9711481cd51213259cf3b106e30156f5ef48262e0154e862fa
05374e6c7cef5c4daa95b2272a73e503f0e5077c6b71a24176e67eadbff8e8765742f022e317194571de
05d0ac9a4fca62fd355854ebe5a38969a831030018edad7d7405dd23d0710c9faf95acf16a4a14003bada
5be" />
</CodeGroup>
</CodeGroup>
</CodeGroup>
</PolicyLevel>
Refer to this site for more details: http://support.dundas.com/Default.aspx?article=1107
This made my day. The charts showed up with a surprise.
How to configure dundas charts when deploying Reporting Services components to a server manually
Posted by Techie Cocktail | 7:50 PM | ASP.Net, SQL Server Reporting Services, Troubleshoot | 0 comments »Report Viewer Control in IE6, IE7, FireFox
Posted by Techie Cocktail | 12:26 PM | ASP.Net, SQL Server Reporting Services | 2 comments »My web app has a report viewer control. Its layout was fine when viewed in IE7. But in FireFox browser, it shrinked both on width and height. Also in IE6, the report viewer control collapsed on height and the chart and report were not visible.
After breaking my head on figuring out the cause, found a fix:
a. Comment/remove the DOCTYPE line from the .aspx page.
b. On the Report Viewer control, change the AsyncRendering property value to "False". Default is set to "True"
Also, if you are getting a Report Viewer Scroll bar for long data, do the following to remove the Report Viewer scrollbar and use the entire webpage to scroll:
a. Remove the height attribute value if you have set any.
b. Set Width to 100%.
The above fixes made my Report Viewer Control to work on all browsers properly without any layout or scrolling issues and made my life.
References: http://arcanecode.wordpress.com/2007/11/29/sql-server-2005-reporting-services-reportviewer-control-and-ie7/
The attempt to connect to the report server failed. Check your connection information and that the reportserver is a compatible version.
Posted by Techie Cocktail | 4:11 PM | SQL Server Reporting Services | 4 comments »I ran into this issue and was happy to find this solution. Thought of sharing this fix and also for my future reference purpose.
Error: The attempt to connect to the report server failed. Check your connection information and that the reportserver is a compatible version. The request failed with HTTP status 404: Not Found.
This means that you have configured the /reportserver/ app to not be reachable via http://localhost/...
Solution:
a) Add the localhost hostheader to the web-site which hosts the /reportserver/ and make sure the app is then reachable via that path.
b) Edit the file -
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportManager\RSWebApplication.config
and add the full url to the ReportServer into the ReportServerUrl tag (no ending / nessesary) AND remove the value from ReportServerVirtualDirectory (otherwise you get nasty, unprecise exceptions). THEN you must recycle the app-pool used by the Report-Manager so that config file is being reloaded
<UI>
<ReportServerUrl>http://localhost/reportserver
<ReportServerVirtualDirectory></ReportServerVirtualDirectory>
<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
</UI>
Reference: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=198252&SiteID=1
Using two WebServices exposed by SSRS to create PDF report formats programmatically
Posted by Techie Cocktail | 11:24 PM | SQL Server Reporting Services | 3 comments »I had a requirement to automate the generation of PDF files of SSRS reports.
Figured out a way to use 2 webservices exposed by SQL Server Reporting Services 2005:
a. ReportService2005
b. ReportExecution2005
Implementation:
a. Create SSRS reports and deploy it on the report server.
b. In the windows application add reference to the 2 SSRS webservices: ReportService2005, ReportExecution2005
c. Set default report credentials.
d. Set 2 webservies url
e. Load the SSRS report using ReportExecution2005
f. Get SSRS reportparameters using ReportService2005, to get the total parameters in the report and set the appropriate parameters value to render the report using ReportExecution2005. (confused !!!. Check the code below)
g. Set report parameters using SetExecutionParameters() method of ReportExecution2005.
h. Render the report to get the PDF in byteArray format.
i. Write the pdf byteArray[] to the given pdf file using FileStream Class.
Source Code:
static private void CreatePDFReports()
{
//create proxy to the webservice
ReportService2005.ReportingService2005 rs2005 = new ReportService2005.ReportingService2005();
ReportExecution2005.ReportExecutionService re2005 = new ReportExecution2005.ReportExecutionService();
try
{
//authenticate to the web service using windows credentials
rs2005.Credentials = System.Net.CredentialCache.DefaultCredentials;
re2005.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs2005.Url = ConfigurationSettings.AppSettings["ReportService2005.ReportService2005"];
re2005.Url = ConfigurationSettings.AppSettings["ReportExecution2005.ReportExecution2005"];
//prepare render arguments
string historyID = null;
string deviceinfo = null;
string format = "PDF";
byte[] bytPDF;
string encoding = string.Empty;
string mimeType = string.Empty;
string extension = string.Empty;
ReportExecution2005.Warning[] warnings = null;
string[] streamIDs = null;
//define variables needed for GetParameters() method
//get the report name
string _reportname = ConfigurationSettings.AppSettings["reportName"];
string _historyID = null;
bool _forRendering = false;
ReportService2005.ParameterValue[] _values = null;
ReportService2005.DataSourceCredentials[] _credentials = null;
ReportService2005.ReportParameter[] _parameters = null;
//load the selected report.
ReportExecution2005.ExecutionInfo ei = re2005.LoadReport(_reportname, historyID);
//Get the no. of parameters in the report.
_parameters = rs2005.GetReportParameters(_reportname, _historyID, _forRendering, _values, _credentials);
int totalParams = _parameters.Length;
ReportExecution2005.ParameterValue[] parameters = null;
//prepare report parameters
parameters = new ReportExecution2005.ParameterValue[totalParams];
foreach (ReportService2005.ReportParameter rp in _parameters)
{
switch (rp.Name)
{
case "param1_name":
{
parameters[_parameters.Length - totalParams] = new scheduleReports.ReportExecution2005.ParameterValue();
parameters[_parameters.Length - totalParams].Name = rp.Name;
parameters[_parameters.Length - totalParams].Value = 1;
}
break;
case "param2_name":
{
parameters[_parameters.Length - totalParams] = new scheduleReports.ReportExecution2005.ParameterValue();
parameters[_parameters.Length - totalParams].Name = rp.Name;
parameters[_parameters.Length - totalParams].Value = 100;
}
break;
}
totalParams--;
}
re2005.SetExecutionParameters(parameters, "en-us");
bytPDF = re2005.Render(format, deviceinfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
FileStream fs = new FileStream("report.pdf", FileMode.OpenOrCreate, FileAccess.Write);
fs.Write(bytPDF, 0, bytPDF.Length);
fs.Close();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.Read();
}
}
DeviceInfo Settings for SSRS (PDF, Image, etc)
Posted by Techie Cocktail | 12:07 AM | SQL Server Reporting Services | 0 comments »Suppose you export your SSRS report to PDF extension format (or any other available formats) and your one page report gets broken down into two pages in PDF file, this can be taken care of by updating its 'Device Information Settings'.
The 'Device information settings' section also allows you to override the export extension names by overriding them.
There are other configurable settings as well which can be updated as needed.
Below is how you would do it:
Go to 'rsreportserver.config' at 'C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer' location and update the settings as follows:
...
...
<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,Microsoft.ReportingServices.ImageRendering">
<OverrideNames>
<Name Language="en-us">PDF (Updated)</Name>
</OverrideNames>
<Configuration>
<DeviceInfo>
<MarginBottom>0in</MarginBottom>
<MarginLeft>0.25in</MarginLeft>
<MarginRight>0in</MarginRight>
<MarginTop>0in</MarginTop>
<PageHeight>10in</PageHeight>
<PageWidth>11in</PageWidth>
</DeviceInfo>
</Configuration>
...
...
</Extension>
</Render>
The above updated settings increases the resolution and accommodates the report in one page in the exported PDF file.
Also, in the 'Export' drop down list, the overridden name "PDF (Updated)" would appear.
For more information on the available 'Device Information Settings' visit: http://msdn.microsoft.com/en-us/library/aa179622(SQL.80).aspx
Update Export Options List Items in SSRS
Posted by Techie Cocktail | 1:31 AM | SQL Server Reporting Services | 3 comments »The below figure shows the default Export Options in SSRS report toolbar. These export options are configurable and can be updated. Say for example you are required to show only PDF and IMAGE export options.
Solution:
This can be achieved by updating the configuration settings of the report server. These configuration settings are stored in the RSReportServer.Config file in 'C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer' folder.
In this file, look for the
<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Microsoft.ReportingServices.XmlRendering" />
<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false" />
<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering" />
<Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Microsoft.ReportingServices.ImageRendering" />
<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,Microsoft.ReportingServices.ImageRendering" />
<Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RemoteGdiReport,Microsoft.ReportingServices.ImageRendering" Visible="false" LogAllExecutionRequests="false" />
<Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" LogAllExecutionRequests="false" />
<Extension Name="HTML3.2" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html32RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" />
<Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering" />
<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" /> </Render>
Note some extension tags have "Visible" attribute with the boolean value as "false". This means that the extension tag whose "Visible" attribute is set to false will not be visible in the dropdown list box. The extensions that are visible do not have the "Visible" attribute set because they are defaulted as "true".
As here we want to show only PDF & IMAGE extensions, hence update other extensions by setting their "Visible" attribute’s value to "false" as below:
<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Microsoft.ReportingServices.XmlRendering" Visible=”false”/>
<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false" />
<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering" Visible=”false”/>
<Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Microsoft.ReportingServices.ImageRendering" />
<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,Microsoft.ReportingServices.ImageRendering"/>
<Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RemoteGdiReport,Microsoft.ReportingServices.ImageRendering" Visible="false" LogAllExecutionRequests="false" />
<Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" LogAllExecutionRequests="false" />
<Extension Name="HTML3.2" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html32RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" />
<Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible=”false”/>
<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" Visible=”false”/> </Render>
For more details, you can refer http://msdn.microsoft.com/en-us/library/ms157153.aspx
Multiple Y-Axis or Both sides of Y-Axis
Posted by Techie Cocktail | 10:57 PM | SQL Server Reporting Services | 0 comments »If there are two series to be represented against one parameter in the chart where one series value is always going to be high compared to the other, better representation would be to show the two series on different sides of Y-Axis.
Example:
The below table shows the number of professionals passed/failed in the certification exams on a particular date, where most of the time the Fail ratio is lower than the Pass ratio.
| Sr No | Date | Passed | Failed |
| 1 | 2008-07-05 09:00:00.000 | 9 | 1 |
| 2 | 2008-07-06 09:00:00.000 | 8 | 2 |
| 3 | 2008-07-09 09:00:00.000 | 10 | 0 |
Following are the steps on how you would represent both series values on different sides of Y-Axis using DUNDAS Charts:
a. Add both Pass & Fail series as values & group it by date as in the following chart.
b. Double-click on 'Failed' series, for its details. Go to 'Series' Tab.
c. Select the Y-Axis Type value from the drop-down as 'Secondary'.
d. Below is how it would look like.