Yesterday I just found an interesting issue with Crystal Reports XI.
We had a report where in we had to place 5 group headers. After applying all the options what we observed was that the group headers would appear multiple times whenever the group values changed. Searched a lot for answers but to no avail. We're working on it and I'll post the solution as well once we get it.
Workaround::
The solution to this kind of issue is that we should put the different grouping fields in different group header and suppress those groups. Whatever values are to be shown on the report needs to go in the last group header whose corresponding Group Footer has the New Page After property set. This resolves the issue.
Thursday, February 3, 2011
Wednesday, December 1, 2010
SSRS Split method to get the last element of the split array
One of the report columns had the entire folder path, but all I wanted to show was the innermost folder name and exclude all the parent folders.
For example, from the path C:\Dropboxes\DeviceType\LogFiles\DeviceName\Tuesday\ the report should just show "Tuesday".
Split function is the first thing that comes to mind and that's what I saw in SSRS list of expression methods and used.
The second split is to get the count of total elements as I need to find the last element of the split array, and the folder path depth is not static.
For example, from the path C:\Dropboxes\DeviceType\LogFiles\DeviceName\Tuesday\ the report should just show "Tuesday".
Split function is the first thing that comes to mind and that's what I saw in SSRS list of expression methods and used.
=Split(Fields!FolderPath.Value.ToString(),"\",-1)(Split(Fields!FolderPath.Value.ToString(),"\",-1).GetUpperBound(0)-1)
The second split is to get the count of total elements as I need to find the last element of the split array, and the folder path depth is not static.
Tuesday, November 30, 2010
ASP.Net authorization and Custom Role Provider
In the application I was developing, I had custom role provider implemented for laying out the menu items depending on the privilege each web user has. It had been a while since this part of the application was done. Towards the end of development a requirement came up to redirect users to a "Request Access" page if they do not have access to the application.
I thought of implementing this the easiest way by setting values for in web.config. "AppAccessGroup" was a group I created on my local machine with my NT-id as a member of the group.
But it didn't work right off the bat, and that was confusing. I also had Anonymous access turned off in IIS, so the browser was prompting me for NT credentials. While trying to figure this out, I had a surprising find here: http://blogs.msdn.com/b/dougste/archive/2006/07/27/680031.aspx
But that fix didn't work too.
After a while it stuck me that it may be the custom role provider and I commented that out, to test. And voila!, it worked.
I hadn't seen anybody mention this anywhere, but sure somebody must have had this issue and figured it before.
I thought of implementing this the easiest way by setting values for
< authorization>
< allow roles="AppAccessGroup"/>
< deny users="*">
But it didn't work right off the bat, and that was confusing. I also had Anonymous access turned off in IIS, so the browser was prompting me for NT credentials. While trying to figure this out, I had a surprising find here: http://blogs.msdn.com/b/dougste/archive/2006/07/27/680031.aspx
But that fix didn't work too.
After a while it stuck me that it may be the custom role provider and I commented that out, to test. And voila!, it worked.
I hadn't seen anybody mention this anywhere, but sure somebody must have had this issue and figured it before.
Tuesday, October 26, 2010
Server Application Unavailable
This was my first ASP.Net 4.0 application deployment on IIS 6.0. The website was published under "Default Web Site" that hosts other Virtual Directories too, targeting ASP.Net 1.1 & 2.0.
When I tried to access the site, I got the error:
And the event viewer said:
Looking for resolution, I came across this blog: http://weblogs.asp.net/owscott/archive/2006/01/26/436607.aspx
I rechecked and my application was using the application pool created for .Net 4.0 apps; so the issue was not with application pool. After a bit of more wandering I started checking all websites that were using the .Net 4.0 application pool. And it turned out somebody had their website use the .Net 4.0 application pool but target .Net framework 2.0. Argh!!
When I tried to access the site, I got the error:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
And the event viewer said:
It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.
Looking for resolution, I came across this blog: http://weblogs.asp.net/owscott/archive/2006/01/26/436607.aspx
I rechecked and my application was using the application pool created for .Net 4.0 apps; so the issue was not with application pool. After a bit of more wandering I started checking all websites that were using the .Net 4.0 application pool. And it turned out somebody had their website use the .Net 4.0 application pool but target .Net framework 2.0. Argh!!
Thursday, October 14, 2010
The package failed to load due to error 0xC0010014
We recently got SQL Server 2008 and deployed an instance on one of our QA servers. Nothing out of the ordinary, till I tried to deploy a 2005 SSIS package on the QA server.
As usual I took SSISDeploymentManifest file, right click and selected Deploy. I was doing a file system deployment, so the first thing out of ordinary that I noticed was, the installer gave me SQL 2008 deployment path; which I assumed was okay as the 2008 installation may have overwritten some registry default value. So I selected the path where I wanted it to be and rest of the process went without a problem.
Now when I go to SQL 2005 to create a job process for the package, it gives me the error
It turned out the default SSIS installer launched was for SQL 2008 and it didn't read anything from the manifest to identify which installer it should invoke (like Visual studio does).
The way to deploy SSIS packages in such scenarios is to right click and go to "Open With". The interesting thing here was that both options listed here are : "SQL Server 2005 Integration Services Package Installation Utility". So prima-facie we won't know which one to select. I tried both and it turned out that the second option was the one that is for SQL 2005.
On a bit further investigation, I found that the "Description" on the "Version" tab of "Properties" of dtsinstall.exe is still "SQL Server 2005 Integration Services Package".
Looks like somebody at Microsoft overlooked this step of testing. :)
As usual I took SSISDeploymentManifest file, right click and selected Deploy. I was doing a file system deployment, so the first thing out of ordinary that I noticed was, the installer gave me SQL 2008 deployment path; which I assumed was okay as the 2008 installation may have overwritten some registry default value. So I selected the path where I wanted it to be and rest of the process went without a problem.
Now when I go to SQL 2005 to create a job process for the package, it gives me the error
TITLE: SSIS Execution Properties
------------------------------
The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.
------------------------------
ADDITIONAL INFORMATION:
The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.
It turned out the default SSIS installer launched was for SQL 2008 and it didn't read anything from the manifest to identify which installer it should invoke (like Visual studio does).
The way to deploy SSIS packages in such scenarios is to right click and go to "Open With". The interesting thing here was that both options listed here are : "SQL Server 2005 Integration Services Package Installation Utility". So prima-facie we won't know which one to select. I tried both and it turned out that the second option was the one that is for SQL 2005.
On a bit further investigation, I found that the "Description" on the "Version" tab of "Properties" of dtsinstall.exe is still "SQL Server 2005 Integration Services Package".
Looks like somebody at Microsoft overlooked this step of testing. :)
Tuesday, October 12, 2010
Login failed for user "username"
I ran into the login failed for user "username" again. This time it was different from what I had faced the first time around.
My package uses config file to get the sql credentials. When I have the package open in my IDE and add another parameter to the file it wipes out the previously saved password. So now when I try to execute the package from my IDE to test the changes, I get this dB login failure message.
What threw me off was I was looking at the connection defined in the package designer and all seemed well.
So if this happens again, you need to take a look again in the config file to check if the password value is still there.
My package uses config file to get the sql credentials. When I have the package open in my IDE and add another parameter to the file it wipes out the previously saved password. So now when I try to execute the package from my IDE to test the changes, I get this dB login failure message.
What threw me off was I was looking at the connection defined in the package designer and all seemed well.
So if this happens again, you need to take a look again in the config file to check if the password value is still there.
Monday, October 4, 2010
DateTime String patterns
Once in a while I find myself confused with which string pattern to apply to a .Net DateTime object.
I have found this web page (http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm) to be very useful and handy.
Thought of putting it here -- for my ready reference and in case somebody stumbles across this post.
And the MSDN article: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx
I have found this web page (http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm) to be very useful and handy.
Thought of putting it here -- for my ready reference and in case somebody stumbles across this post.
And the MSDN article: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx
Subscribe to:
Posts (Atom)