Thank you so much for the excellent documentation on writing new reports. I wanted to do a really simple one, not because I really need it, but for being able to 'play' with the report writer and get a feeel for it.

But I get a build 'failed'. Then I tried building the Winfroms for PartnerByCity.yaml and FDIncomeByFund.yaml and they seem to fail in the same way. So nwo I am not so sure I got the wrong entries on the xml file or if my build environment is missing a simple include?

I am attaching the 3 logs of the errors i get and the 2 simple report files I wrote, please don't laugh too loud at them, as it has not worked I don't yet know what I have done. ;-)

[attachment=0]<!-- ia0 -->PartnerByCity.yaml_errors.txt<!-- ia0 -->[/attachment]

[attachment=0]<!-- ia0 -->FDIncomeByFund.yaml_errors.txt<!-- ia0 -->[/attachment]

[attachment=0]<!-- ia0 -->ExtractsByUser.yaml_errors.txt<!-- ia0 -->[/attachment]

my simple 'play/explore' ExtractsByUser file
[attachment=0]<!-- ia0 -->ExtractsByUser.yaml.txt<!-- ia0 -->[/attachment]

I guess once the form compiles I will get an idea of what I was doing and what I should have done.
But the question for now is, is it my xml file, or is it a build system mis-config?

[attachment=0]<!-- ia0 -->extractsbyuser.xml.txt<!-- ia0 -->[/attachment]

first about the compiler errors for the existing reports.
I am wondering if something went wrong with the git pull from the sourceforge master.
Do you have a file called csharp\ict\petra\client\lib\MReporting\gui\UC_Sorting.cs? that should define TFrmUC_Sorting etc.
csharp\ict\petra\client\lib\MReporting\gui\ReportingForm.cs also does not seem to be uptodate, since TReportActionEnum seems to be missing.

Perhaps you want to make a clean git clone into another directory, directly from sf, and see if it compiles there?

I have not looked at your new report yet, will do that next week, but I would never laugh about anyone's code anyways, don't worry! I am glad that people try to understand our sourcecode, and I know the implemented ideas not the easiest, and if there are ways to simplify things, that would be good.

19 days later

Timotheus created a git repo on currock with the state of play when he was here on the 'master' branch from when it all still worked and then I uploaded my current botched version to that, creating a ew branch 'OMUK' on my omuk currock remote

git push currock-UK local:OMUK

my .git/config has has the following additional remote definition:
[remote "currock-UK"]
url = [ssh://@currock.net">ursr@[deleted].net/git/omuk/openpetraorg](ssh://@currock.net">ursr@[deleted].net/git/omuk/openpetraorg)
fetch = +refs/heads/:refs/remotes/currock-UK/

timotheus looked at the new OMUK branch and on 4 June found:
Hello Urs,

for real and I think we now have a 'OMUK' branch on currock that has my
'local' contents that failed compiling. Although I must say that went so
fast I almost suspect it won't have the right contents?
it has worked. I have downloaded it, and have the same compiler errors.

If you could have a look at branch 'OMUK' on currock and see why the
compiles fail, please? Thanks.
I have checked for the first error.

[solution] Building 'Ict.Petra.Client.MReporting.Gui.MFinDev' [Debug] ...
[solution] FDIncomeByFund.cs(198,7): Error CS1501: No overload for
method 'ReadControlsManual' takes '1' arguments

I have right clicked on the file
ICT\Petra\Client\lib\MReporting\gui\MFinDev\FDIncomeByFund.cs, and
selected TortoiseGit/Show Log.
That shows that you committed that file in a commit on 28.05.

Revision: 09c6212a25dba0ff9af7b3c3a95cebea99b2c5cd
Author: Urs Rau
Date: 28.05.2010 21:38:17
Message:
my extractsbyuser stuff

You can see the unified diff of that commit from the popup menu.
You can also compare the previous version from a commit from me on
12.05. to the working copy.
The strange thing is: the only thing you committed was reverting a
change that Bernd had introduced on 11.05.

I have not looked at the other compiler errors yet.
I am worrying something went wrong in some merge from master at some point.

I will fix your version over the weekend and make sure, that only the
changes you wanted to make are in there.

For the future, you should always commit directly after pulling from
sf master. if there are no conflicts, then there is nothing to commit.
but just make sure that there are no uncommitted changes after the
pull from sf.

When you commit your own changes, check every file that has been
changed, and make sure you know why each line was changed.

I am not sure yet how the things were reverted, but those steps could
perhaps prevent it.

I will write when I have pushed the fixed version to currock OMUK.

Timotheus

On June 4, I sent another email to Urs:

I was able to see the differences of your version with the one from SF
at that time.
How I got there:
Please see the attached screenshot of the TortoiseGit/Show Log on the
file FDIncomeByFund.cs.
If you click on the version below your checkin, you can see the last
version from SF, Commit:7540def75c30ddf5c9b5caff839ea3bc8788b744
I have now done a clean checkout of sourceforge master, and done a
TortoiseGit Switch/Checkout on that Version
7540def75c30ddf5c9b5caff839ea3bc8788b744.
Then WinMerge diff on all .cs files of the two csharp directories,
including the subfolders. Sort by column with the comparison result.
There are only 2 files that are different: FDIncomeByFund.cs and
writesql.cs. writesql.cs is fine, since we need that change for the
varchar lengths.
The difference on FDIncomeByFund.cs has somehow happened, and you
should not have committed that, since you did not not consciously
change that file.
Please undo the change and commit that file. I will include it in the
patch I will send to you.

Compiling nant compilePetraClient now goes further.
[solution] Building 'Ict.Petra.Client.MPartner.Gui' [Debug] ...
[solution] u:\openpetraorg.omuk\csharp\ICT\Petra\Client\lib\MReporting\gui\MPartner\ExtractsByUser.cs(36,24):
Error CS0234: The t
ype or namespace name 'MReporting' does not exist in the namespace
'Ict.Petra.Shared' (are you missing an assembly reference?)
[solution] u:\openpetraorg.omuk\csharp\ICT\Petra\Client\lib\MReporting\gui\MPartner\ExtractsByUser.cs(44,35):
Error CS0234: The t
ype or namespace name 'Logic' does not exist in the namespace
'Ict.Petra.Client.MReporting' (are you missing an assembly reference
?)
[solution] u:\openpetraorg.omuk\csharp\ICT\Petra\Client\lib\MReporting\gui\MPartner\ExtractsByUser.cs(156,30):
Error CS0246: The
type or namespace name 'TRptCalculator' could not be found (are you
missing a using directive or an assembly reference?)
[solution] u:\openpetraorg.omuk\csharp\ICT\Petra\Client\lib\MReporting\gui\MPartner\ExtractsByUser.cs(172,29):
Error CS0246: The
type or namespace name 'TParameterList' could not be found (are you
missing a using directive or an assembly reference?)
[solution] u:\openpetraorg.omuk\csharp\ICT\Petra\Client\lib\MReporting\gui\MPartner\ExtractsByUser.Designer.cs(492,17):
Error CS0
246: The type or namespace name 'TUcoReportSorting' could not be found
(are you missing a using directive or an assembly reference
?)

This is now about your new report.
Ah, I did also a WinMerge comparison with filter *.csproj.
That shows that you modified
csharp\ICT\Petra\Client\lib\MPartner\gui\Ict.Petra.Client.MPartner.Gui.csproj
and added your new files
....\MReporting\gui\MPartner\ExtractsByUser.cs etc to that project.

Now I see what I could have noticed from the compiler error as well:
you have added those cs files to the wrong project. Please exclude
them from the Ict.Petra.Client.MPartner.Gui project, and add them to
project Ict.Petra.Client.MReporting.Gui.MPartner instead.
Then compilation should work.
(well, it did not at first, Solution Format of file Client.sln not
supported. needed to run nant fixProjectFiles)

Now I get the message:
[solution] Building 'Ict.Petra.Client.MReporting.Gui.MPartner' [Debug] ...
[solution] ExtractsByUser.Designer.cs(492,17): Error CS0246: The type
or namespace name 'TUcoReportSorting' could not be found (a
re you missing a using directive or an assembly reference?)
[solution] Project 'Ict.Petra.Client.MReporting.Gui.MPartner' failed!

I am have compared your ExtractsByUser.yaml file with
BriefAddressReport.yaml in the same directory, and noticed you have
missed the line
ucoReportSorting:
Type: Ict.Petra.Client.MReporting.Gui.TFrmUC_Sorting

Then again
nant generateWinform -D:file=MReporting/gui/MPartner/ExtractsByUser.yaml

Now the PetraClient does compile.

I have attached the patch file with the fixes.
Please ignore the changed csproj files, there was a problem with the
first bytes of the file. UTF BOF or something like that.

Please let me know if that does not solve your compilation problems.

You should commit your changes, push them to your repository on your dat drive.
Then try a pull from sourceforge again, to get to the latest version,
and if there are conflicts, resolve them and commit immediately, and
push to dat drive.

Then try if everything still compiles.

This was very nice and easy for me. All I had to do is import this path with

git am 0001-fix-to-make-ExtractsByUser-compile.patch

which asked me if I wanted to accept all or view or reject this patch.

It went in without a hitch, I think.

So I pushed it back to my local network repo and also pushd it back to branch 'OMUK' on currock.

Then I proceeded to pull the 'sf' changes and had no conflicts. And pusehd those to local network as well.

But in trying to compile any of the three reports I am looking at to learn, they all fail.

They produce the following three error reports:

nant generateWinform -D:file=MReporting/gui/MPartner/PartnerByCity.yaml

[attachment=2]<!-- ia2 -->PartnerByCity_err.txt<!-- ia2 -->[/attachment]

nant generateWinform -D:file=MReporting/gui/MFinDev/FDIncomeByFund.yaml

[attachment=1]<!-- ia1 -->FDIncomeByFund_err.txt<!-- ia1 -->[/attachment]

nant generateWinform -D:file=MReporting/gui/MPartner/ExtractsByUser.yaml

[attachment=0]<!-- ia0 -->ExtractsByUser_err.txt<!-- ia0 -->[/attachment]

I will have a look if I can make sense of this, given what you have already sent me. Thanks.

Please try
nant cleanPetra
nant compilePetraTools
nant compilePetra

I have tried your branch, and OpenPetra did compile without the errors that you have reported.

So close and yet, so far away. ;-) Thanks Timotheus, spot on.

A simple:

nant compilePetra

did the trick nicely.

2 out of the three now successfully build, although all three have a few warnings about

[ExecDotNet] Yml2Xml.GetElements: could not find elements

And FDIncomeByFund fails to build here:

C:\openpetraorg>nant generateWinform -D:file=MReporting/gui/MFinDev/FDIncomeByFu
nd.yaml
NAnt 0.90 (Build 0.90.3752.0; nightly; 10/04/2010)
Copyright (C) 2001-2010 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/openpetraorg/OpenPetra.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: generateWinform

  [sysinfo] Setting system information properties under sys.*
   [script] Scanning assembly "onyftixw" for extensions.
   [script] Scanning assembly "bb8r40gi" for extensions.
[loadtasks] Scanning assembly "Ict.Tools.NAntTasks" for extensions.

generateWinform:

[ExecDotNet] parsing c:/openpetraorg/db/petra.xml
[ExecDotNet] Loading c:\openpetraorg\csharp\ICT\Petra\Client\lib\MReporting\gui\
MFinDev\..\../../../CommonForms/PetraForm.yaml...
[ExecDotNet] Loading c:\openpetraorg\csharp\ICT\Petra\Client\lib\MReporting\gui\
MFinDev\../ReportingForm.yaml...
[ExecDotNet] Loading c:/openpetraorg/csharp/ICT/Petra/Client/lib/MReporting/gui/
MFinDev/FDIncomeByFund.yaml...
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Yml2Xml.GetElements: could not find elements
[ExecDotNet] Writing c:\openpetraorg\csharp\ICT\Petra\Client\lib\MReporting\gui\
MFinDev\FDIncomeByFund.cs

compileSingleGuiProject:

 [solution] Starting solution build.
 [solution] Building 'Ict.Petra.Client.MReporting.Gui.MFinDev' [DEBUG] ...
 [solution] FDIncomeByFund.cs(202,7): Error CS1501: No overload for method 'Read
ControlsManual' takes '1' arguments
 [solution] Project 'Ict.Petra.Client.MReporting.Gui.MFinDev' failed!
 [solution] Continuing build with non-dependent projects.
 [solution]
 [solution] Solution failed to build!  Failed projects were:
 [solution]   - Ict.Petra.Client.MReporting.Gui.MFinDev

BUILD FAILED - 6 non-fatal error(s), 0 warning(s)

C:\openpetraorg\OpenPetra.build(124,10):
Project build failed.

Total time: 5.4 seconds.

, but that might not be finnished code anyawy, I think you were still working on that one when you were here. Can I pull some improved code on this one from somewhere? Please note, this one is not urgent nor impartant in any way. It's only for showing off to Simon and Alan, at this time.

The main thing off this thread and questoins was for me to get the first report to build and then to start "playing" with the options of what the report writer allows me to do in order to get a feel for it. And I am not in this position, thanks.

I am glad you got further.

Don't worry about the message "Yml2Xml.GetElements: could not find elements" for the moment, I have to look at that warning, I wanted to disable it for some time already, but never got round to it.

FDIncomeByFund should compile fine, it does compile for me in sf/master.

One guess:
please run

nant compilePetraTools
nant generateWinform -D:file=MReporting/gui/MFinDev/FDIncomeByFund.yaml

Please also check if your file csharp\ICT\Petra\Client\lib\MReporting\gui\MFinDev\FDIncomeByFund.cs is modified locally. In line 202 the call of Method ReadControlsManual should have 2 parameters.
My suspicion is that your Winforms Generator in Petra Tools is too old, and still creates the call with just one parameter.