Showing posts with label tab. Show all posts
Showing posts with label tab. Show all posts

Monday, March 26, 2012

Reporting Services 2005 - Problems displaying a report via a ReportViewer control.

I have a report that displays fine in VS 2005 (in the Preview tab), and if I hit it via a URL in IE as a deployed report. However, when I embed it in a ReportViewer control for display on a web site, I get no data back for the report. I am using an Oracle database for the data source. None of the the logs in reporting services show anything wrong, there are no events in the event viewer to indicate any problems, Oracle logs also show no problems and no errors are returned to the page when the "View Report" button is clicked.

Anyone out there have a clue? I certainly don't.

Mike

The web site is executing the report viewer control with a certain (ASP.NET) user context. Most likely this account does not have any permissions to access the installation of the Oracle client software (or the Oracle client software is not installed at all on the web server).

Check this KB article for more details how to configure directory security: http://support.microsoft.com/?kbid=870668

-- Robert

|||

I thought the same thing at first, but permissions checked out fine. I found out that the problem is a rather esoteric interaction of Div and Table HTML element display characteristics during report generation (at least that's what the MSDN article says at http://msdn2.microsoft.com/en-us/library/ms252090.aspx).

The gist of it is that when you have the ReportViewer control properties set to render Asynchronously and have the height set to a '%' value (I was using 100%), the calculated height passed in the HTML is set to '0' so no report displays. You have the choice of using a fixed height and Asynchronous rendering or a percentage height and synchronous rendering.

Mike

|||

Thanks for posting your findings!

-- Robert

sql

Tuesday, March 20, 2012

Reporting Services

I am trying to jump to a seprate report from a text box.

In properites on the Navigation tab I selected Jump to (name or report) and in the Parameters box I selected =Fields!ProjName.Value so it will only give me the project name.

When I run and try to jump to the report I get this error.

An error occured during local report processing. An attempt was made to set a report parameter ProjectName this is not difined in this report.

Hey David,

I am trying to get a good idea of what you are attempting to do, however I am having a difficult time seeing it.

Are you trying to change reports when someone types a report name in a text box?

Are you trying to run a specific report for a certain project?

Do you have a report that actually has a ProjectName parameter created in it?|||Here is what I am trying to do I have a report That lists projects in a table. I want to be able to click on a project and have it jump to a completely different report based on the value of the item I clicked on. so If I click on project A it will take me to a different report that contains all the data about project A. to do this I am right clicking on the cell or textbox in the table that contains the project field (=Fields!ProjName.Value) I bring up the Textbox Properties box and select the Navigation box in the Jump to report I select the other report I created called DevSummary I then click on the Parameters box and add the following Parameter Name ProjName Parameter Value: =Fields!ProjName.Value When I run the report I get this error. An error occurred during local report processing. An attempt was made to set a report parameter 'ProjName' that is not defined in this report. below is a screen shot of what I am trying to do.|||

Hi,

What are your parameter names in the DevSummary report?

Aidan

|||Apologies Awysbrke - just noticed that you had already asked the same question...|||

There are no parameters defend in the DevSummary report?

How do I define parameter names here?

|||Ok David, I may see what is going on here.

You are wanting to view a report named DevSummary, with the information for the project that was clicked on in the specific text box. As far as I know this is all correct.

Now, where we are getting tossed by SSRS is when we try to pull up the second report. You are telling SSRS that you want the DevSummary report to process all the information for Parameter Name "ProjName".

Your DevSummary report definition file does not contain a parameter for ProjName, so it is kicking it back.

When you created the DevSummary report file, specifically the dataset, did you put any parameters in your SQL statement? What is the criteria for the actual DevSummary report using to retrieve the data?

If you are making a report for a specific project, you probably used a parameter for teh criteria, get that parameter name and then put the new name into the textbox navigation instead of the one named "ProjName"

I apologize if I insulted anyones intelligence, I am still learning this myself and like to write things out in detail :)

I hope this helps!

Anthony|||

You did not insult my intelligence at all. It makes perfect sense now. I need to create a dataset with a parameter in it and use the value from that in my second report called DevSummary. So correct me if I am wrong but the SQL would go something like

SELECT ProjName, whatever, whatever, whatever

FROM ProjectTable

WHERE ProjName = @.ProjName

Then use the @.ProjName in the report parameter in the DevSummary Report.

|||Exactly bro :)|||

I am now getting this error.

A data source instance has not been supplied for the data source 'DataSet4_Project'.

What does it mean

|||David,

How are you accessing this report?

Are you using hte default Report Manager, or are you writing your own asp application to view the report using the Report Viewer?

Also, 2000 or 2005?|||

I am Wrinting my own app using Report Viewer and SQL Server 2000

I am doing my development in Visual Studio.net 2005

|||David,

The error you are getting is telling you that there is no datasource on the server for the report. When you created the report, the first thing it should have asked was how you wanted to connect. This should have created the Shared Datasource, or individual datasource.

I believe that the problem is that your datasource wasn't uploaded to the server correctly. I could be mistaken. Double check and make sure the datasource that the report is using, is actualy on the server. You may have to rightclick on the project properties and make sure that overwrite current datasources is either checked or unchecked. If you made changes to an existing datasource, and that box isn't checked, it won't overwrite it with the new one.|||

I created a new datasource. two thngs

First: when I go to the project properties I can not find anything called overwrite current datasources there is nothing about datasources.

Second: When you sayuploaded to the server are you talking about the Web Server or the SQLServer?

|||Here's my scenario.

I am using VS2005, with SQL 2005, and the 2005 Reporting Service.

When I create a report, I do it in VS2005 with the Report Project.

I go through the wizard, selecting the datasource, selecting the fields etc..etc..

Now, in the Project properties, you should see General > Deployment and it has options there to overwrite datasources, and settings for report server url and folder.

This tells Visual Studio where to deploy the files to. The overwrite datasource is usually defaulted to False.

So, you create the report file in VS2005(which still has me purplexed because I was under the impression you needed SSRS 2005 to create reports in VS2005), then when you run it, VS automatically uploads your files to the respective server. If the overwrite datasource option is true, then it will overwrite your current datasource.

The report server is different from the SQL server and the Web Server.

Reporting Services

CAn you do a cross tab query in RS. I don't think you can. If not, I can do
it in access. just thought I'd askYou don't need to do a cross tab in your query. You can just use the matrix
object in the report.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Randy" <Randy@.discussions.microsoft.com> wrote in message
news:F885EB88-121F-4DAF-8866-BC26E8A0F811@.microsoft.com...
> CAn you do a cross tab query in RS. I don't think you can. If not, I can
> do
> it in access. just thought I'd ask

Friday, March 9, 2012

Reporting Service Custom Code Error - Request for the permission of type

I have added some Custom Code in Reporting Service.
Reports - Report Properties - Code Tab - Custom Code
Here is my code.
public Function Please(d as DateTime, CultureFormat as String) as
String
dim returnvalue as String
Try
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo(CultureFormat)
dim ci as System.Globalization.CultureInfo
ci = new System.Globalization.CultureInfo(CultureFormat)
returnvalue = d.ToString("D",ci)
Catch ex As Exception
returnvalue = ex.ToString()
End Try
Return returnvalue
End Function
If I preview this report it works fine, but when I deploy this report,
I get this error message.
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed.
at
System.Security.CodeAccessSecurityEngine.CheckTokenBasedSetHelper(Boolean
ignoreGrants,
TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet demands)
at
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
grants, PermissionSet
denied, PermissionSet demands)
at System.Threading.Thread.set_CurrentCulture(CultureInfo value)
at CustomCodeProxy.Please(DateTime d, String CultureFormat)
Has anyone run into this before?
Thanks, JonThe code security permission do not allow you to set the current threads
culture. Since you are passing the culture info into the ToString method
you should not need to do this so I would just remove this line of code:
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo(CultureFormat)
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
<jonknutsonhome@.yahoo.com> wrote in message
news:1126125095.372193.270750@.g14g2000cwa.googlegroups.com...
>I have added some Custom Code in Reporting Service.
> Reports - Report Properties - Code Tab - Custom Code
> Here is my code.
> public Function Please(d as DateTime, CultureFormat as String) as
> String
> dim returnvalue as String
> Try
> System.Threading.Thread.CurrentThread.CurrentCulture = new
> System.Globalization.CultureInfo(CultureFormat)
> dim ci as System.Globalization.CultureInfo
> ci = new System.Globalization.CultureInfo(CultureFormat)
> returnvalue = d.ToString("D",ci)
> Catch ex As Exception
> returnvalue = ex.ToString()
> End Try
> Return returnvalue
> End Function
>
> If I preview this report it works fine, but when I deploy this report,
> I get this error message.
>
> System.Security.SecurityException: Request for the permission of type
> System.Security.Permissions.SecurityPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089 failed.
> at
> System.Security.CodeAccessSecurityEngine.CheckTokenBasedSetHelper(Boolean
> ignoreGrants,
> TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet demands)
> at
> System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
> grants, PermissionSet
> denied, PermissionSet demands)
> at System.Threading.Thread.set_CurrentCulture(CultureInfo value)
> at CustomCodeProxy.Please(DateTime d, String CultureFormat)
> Has anyone run into this before?
> Thanks, Jon
>

Wednesday, March 7, 2012

Reporting Service 2000 Error: ...is not accessible in this context because it is Private.

I am coding for Reporting Services 2000 (the one under the code tab) and these following codes. It generated an error:...There is an error on line 31 of custom code: [BC30390] 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.CustomCodeProxyBase.a' is not accessible in this context because it is 'Private'.

So.. I changed the declaration of the variables. From Dim, I changed it Public Dim but after changing, this error occurred:...There is an error on line 5 of custom code: [BC30247] 'Public' is not valid on a local variable declaration.

Please help.. Thanks! Here's my code..

Public Shared Function GetChargeWgt(housenoas string, chrgwtas Decimal)
Public Dim MyConnObjas ADODB.Connection
Public Dim myRecSetas ADODB.Recordset
Public Dim SQLas string
Public Dim cwas Decimal

MyConnObj.Open _
("Provider = sqloledb;" & _
"Data Source=<datasource here>;" & _
"Initial Catalog=<database name here>;" & _
"User ID=<uname>;" & _
"Password=<pword>;")

SQL = "SELECT a.house_no, "
SQL = SQL + "CASEWHEN a.book_type_id ='AE'OR a.book_type_id ='AI'THEN (SELECTCAST(a.charge_valueAS DECIMAL(10,2))) "
SQL = SQL + "WHEN a.book_type_id ='SE'OR a.book_type_id ='SI'THEN (SELECTCAST(a.gross_valueAS DECIMAL(10,2))) "
SQL = SQL + "END AS chargeweight "
SQL = SQL + "FROM OPR_BKPARMS_TR a "
SQL = SQL + "WHEREa.house_no ='" + houseno + "'"

myRecSet.Open(SQL, MyConnObj)
cw = myRecSet.Fields(a.house_no)

return cw
End Function

I saw one post which said that I should try using Protected.. I did followed it but it still had the same error..

>_<

|||

Hi,

So.. I changed the declaration of the variables. From Dim, I changed it Public Dim but after changing, this error occurred: ...There is an error on line 5 of custom code: [BC30247] 'Public' is not valid on a local variable declaration.

From your description, it seems that the system can't access the data table object a. Since you have declared the private connection and recordset. So please try to make sure if the data table is accessible first, also, try to declare your variable in your class level instead of in a shared method.

Thanks.

|||

Oh.. I'll try it out.. Thanks

Reporting Servers - Export to Multiple tabs in Excel

I need to create a Reporting Services report that contains multiple result sets. I want each result set to export to a different tab in Excel. I want to be able to name the tab. I would also like the headings in Excel to show up in the Header section of Excel, rather than in the body of the spreadsheet. Is there a way to accomplish this task.

Put multiple tables in your report and then put page breaks before them. Each manual page break becomes a new tab.

For headers, you need to use a Excel DeviceInfo setting, SimplePageHeaders (see http://msdn2.microsoft.com/en-us/library/ms155069(en-US,SQL.90).aspx). If you want this to be the default, you can add it to the RSReportServer.config file (see http://msdn2.microsoft.com/en-us/library/ms156281.aspx).

|||Is there a way to specify the name of the Excel tab, instead of Sheet1?|||

I would like to do this also. Is there any way to name each Sheet?

|||Unfortunately no, you cannot control the sheet naming.|||

Thanks for answering Mike.

Do you know if there are any plans to add this capability?

|||

I can find no reference to this in the documentation and it appears to be ignored - presumeably this is RS 2005 only? (I'm using 2000 SP2).

Would this get round my current problem of having lots of additional columns/merged cells to accommodate all the header layout when exported to Excel? Ideally I want the data structure in Excel to be a straight forward matrix of the data values in the report table which isn't feasible when exported to Excel with our default headers which contains a lot of labels containing context information.

Reporting Servers - Export to Multiple tabs in Excel

I need to create a Reporting Services report that contains multiple result sets. I want each result set to export to a different tab in Excel. I want to be able to name the tab. I would also like the headings in Excel to show up in the Header section of Excel, rather than in the body of the spreadsheet. Is there a way to accomplish this task.

Put multiple tables in your report and then put page breaks before them. Each manual page break becomes a new tab.

For headers, you need to use a Excel DeviceInfo setting, SimplePageHeaders (see http://msdn2.microsoft.com/en-us/library/ms155069(en-US,SQL.90).aspx). If you want this to be the default, you can add it to the RSReportServer.config file (see http://msdn2.microsoft.com/en-us/library/ms156281.aspx).

|||Is there a way to specify the name of the Excel tab, instead of Sheet1?|||

I would like to do this also. Is there any way to name each Sheet?

|||Unfortunately no, you cannot control the sheet naming.|||

Thanks for answering Mike.

Do you know if there are any plans to add this capability?

|||

I can find no reference to this in the documentation and it appears to be ignored - presumeably this is RS 2005 only? (I'm using 2000 SP2).

Would this get round my current problem of having lots of additional columns/merged cells to accommodate all the header layout when exported to Excel? Ideally I want the data structure in Excel to be a straight forward matrix of the data values in the report table which isn't feasible when exported to Excel with our default headers which contains a lot of labels containing context information.

Saturday, February 25, 2012

Reporting Parameters with Jump to Report Action

I'm in Chart Properties > Data > Values > Edit.
Action tab > Jump to report > Parameters.

I want to jump to another report chart that is paramaterized. For "Parameter Value" I've already discovered you have to change the default "=Fields!xxx.Value" to "=Fields!xxx.UniqueName", but this only works if it is jumping to a single value parameter. I sometimes want to jump to multi-value parameter and don't know what expression should be. I want it to be something like "= included in Fields!xxx.BunchOfValues" but of course this option doesn't exist!

Any suggestions?

IN THIS CASE IN ORDER TO PASS MULTI VALUE PARAMETERS USE THE FOLLOWING SYNTAX

JOIN(PARAMETERS!YOURPARAM.VALUE,",")