2 Different Printout

fahd
Member Posts: 226
Dear Experts,
In Sales & Marketing> Posted Invoices there is only default print out.
Is there any way that i can have 2 different design for the same invoice???
Like if we click print on posted Invoice there is only one print design which is by default design. But i want another Design for the same invoice. So basically there will be 2 different print designs for the same invoice that i want to print.
Kinldy let me know if it's possible.
Thanks & Regards,
Fahd
In Sales & Marketing> Posted Invoices there is only default print out.
Is there any way that i can have 2 different design for the same invoice???
Like if we click print on posted Invoice there is only one print design which is by default design. But i want another Design for the same invoice. So basically there will be 2 different print designs for the same invoice that i want to print.
Kinldy let me know if it's possible.
Thanks & Regards,
Fahd
0
Answers
-
In which conditions you want print them?
or you want them every time?0 -
Dear Mohana,
I just need 2 different design because we have 2 companies. Sometimes we want the print with company 1's header details and sometimes with company 2's header design and we will always take the prints from posted invoice. Every thing will be the same the only thing will be changed is the header details of that invoice.0 -
Why dont you create 2 headers and use
CurrReport.SHOWOUTPUT := COMPANYNAME = 'CRONUS USA, Inc.';
0 -
Thanks for reply,
In navision we have only one company.
So we need different format for the design but that should be pirnted out from posted invoice only.
By default if i click on print in Sales invoice it's taking the report (206). By using the same report i save as 50012.
But in the header details i have changed some details. now i want system to give me both these reports when click on print button or if there is other button which could named as print 2, means either to print in 206 or 50012.0 -
fahd wrote:Thanks for reply,
In navision we have only one company.
So we need different format for the design but that should be pirnted out from posted invoice only.
By default if i click on print in Sales invoice it's taking the report (206). By using the same report i save as 50012.
But in the header details i have changed some details. now i want system to give me both these reports when click on print button or if there is other button which could named as print 2, means either to print in 206 or 50012.
why you need two report ?
you design two header and take option type variable . now you can manage which header you want to show and hide in report by managing option variable in request form.
if you have only two format then you can also use Boolean type var
standardformat var Boolean type
on one header
CurrReport.SHOWOUTPUT(standardformat);
on other
CurrReport.SHOWOUTPUT(not standardformat);0 -
For us we needed 2 completely different report. It just wasn't a header change which would have been great.
So In the Sales Invoice Header Table There is a function called "PrintRecords" So I added a maching function with a new name "PrintInternetRecords".
I Added the 2nd invoice type to the Report Selections Table.
Original Code: to print Standard InvoicePrintRecords(ShowRequestForm : Boolean) WITH SalesInvHeader DO BEGIN COPY(Rec); ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"S.Invoice"); ReportSelection.SETFILTER("Report ID",'<>0'); ReportSelection.FIND('-'); REPEAT REPORT.RUNMODAL(ReportSelection."Report ID",ShowRequestForm,FALSE,SalesInvHeader); UNTIL ReportSelection.NEXT = 0; END;
Copied Code to the new function to call the other reportPrintInternetRecords(ShowRequestForm : Boolean) WITH SalesInvHeader DO BEGIN COPY(Rec); ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"S.Wholesale"); ReportSelection.SETFILTER("Report ID",'<>0'); ReportSelection.FIND('-'); REPEAT REPORT.RUNMODAL(ReportSelection."Report ID",ShowRequestForm,FALSE,SalesInvHeader); UNTIL ReportSelection.NEXT = 0; END;
ON the Print button of the posted invoice I changed the code ONPUSH.
It checks the type of order it is and prints the desired invoice report.OnPush() IF NOT "Internet Order" THEN BEGIN CurrForm.SETSELECTIONFILTER(SalesInvHeader); SalesInvHeader.PrintRecords(TRUE); END ELSE BEGIN CurrForm.SETSELECTIONFILTER(SalesInvHeader); SalesInvHeader.PrintInternetRecords(TRUE); END;
The above code could be on seperate buttons if you wish instead of one.
this is the long drawn out way - so if you just need a header change then that's the way to go0 -
VOILAAAA
Thank uuuu!!!
It worked, thanks for such a great support !!0 -
-
0
-
Dear Mr. Harry,
With the above mentioned coding i was fine with 2 different printout.this morning i tried the same way for the 3rd invoice print out.
I desinged the 3rd report and i did for sales invoice table.
But now, I went to Purchase order i click on print button of Purcahse order it gave me this error.
"THE SALES - INVOICE REPORT does not have a data item that uses the table (Table 38 Purchase Order)specified in the function settable view".
My question is i made changes in Sales Invoice table then how come it is effecting the Purchase order table.
Why it is mentioning the SALES-INVOICE REPORT. is there any kind of filter in Codeunit 229 or what.
Kindly let me know ASAP.
Thanks.0 -
I think you are passing Purchaseheader record variable While calling the Sales Invoice Report.0
-
Der Mohana,
Thanks for the reply i guess this might be the problem!!.
Could you kindly further guide me that how can i check this where can i check this??
Thanks & Regards,
Fahd Liaqat0 -
Activate debugger and check..it will point the exact line..0
-
it's stopping on the following
REPORT.RUNMODAL(ReportSelection."Report ID",TRUE,FALSE,PurchHeader)
UNTIL ReportSelection.NEXT = 0;0 -
fahd wrote:REPORT.RUNMODAL(ReportSelection."Report ID",TRUE,FALSE,PurchHeader)
Clearly it showing that you are passing PurchHeader0 -
yeah but i am runnning the print on Purchase order itself.
I am getting the error when i click on Print Button of the Purchase order.0 -
Why do you need Sales Invoice print out from Purchase Order?0
-
Nooo i don't need sales invoice from Purchase.
I want the the default Purchase order Print out (Report 405) from purchase order.
that's what i want. i need the purchase order print out from purchase order it self but it's not showing me.
it's detecting sales invoice from some where instead of printing purchase order.
It gave me the error as already stated above.0 -
Check what filters applied to ReportSelection record..
just above the code where you are getting error message..0 -
It's stated like this..
ReportSelection.SETFILTER("Report ID",'<>0');
ReportSelection.FIND('-');
that's just above of that And it is showing in codeunit (229) in Debugger.0 -
Therefore we have added an extra option on the invoice header called "Invoice Lay-out Code"
This way the user can select which Invoice Lay-out he would like to print.0 -
isn't there any filter like
ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"P.Order");
If not, it will pick up the first line from Report Selections table..
Which function is that in CU229?0 -
yes it was in CU 229 in Duebugger.
I found one filter under the Trigger PrintPurchHeader(PurchHeader)
ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"S.INVOICE")
so i changed it to ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"P.Order")
now it's working fine.
i don't know how it changed itself. :shock:
But it's fine now just asking if i have made this step correctly??
Kindly let me know and thanks for a great help !0 -
If you modified under this line means it is correct..
PurchHeader."Document Type"::Order: ReportSelection.SETRANGE(Usage,ReportSelection.Usage::"P.Order");
And you are Welcome0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions