Dear All, How can I do create new option for setting orientation (Portrait, Landscape) on request form? I know I can choose at printer properties when I need to print out or fix on the report orientation properties. This request from customer to make Flexibility for them. How can I make it? Thanks in advance klum
I don’t think orrientation can be changed runtime via C/AL
You could create 2 reports, one Portrait and one Landscape. For the customer, you can make it seem like it’s only one report by calling the other one with REPORT.RUN (or an function in that report if you need to pass variables) and then CurrReport.QUIT in the first report. Regards, Daniel
Can’t you do that with the Printer Driver? When printing you’ll be asked to select the printer, usually you can adjust some properties here … If that’s not feasible, you could do this: Create a dummy report, where you can select an user-defined option to select the orientation. Create two versions of your original report, one Landscape, one Portrait. Then this dummy report executes one of these reports, depending on the orientation selection … sorry, I think a more generic solution is hardly possible …
Hi Daniel! You were too fast [;)]
I would prefer two printer drivers. Though some sections can mess that option up, it will be less work in terms of long term manitinence.
Thanks a lot all of your solution. Now I made other one landscpae and my options tab I did add a boolean control but how other one landscape report run when I choose otion boolean without request form again [:(] (I working on Account Schedule Report) This code I put on PreDataItem on FirstDataItem(Acc. Schedule Name) IF Landscape THEN BEGIN REPORT.RUN(REPORT::"Account Schedule Landscape"); CurrReport.BREAK; END;
What I forget something with my coding? Can anybody tell me? Best Regards, Klum
start the second Report with: REPORT.RUN(REPORT::“Account Schedule Landscape”,FALSE); From the C/SIDE Reference Guide:
quote:
REPORT.RUN(Number [, ReqWindow] [, SystemPrinter] [, Record]) Number Data type: integer The ID of the report you want to execute. You can use the Symbols option on the View menu to choose from a list. If the report you specify does not exist, a run-time error occurs. ReqWindow Data type: boolean Tells the system whether it should display the request window for the report. The request window is part of the report object. To… Enter… Display the request window before running the report TRUE (default) Run the report without showing the request window FALSE SystemPrinter Data type: boolean Tells the system whether it should use the default Windows printer or use the Printer Selection table to find the right printer for this report. For example, if the report prints on continuous forms, you can set up an entry in the Printer Selection table to tell the system to always print this report on a specific printer. To print on the printer defined… Enter… As the system printer TRUE Through the Printer Selection table FALSE (default) Record Data type: record Tells the system which record to use in the report. The system will use any filters attached to the record you specify.
Regards Daniel
Won’t this method cause an issue in selecting a printer? If a printer is selected for the first report, that can’t be passed to the second report. You would have to use the system/default printer.