summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/report
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-04-30 07:33:00 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-04-30 07:33:00 +0000
commit8c4f717fa1ec21b8aac419e8d83efe43033a701b (patch)
treea8b65aebe40392d66f2af48e653258055a08d18a /wizards/com/sun/star/wizards/report
parent14a4782ef890335d7a1d42990837ccb3588ec55d (diff)
INTEGRATION: CWS beta2regression01 (1.50.6); FILE MERGED
2003/04/28 10:15:19 bc 1.50.6.1: #109131# queried if CurRecordTable is null
Diffstat (limited to 'wizards/com/sun/star/wizards/report')
-rw-r--r--wizards/com/sun/star/wizards/report/ReportWizard.java26
1 files changed, 17 insertions, 9 deletions
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index a15818fcfc97..e43298f62352 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ReportWizard.java,v $
*
- * $Revision: 1.51 $
+ * $Revision: 1.52 $
*
- * last change: $Author: rt $ $Date: 2003-04-24 16:05:46 $
+ * last change: $Author: rt $ $Date: 2003-04-30 08:33:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -230,6 +230,7 @@ public class ReportWizard {
short CurTabIndex;
int MaxSortIndex = -1;
int TextFieldCount;
+ int PageAddCount;
String[] sDatabaseList;
static String[] TableNames;
static String[] QueryNames;
@@ -748,6 +749,7 @@ public class ReportWizard {
public void gotoNextStep(){
try{
boolean bgoon = true;
+ PageAddCount = 1;
int PageCount = 6;
int iPage = AnyConverter.toInt(Tools.getUNOPropertyValue(CurUNODialog.xDialogModel, "Step"));
switch (iPage){
@@ -759,7 +761,7 @@ public class ReportWizard {
updateThirdStep(CurReportDocument.CurDBMetaData);
break;
case SOGROUPPAGE:
- updateFourthStep(CurReportDocument.CurDBMetaData);
+ if (updateFourthStep(CurReportDocument.CurDBMetaData))
break;
case SOSORTPAGE:
bgoon = setupSortcriteria();
@@ -813,7 +815,7 @@ public class ReportWizard {
CurReportDocument.unlockallControllers();
if (bgoon == true){
if (iPage < PageCount){
- Tools.setUNOPropertyValues(CurUNODialog.xDialogModel, new String[]{"Step", "Title"}, new Object[]{ new Integer(iPage + 1), WizardTitle[iPage]});
+ Tools.setUNOPropertyValues(CurUNODialog.xDialogModel, new String[]{"Step", "Title"}, new Object[]{ new Integer(iPage + PageAddCount), WizardTitle[iPage]});
CurUNODialog.assignPropertyToDialogControl("lblDialogHeader", "Label", WizardHeaderText[iPage]);
}
}
@@ -1254,16 +1256,20 @@ public class ReportWizard {
}
- public void updateFourthStep(DBMetaData CurDBMetaData){
+ public boolean updateFourthStep(DBMetaData CurDBMetaData){
+ int SortFieldCount = 0;
try{
String CurFieldTitle;
CurUNODialog.setFocus("lstSort1");
if (checkIfToupdateStep(CurReportDocument.CurDBMetaData, 3) == true){
getGroupFieldNames(CurDBMetaData);
int FieldCount = CurDBMetaData.FieldNames.length;
- int SortFieldCount = FieldCount + 1 - CurDBMetaData.GroupFieldNames.length;
- String SortFieldNames[] = new String[SortFieldCount];
- String ViewSortFieldNames[] = new String[SortFieldCount];
+ int GroupFieldCount = CurDBMetaData.GroupFieldNames.length;
+ SortFieldCount = FieldCount - CurDBMetaData.GroupFieldNames.length;
+ if (SortFieldCount == 0)
+ PageAddCount = 2;
+ String SortFieldNames[] = new String[SortFieldCount + 1];
+ String ViewSortFieldNames[] = new String[SortFieldCount + 1];
SortFieldNames[0] = sNoSorting;
ViewSortFieldNames[0] = sNoSorting;
String CurFieldName;
@@ -1293,9 +1299,11 @@ public class ReportWizard {
}
// System.out.println(xSortListBox[0].getSelectedItemPos());
}
+ return (SortFieldCount > 0);
}
catch(Exception exception){
exception.printStackTrace(System.out);
+ return false;
}}
@@ -1763,7 +1771,7 @@ public class ReportWizard {
public void run(){
try{
- if (CurReportDocument.CurDBMetaData.executeCommand(sMsgQueryCreationImpossible + (char) 13 + sMsgEndAutopilot))
+ if (CurReportDocument.CurDBMetaData.executeCommand(sMsgQueryCreationImpossible + (char) 13 + sMsgEndAutopilot, false))
CurDataimport.insertDatabaseDatatoReportDocument(xMSF);
if (bcreateTemplate == false){
boolean bDocisStored = Tools.storeDocument(xMSF, CurReportDocument.xComponent, StorePath, "StarOffice XML (Writer)",