diff -u -r ../src680-m72.bak/sc/source/ui/dbgui/pvlaydlg.cxx sc/source/ui/dbgui/pvlaydlg.cxx
--- ../src680-m72.bak/sc/source/ui/dbgui/pvlaydlg.cxx	2005-02-02 10:11:20.000000000 +0530
+++ sc/source/ui/dbgui/pvlaydlg.cxx	2005-02-09 16:26:53.520752589 +0530
@@ -256,9 +256,21 @@
 
 	ScRange inRange;
 	String inString;
-	inRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
-	inRange.Format( inString, STD_FORMAT, pDoc);
-	aEdInPos.SetText(inString);
+	if (xDlgDPObject->GetSheetDesc())
+	{
+		aEdInPos.Enable();
+		aRbInPos.Enable();
+		inRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
+		inRange.Format( inString, STD_FORMAT, pDoc);
+		aEdInPos.SetText(inString);
+	}
+	else 
+	{
+		/* Data is not reachable, so could be a remote database */
+		aEdInPos.Disable();
+		aRbInPos.Disable();
+		
+	}
 	
     aSlider.SetPageSize( PAGE_SIZE );
     aSlider.SetVisibleSize( PAGE_SIZE );
diff -u -r ../src680-m72.bak/sc/source/ui/view/cellsh2.cxx sc/source/ui/view/cellsh2.cxx
--- ../src680-m72.bak/sc/source/ui/view/cellsh2.cxx	2005-02-02 10:11:18.000000000 +0530
+++ sc/source/ui/view/cellsh2.cxx	2005-02-09 15:37:59.565266475 +0530
@@ -598,7 +598,6 @@
 					}
 
 					const ScDPObject* pDPObject = pTabViewShell->GetDialogDPObject();
-					ScRange aR = pDPObject->GetSheetDesc()->aSourceRange;
 
 					if ( pDPObject )
 					{
