Thursday, March 25, 2010

Crystal Report- Sub reports over lapped when you use multiple sub reports or sub reports with other controls

While working with crystal reports you will noticed that when you use sub report with another sub report or if you use a control under sub report it gets overlapped. It is because the Sub report that comes first expands its size and come over other control or subreports.
The solution for handling this i.e. Sub report automatically expands and shifts other control according to its size is through multiple sections in sub reports.
For multiple sections in sub reports
goto section expert
select details section
click on insert section button
Now you can move other sub reports to next section and you may noticed that your problem related to overlapping of control gets resolved automatically

Tuesday, March 23, 2010

Page Header in Crystal Report Sub Report

When you work with crystal report sub report you will noticed that Page Header of you sub report will be displayed as report header from you main report.

This is because page header is not supported with crystal report sub report. There are many work around to achieve this using sections but for better design it is suggested that you keep your page header information in main report while section details in sub reports

Monday, March 15, 2010

Sharepoint 2007 - Scroll bars using page viewer webpart

You may sometime noticed that page viewer webpart displays scroll bars when you try to display pages that has large view area. This is because page viewer webparts works with fixed width and hieght and when content page increase webpart displays scroll bar.

The solution for this is to use custom webparts if the page is internal page.

Friday, March 5, 2010

Sharepoint 2007 - Survey removing save button

You will notice save botton in sharepoint surveys when using sharepoint surveys with branching options. It confuse most of surveys users as generally user select save instead of next or finish which result in in complete surveys.
We have checked a lot in sharepoint options and failed to find any option thay may allow admisitrator or pulisher to disable this buton and find that there is one work around using sharepoint designer for removing it.

1. Open site in sharepoint designer
2. Go to you subsite and expand pages under survey (created earlier with branching option)
3. Open newform.aspx and find following
<asp:content contentplaceholderid="PlaceHolderMain" runat="server">
4. Add following javascript before closing tag of the content place holder searched in last step

<script> var x=document.getElementsByTagName("input"); for (var
i=0;i<x.length;i++) { if (x.item(i).type=="button"&&x.item(i).value=="Save")
{x.item(i).style.display = "none"};} </script>

5. Above script will search for save button and toggle its visibility. If you need to remove save button while editing existing responses you will have to repeat above steps for editform.aspx.