DocumentForm -> Report parameter "Ref"

Common questions about 1C:Query language, Query builder tool and Data composition schema

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Sep 18, 2012
Company:

Hello everyone,
I've got DocumentForm where I created command. Now I want to open report fr om this form with report's parameter filled using Object.Ref of document.
Command button triggers something like this:

Code
&AtClient
Procedure OpenReport(Command)
   Filter = New Structure("Ref",Object.Ref);
   FormParameters = New Structure("GenerateOnOpen, Filter, VariantKey",True,Filter,"Default");
   OpenForm("Report.ZlecenieNaprawyPodsumowanie.ObjectForm",FormParameters,ThisForm,ThisForm);
EndProcedure


The object form of report opens after clicking button but Ref parameter of report has no value, it is not filled. How should I open it so the report knew the value of document Reference? So that user could click button at document and see report data linked with this document?

MainDataCompositionSchema of report has query where is written:
Code
"... WHERE Document.Ref = &Ref"

I just want to see only &Ref data in report after calling command at documents form.
Thank you for any help.
Kris

 
#2
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 4, 2018
Company:

Hello, Kris!
I think you should use "Report.ZlecenieNaprawyPodsumowanie.Form" instead of "Report.ZlecenieNaprawyPodsumowanie.ObjectForm".

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.