?
Solved

QuantumGrid 4 Export Master/Detail views

Posted on 2005-03-14
4
Medium Priority
?
1,117 Views
Last Modified: 2012-05-05
We are trying to export a Master/Detail views that follows this format
Master:AA
         ________________________
        / Detail A / Detail B / Detail C/
       |              --------------------------------------|
       | sss  ssss  sss  ss                                    |
       |___________________________________|
Master: BB
         ________________________
        / Detail A / Detail B / Detail C/
       |              --------------------------------------|
       | sss  ssss  sss  ss                                    |
       |___________________________________|

Into an HTML file with the idea that the file get all the data from this grid.

And the result should look like:
Master: AA
  Detail A
      sss  ssss  sss  ss
  Detail B
     ttt ttt t ttt tt
  Detail C
     www wwww ww ww wwww
Master: BB
  Detail A
      sss  ssss  sss  ss
  Detail B
     ttt ttt t ttt tt
  Detail C
     www wwww ww ww wwww
0
Comment
Question by:javier-d
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Expert Comment

by:JeePeeTee
ID: 13543317
This is information from DX:

Note that only the currently active root level’s content will be exported.  Excel export doesn’t support master-detail data.

This is also for html and other formats they support
0
 

Author Comment

by:javier-d
ID: 13544016
Using the following code we were able to export all the details from the selected master, but we also get the selected details from the other masters:

Procedure MasterDetail.Html1Click(Sender:TObject);
Var
  FileName1:String;
  FileCopy1,
  FileCopy2,
  FileCopy3 : TStringList;

  AView: TcxCustomGridTableView;
  ARecord: TcxCustomGridRecord;
  AMaster: TcxGridMasterDataRow;

Begin

  FileName1 := Save_Dialog.Gen_FName(True) + '.html';

  AView := TcxCustomGridTableView(cxGrid1.FocusedView);
  ARecord := AView.Controller.FocusedRecord;
  if Not (ARecord is TcxGridMasterDataRow) then
    exit;

  AMaster := TcxGridMasterDataRow(ARecord);

  vActiveView := AMaster.ActiveDetailIndex;

  AMaster.ActiveDetailIndex := 0;
  ExportGrid4ToHTML(FileName1, cxGrid1);
  FileCopy1 := TStringList.Create;
  FileCopy1.LoadFromFile(FileName1);

  AMaster.ActiveDetailIndex := 1;
  ExportGrid4ToHTML(FileName1, cxGrid1);
  FileCopy2 := TStringList.Create;
  FileCopy2.LoadFromFile(FileName1);

  AMaster.ActiveDetailIndex := 2;
  ExportGrid4ToHTML(FileName1, cxGrid1);
  FileCopy3 := TStringList.Create;
  FileCopy3.LoadFromFile(FileName1);

  FileCopy1.Text := FileCopy1.Text + FileCopy2.Text + FileCopy3.Text;
  FileCopy1.SaveToFile(FileName1);

  Save_Dialog.Do_Save(Filename1, 'MasterDetail', 'html', 'HTML files (*.html)|*.HTML');

  AMaster.ActiveDetailIndex := vActiveView;
end;

If the selected master was AA and in the master BB the selected detail was B, at the end what we obtain was:

Master: AA
  Detail A
Master: BB
  Detail B
Master: AA
  Detail B
Master: BB
  Detail B
Master: AA
  Detail C
Master: BB
  Detail B
0
 

Accepted Solution

by:
PAQ_Man earned 0 total points
ID: 15132109
PAQed with points refunded (125)

PAQ_Man
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question