I am trying to make a custom form to edit some reports. I have a TppVariable and would like to call via code the Calculations form, so the user can edit it. How can this be done?
I was assigned to another job, only now I could test it again...
I am trying to repeat that code, but I get an AV when trying to set the report:
lFormClass := ppGetFormClass(TppCustomCalcDialog); if (lFormClass = nil) then Exit; lDialog := TppCustomCalcDialog(lFormClass.Create(aVar)); lDialog.LanguageIndex := aVar.Report.LanguageIndex; { I don´t have access to 'Component' ... it seems not to be so important here: lDialog.Tag := Integer(aVar.Report); //Integer(Component); }
{ this look important: lDialog.Report := Component.Report; trying to use my available report - here I can see in a watch that aVar.Report points to an instantiated report ... so what´s wrong? } lDialog.Report := aVar.Report;
{display the dialog} lDialog.ShowModal; lDialog.Release;
--------------------------- Debugger Exception Notification --------------------------- Project PROBUS.exe raised exception class EAccessViolation with message 'Access violation at address 0353610E in module 'rbRIDE1010.bpl'. Read of address 000003CD'. --------------------------- Break Continue Help ---------------------------
If I comment that assignment, the window shows OK, but I don´t have access to Data and Objects ... I am trying a RB 10 on a D2006.
Please post using your real name - this is a requirement of the RB newsgroups. (When you configure your newsreader you can specify your name to be used just for this newsserver. )
Comments
Check out ppPopMenu.pas, the method
TppVariablePopupMenu.CalculationsMenuClick
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I was assigned to another job, only now I could test it again...
I am trying to repeat that code, but I get an AV when trying to set the
report:
lFormClass := ppGetFormClass(TppCustomCalcDialog);
if (lFormClass = nil) then Exit;
lDialog := TppCustomCalcDialog(lFormClass.Create(aVar));
lDialog.LanguageIndex := aVar.Report.LanguageIndex;
{ I don´t have access to 'Component' ... it seems not to be so important
here:
lDialog.Tag := Integer(aVar.Report); //Integer(Component);
}
{ this look important:
lDialog.Report := Component.Report;
trying to use my available report - here I can see in a watch that
aVar.Report points to an instantiated report ... so what´s wrong?
}
lDialog.Report := aVar.Report;
{display the dialog}
lDialog.ShowModal;
lDialog.Release;
---------------------------
Debugger Exception Notification
---------------------------
Project PROBUS.exe raised exception class EAccessViolation with message
'Access violation at address 0353610E in module 'rbRIDE1010.bpl'. Read
of address 000003CD'.
---------------------------
Break Continue Help
---------------------------
If I comment that assignment, the window shows OK, but I don´t have
access to Data and Objects ... I am trying a RB 10 on a D2006.
Thanks
Nard Moseley (Digital Metaphors) escreveu:
Please post using your real name - this is a requirement of the RB
newsgroups. (When you configure your newsreader you can specify your name to
be used just for this newsserver. )
Newgroup guidelines are listed here
http://www.digital-metaphors.com/support/newsgroups.html
Thanks in advance,
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com