Printer settings / defaults to handle paper trays?
Using latest fast reports 5 VCL Professional Edition and Berlin update 2
I am getting beat up on a deal where customers complain that paper tray settings are not saving.
They print a report to say a BROTHERS printer ... they select paper tray 2.
Close the program and come back.
Go to print ... and fire it off... goes to in this case maybe, paper tray 1 ... (or whatever default is maybe for that printer) ?
I do nothing paper/bin related.
I run the report, show print dialog can be true or false and call the report print call.
I searched around but have not come up with anything that really talks about this.
Apparently they are saying my program is not using the settings exactly that they have set as defaults for their printer.
One customer showed me where Tray 2 is their default.
If they bring up the printer dialog in my app before it prints, Tray is on AUTO ...
I currently have it so in a configuration screen that can pick a printer default for a certain report. Invoices goes to this printer, workorders to different one and so on.
Do I need to make it so it shows available printer trays for each printer?
Is that doable? How would I get those tray/bins ... and then save it off and then restore back to the FRX report engine to specify that bin/tray?
I am getting beat up on a deal where customers complain that paper tray settings are not saving.
They print a report to say a BROTHERS printer ... they select paper tray 2.
Close the program and come back.
Go to print ... and fire it off... goes to in this case maybe, paper tray 1 ... (or whatever default is maybe for that printer) ?
I do nothing paper/bin related.
I run the report, show print dialog can be true or false and call the report print call.
I searched around but have not come up with anything that really talks about this.
Apparently they are saying my program is not using the settings exactly that they have set as defaults for their printer.
One customer showed me where Tray 2 is their default.
If they bring up the printer dialog in my app before it prints, Tray is on AUTO ...
I currently have it so in a configuration screen that can pick a printer default for a certain report. Invoices goes to this printer, workorders to different one and so on.
Do I need to make it so it shows available printer trays for each printer?
Is that doable? How would I get those tray/bins ... and then save it off and then restore back to the FRX report engine to specify that bin/tray?
Comments
I have this running on thousands of machines over maybe 600 locations across the country.
All different.
So setting a tray in the designer, wouldn't that be an issue due to one place maybe have 3 trays, or 2... or just 1 paper pickup?
I need it so either it saves this info the user selects when that print dialog comes up (which i dont think is the case, cause its the printer driver doing the work as its their UI elements)
or a way for when users configure their printers in our program for different tasks, such as printing a workorder it goes to the "Workorder Printer" they have installed and then show
any and all paper trays that printer may have. So they can then pick one of the trays if they have any, and go from there.
Some locations have a printer with 3 trays... white, yellow, green paper..... quotes, workorder, invoice... so it would be nice to fire the print out to the proper tray.
They will have printer installed 3 times... 3 names. But each one pointing to a tray as its default.
Some people this is fine... others not. Looses the tray that is set to default in the driver. And when you look at the tray in the printer dialog, it would have "AUTO" maybe selected.
ok so there is 2 properties to set .... but how do I programmatically get the available bins?
As mentioned, I have zero clue what a person has printer wise. Could be an old inkjet printer for all I know.
I have a form that allows people to setup their defaults depending on what they are printing. I just save off the printer name string.
Then I pass that string to FRX to tell it what printer to use.
Is there anything that pulls the bin/trays available for a printer and be able to save that off and then pass it to frx before printing?
Does FRX have anything like that built in? Do I need find a Windows call instead to find bin/trays? If gotta use a windows call, do those
values 100% translate over to passing FRX? .... as mentioned, never touched bin/trays before.
Returned nothing.
Found another example @ https://www.experts-exchange.com/questions/...nter-trays.html
Which it returned
u=7
a=1
T=258
a=4
Which to me... means nothing as I have no idea what the left side is...I assume the right side is an ID number of sorts.
If so would this be the # to pass to the FRX report? But currently without any idea what the tray name is , or what printer that goes to,
it doesn't do me any good.
Printer I want to test against, only has 2 trays.
Has a call called GetBinnames
It shows me the names of the bin ... modified it a bit to get name and number value
Brother HL-6180DW series
Auto Select - 7
Tray1 - 1
Tray2 - 2
MP Tray - 258
Manual - 4
Tray2 - 2 .... that has my green paper in it... Tray1 has white paper.
my code
Not sure if doing this right .... but it always comes out of Tray1
If I do this ... this works.. came out of tray 2 finally.
One problem here with the device i am testing against
If i use the showdialog TRUE , the paper tray shows whatever. In this case for me it always shows
First Page "Auto Select"
Other Pages "Same as First Page"
Is there any way that First page property in the printer driver says "Tray 2" by setting something before hand?
That way if the bring up the printer dialog box, the print driver already has this printer set?
My hero ... I'll check this out ... I tried searching and searching and couldn't find anything that mentioned this.... am I that blind?
The only thing I have to question if possible, is setting the printer bin BEFORE fastreports shows the printer dialog box.
So I can pre-set it to Tray 2 ( value of 2 in this case ) and if they look at the printer properties in this case for the printer, it would have
Tray 2 preset for them instead of "Auto Select" ...
Because if the user is setup to show the printer dialog , they may want to print to a different bin for whatever reason... or maybe not.
But if its set to "auto select" its gonna go to wrong tray most likely.
Is there a way you know of to pre-set the bin value to the printer driver before that dialog comes up ?
BUT
If I use delphi's TPrinterSetupDialog to show it ... it works.
So its like FastReports is whipping out my settings?
Included is another video that shows how it works in the TPrinterSetupDialog as desired. This is what is the last part holding me up.
https://www.youtube.com/watch?v=uGAhal8Ecik...eature=youtu.be
What is interesting.. talked to on of my customers complaining.. he said up until recently, if they changed the paper source to tray 2 ... it would stick.
Until they close my program and brought it back up. Now it always resets.
I did upgrade FastReports some what recently too... any chances there is a deal that is always blasting out the settings back to some kind of blank/default settings?
I want to be able to pre-set to a tray.
I want it to show the printer dialog that the pre-set tray is selected. ( Like in TPrinterSetupDialog in my video )
I want the tray the customer ends up picking or if the customer leaves as the pre-set one to be the one it prints to.
But when frx report print call is done, it ignores it. Assuming it wipes the driver settings back to a default.
I can programatically set this all, but the whole issue comes down to
If the user wants to see the dialog box before printing, I can't set the driver to the proper tray.
And if the user picks a tray at this point, if I have it programmed in... their selection no longer matters.. cause i just put it back in my code
to probably something else than what they picked.
Am I crazy????
Here is a video showing using the dialog box ... tray2 used ... picked by me, the user ..... but the printout comes out of tray 1 ...
video @ https://youtu.be/r_2TQvSb7Ts
Unless I am 100% missing something here that I am requesting the absolute impossible, someone please explain to me why this idea is impossible ?
I can set the printer driver to a desired printer tray.... (if user decides)
Show the printer dialog box.
Get the printer bin selected ... as user might have changed it...
Store it and use it in the FR onPrintPage event to use it.
Now I can set a tray.
User can leave it be... or select a different tray.
And the print out comes out of the correct tray.
I am sure there will be some negative effect of doing this that I can't think of ... but the FR dialog lacks this support sadly so I have to use the more generic
print dialog box in Delphi to get the job done right.