Easy to Create, Easy to Change - Easy to use!


Exporting data from QBM (mainform and subform)


Started by Arul
Search
You will need to Sign In to be able to add or comment on the forum!

Exporting data from QBM (mainform and subform)

Today I received a little bang on my head for not able to do this.

This is due to exporting data from QBM with main-form and sub-form.

Export only works well with main-form data.

It does not export sub-form data with the main-form.

But, even if you try to export just the sub-form records from the same QBM output by changing the table name. As per the screen shot below;

It only exports 1 record!

Written by Arul 27/01/15 at 08:22:02 Dataease [{8}]FIVE

Re:Exporting data from QBM (mainform and subform)

Hi Arul.

That bang you should have gotten a long time ago ;-)

Direct Export from table (QBM) has only ever exported a flat file i.e. from one level.

So if you export the main table you will get all the data in that query (filter).

if you export the subform, you will get ALL the data of that relationship for the current MainTable.

This is an ad-hoc tool, so if you want to export a more complete set of data you have to make sure that you get a query that include all the data in one level.

This is not anything new, it has been this always.

What you need to do is to create a reporting view that include all the rows you want to export on one level.

This is the underlaying DQL of my query;

As you see it lists on two levels, so what you need to do is to attack it from the opposite direction i.e. start with the detail and list each maindata for each detail.




This one will report all your data in one level where maindata is repeated for each row of detail.


This one you can run as an execdql where you set the export file name as the 6th argument.

MemoExecDQL( DQL ,Data-Entry Field1 ,Data-Entry Field2 ,Data-Entry Field3 ,Data-Entry Field4 ,exportfile)

My result look like this:

any TimeSheet CustomerNr~any TimeSheet Project~any TimeSheet TotalProject~Date~StartTime~EndTime~TotalHours~HourlyRate~TotalRevenue~Description~DayRate

~~~02.09.13~08:00:00~10:00:00~2,0~890~1 780,00~Endringer i datastruktur.~

~~~06.09.13~13:00:00~17:00:00~4,0~890~3 560,00~Endringer i datastruktur.~

~~~09.09.13~10:00:00~12:00:00~2,0~890~1 780,00~Legge till Sjåfør modul.~

~~~10.09.13~10:00:00~13:00:00~3,0~890~2 670,00~Sjåførmodul~
etc...

If you want the column names to have more "meaning" then you can list them as temp variables.

define "CustomerNr" text .

define"Project" text .

define "TotalProject" text .

for TimeManagementDetail;

CustomerNr := any TimeSheet CustomerNr .

Project := any TimeSheet Project .

TotalProject := any TimeSheet TotalProject .

list records

CustomerNr ;

Project ;

TotalProject ;

Date in order ;

StartTime ;

EndTime ;

TotalHours ;

HourlyRate ;

TotalRevenue ;

Description ;

DayRate .

end

CustomerNr~Project~TotalProject~Date~StartTime~EndTime~TotalHours~HourlyRate~TotalRevenue~Description~DayRate

00001~Taxisystem Fase2~~02.09.13~08:00:00~10:00:00~2,0~890~1 780,00~Endringer i datastruktur.~

00001~Taxisystem Fase2~~06.09.13~13:00:00~17:00:00~4,0~890~3 560,00~Endringer i datastruktur.~

00001~Taxisystem Fase2~~09.09.13~10:00:00~12:00:00~2,0~890~1 780,00~Legge till Sjåfør modul.~

00001~Taxisystem Fase2~~10.09.13~10:00:00~13:00:00~3,0~890~2 670,00~Sjåførmodul~

00001~Taxisystem Fase2~~11.09.13~10:00:00~12:00:00~2,0~890~1 780,00~Sjåfør modul.~

00001~Taxisystem Fase2~~14.09.13~10:00:00~12:00:00~2,0~890~1 780,00~Sjåfør modul~

00001~Taxisystem Fase2~~15.09.13~07:00:00~15:00:00~8,0~890~7 120,00~Turkalender.~

Written by DataEase 27/01/15 at 08:27:57 Dataease [{8}]FIVE

Re:Re:Exporting data from QBM (mainform and subform)

Yes, I see what you were saying. 

But, problem is, users going from DFD into DFW expecting the same or similar functions. Unfortunately, I cannot disagree with them. As you well aware, DFD took over the world those days (20 years ago). All because of the features, functionality and EASE of use.

Written by Jeyarajah Arulrajah 30/01/15 at 16:17:12 Dataease [{8}]FIVE

Re:Re:Re:Exporting data from QBM (mainform and subform)

True, true, true. But I think we have to agree that the future of this product is not people coming over from DFD anymore. That battle was lost 20 years ago. DataEase need to live up to its name, but not as a copy of DFD. There is more features, better features, more functionality and better functionality in DE8x than it ever was in DFD, so what is left is the ease of use and even that is getting better....

Nothing is today as it was in the 80ies and 90ies and neither is DataEase. The problem is not that it has changed to much, but that it has changed too little for too long.

Written by DataEase 30/01/15 at 16:42:45 Dataease [{8}]FIVE