print problem-TsrvActionPrint does not work

Public forum for discussing TScaleRichView (shareware addon to TRichView providing WYSIWYG editing)
Post Reply
wolf1860
Posts: 37
Joined: Sat Nov 21, 2015 2:04 am

print problem-TsrvActionPrint does not work

Post by wolf1860 » Tue Feb 21, 2017 2:33 am

My form has one TsRichViewEdit,one TRVAConotrolPanel,one TActionList, I add 2 standard actions:TsrvActionPrint,TrvActionSave,then I set the TRVAControlPanel.DefaultControl:=TsRichViewEdit,but TsrvActionPrint does not work,and then I set
TsrvActionPrint.Control:=TsRichViewEdit;
TsrvActionPrint.ControlPanel:=TRVAConotrolPanel;
TsrvActionPrint.ActionSave:=TRVActionSave;
It does not work yet.

but I ran the demo application( ationTest),and open a rvf file,it worked fine.The difference is when the demo print,the printer icon on the toolbar show:There are 2 documents in the list,but There is only 1 document when my application did the same thing.

How should I fix it?

Sergey Tkachenko
Site Admin
Posts: 13584
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: print problem-TsrvActionPrint does not work

Post by Sergey Tkachenko » Tue Feb 21, 2017 6:58 am

Sorry, I do not understand the paragraph about toolbar icons and documents in a list. What toolbar? What list?

What do you mean by "the action does not work". Is it disabled?

wolf1860
Posts: 37
Joined: Sat Nov 21, 2015 2:04 am

Re: print problem-TsrvActionPrint does not work

Post by wolf1860 » Tue Feb 21, 2017 7:08 am

Sorry,the toolbar maybe should call it status bar ,The screen right-bottom,which displays the system time and so on. Said the document list ,maybe the correct text is there is one document is suspend? When I call the action execute, the printer has no response.
the demo application can print the rvf file.

You tell me how to do in my application or what mistake i have made.I just want to print a simple rvf file by using the standard action.

Let me know if i figure out my situation,thanks a lot!

Sergey Tkachenko
Site Admin
Posts: 13584
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: print problem-TsrvActionPrint does not work

Post by Sergey Tkachenko » Tue Feb 21, 2017 8:28 am

So, the action starts printing, the document in the system printing queue, but the printer does not print it.
Am I right.

I cannot say why it may happen. I cannot remind settings that may cause this.
Also, I do not understand why do 2 document appear in the printing queue when you print from ActionTest.
May be something wrong with the printer?

If you send me a project reproducing the problem, I'll try to find the problem.

wolf1860
Posts: 37
Joined: Sat Nov 21, 2015 2:04 am

Re: print problem-TsrvActionPrint does not work

Post by wolf1860 » Tue Feb 21, 2017 10:25 am

Thanks a lot.
It looks there is nothing wrong in my application? My customer said my printing application worked nice,maybe something is wrong with my printer? Haha,Nobody knows why the demo application works perfect even you:).
Can u tell me if i need set the action's properties:control/controlpanel/ActionSave except setting the controlPanel's DefaultControl? Because I did not see the demo application set anything about the standard action.

Sergey Tkachenko
Site Admin
Posts: 13584
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: print problem-TsrvActionPrint does not work

Post by Sergey Tkachenko » Tue Feb 21, 2017 1:22 pm

No special settings are necessary.

If ActionSave is not assigned, this action uses the first found TrvActionSave in the same form. Almost all RichViewActions references between actions work in this way, you can see the demos do not have them assigned.

If ControlPanel is not assigned, active TRVAControlPanel component is used (the first created TRVAControlPanel becomes active, normally, an application has a single TRVAControlPanel). Because of this, the demos do not assign ControlPanel explicitly.

If ControlPanel's DefaultControl is not assigned, the focused TSRichViewEdit is used (or, if not focused, the first found TSRichViewEdit on the active form).

wolf1860
Posts: 37
Joined: Sat Nov 21, 2015 2:04 am

Re: print problem-TsrvActionPrint does not work

Post by wolf1860 » Tue Feb 21, 2017 3:55 pm

Thank you very much!

Post Reply