Pages

Saturday, March 31, 2012

Error: InfoPath cannot load the view... unsupported HTML such as framesThe following HTML tag is not supported:'comment'

It may have a corrupted form.

Infopath forms (in 2007 anyway) are actually just Microsoft CAB files. Youcan rename a form from .xsn to .cab and then open it using any aplicationthat understands cab files.

There are a number of files in each CAB file, but the ones you areinterested in are probably the *.XSL (there is one for each InfoPath "View"plus some extras) and the manifest.xsf file which is like the "table ofcontents".WARNING!!! DANGER WILL ROBINSON!!! etc etcThis isn't for the faint-of-heart, but you did say you were desperate...
You may have to run through a combination of:

1. Renaming the .XSN to .CAB
2. Expanding the .CAB file
3. Hacking either the individual xsl views and/or the manifest.xsf to removethe offending view(s)
4. Repacking the CAB file
5. Renaming back to .XSN
6. Open in Infopath, hope error is gone

This has only happened to me once - I ended up having to delete theoffending view and recreate it. To find out which view was broken, I had todelete each view, reopen, repeat until I found out which of the views wasbroken. Worked for me (we had about 30 very complex views) and saved a wholelot of time.

Repacking the extracted files of infopath back to .xsn

Right-click on the manifest.xsf, select Design, save as xsn.

Wednesday, February 29, 2012

Populate Dynamic Dropdown values based on Radio button in the Infopath form 2007






















The below Dataconnection name is TestConn.Create dataconnection in the Infopath form

the List GUIid is {46A48934-00D5-4914-8EF2-E012AD40343C}

http://star:111/sites/pf/_vti_bin/owssvr.dll?Cmd=Display&List={46A48934-00D5-4914-8EF2-E012AD40343C}&XMLDATA=TRUE&noredirect=true

set the dataconnection in the VSTA code

First write the code in the button changed event
--------------------------------------------------------
XPathNavigator root = MainDataSource.CreateNavigator();
// Get the value for the selected department string Filter = "HC";
// Clear the last selected value in the Months drop-down list box root.SelectSingleNode("//my:Months", NamespaceManager).SetValue("");
// Retrieve the data connection bound to the HC radio button FileQueryConnection con = (FileQueryConnection)DataConnections["TestConn"];
// Change the location of the data connection to point the XML file // returned by the owssvr.dll with a filter on department con.FileLocation = @"http://star:111/sites/pf/_vti_bin/owssvr.dll" + "?Cmd=Display&List={46A48934-00D5-4914-8EF2-E012AD40343C}" + "&XMLDATA=TRUE&FilterField1=FName&FilterValue1=" + Filter;
// Query the data connection to fill the Months drop-down list box with items con.Execute();


---------------------------------------------------
Second write the code in the button changed event
----------------------------------------------------
XPathNavigator root = MainDataSource.CreateNavigator();
// Get the value for the selected department string Filter = "NI";
// Clear the last selected value in the Months drop-down list box root.SelectSingleNode("//my:Months", NamespaceManager).SetValue("");
// Retrieve the data connection bound to the NI radio button FileQueryConnection con = (FileQueryConnection)DataConnections["TestConn"];
// Change the location of the data connection to point the XML file // returned by the owssvr.dll with a filter on department con.FileLocation = @"http://star:111/sites/pf/_vti_bin/owssvr.dll" + "?Cmd=Display&List={46A48934-00D5-4914-8EF2-E012AD40343C}" + "&XMLDATA=TRUE&FilterField1=FName&FilterValue1=" + Filter;
// Query the data connection to fill the Months drop-down list box with items con.Execute();


Wednesday, August 31, 2011

Shrink SQL Server Database



Method 1

ALTER DATABASE DatabaseName SET RECOVERY SIMPLE
use DatabaseName
GO
CHECKPOINT
GO
DBCC SHRINKFILE(transactionloglogicalfilename,TRUNCATEONLY)
GO
ALTER DATABASE DatabaseName SET RECOVERY FULL

Method 2

USE DatabaseName
GO
ABCC SHRINKFILE(, 1)
BACKUP LOG WITH TRUNCATE_ONLY
ABCC SHRINKFILE(, 1)
GO

Saturday, April 30, 2011

PIVOT TABLE and SQL Query

Basic Example for PIVOT:
SELECT gid,
[1] AS cname1,
[2] AS Cname2,
[3] AS Cname3,
[4] AS Cname4,
[5] as Cname5
FROM
(SELECT gid,gpid,gpname,Name FROM test) s
PIVOT
(
MAX(Name)
FOR gname IN ([1],[2],[3],[4],[5])
) p
ORDER BY [gid]
GO

Thursday, March 31, 2011

"Your Computer could not connect to another console session on the remote computer because you already have a console session in Progress"

Use Remote Desktop when Windows Firewall is on Because Windows Firewall restricts communication between your computer and the Internet, you might need to change settings for Remote Desktop Connection so that it can work properly. Click to open Windows Firewall. In the left pane, click Allow a program or feature through Windows Firewall. Click Change settings. If you're prompted for an administrator password or confirmation, type the password or provide confirmation. Under Allowed programs and features, select the check box next to Remote Desktop, and then use the check boxes in the columns to select the network location types you want to allow communication on. Click OK.

Monday, November 29, 2010

windows sharepoint search service existing database name changed



Resolution: Rename the database "WSS_Search_MIG" to some other name. SharePoint is trying to create a new search database and find the file already exists so its not able to overwrite the schema of that database.

And start the Search Service from Central Administration -> Operations -> Services on server -> Click on the Windows Sharepoint Services Search service.