I cann't print from report view form

willsonfuwillsonfu Member Posts: 14
I cann't print from report view form ,system view "this report cannot be printed from print preview. Quit print preview and run the report." when i print it

Comments

  • johnson_alonsojohnson_alonso Member Posts: 690
    Just do alt+F, select print, after you set up your printer first in the panel control print set up. Maybe you forget to set up your printer.


    rgds,
    Johnson Alonso

    "Fade to black"
  • willsonfuwillsonfu Member Posts: 14
    My printer setup is ok,if I don't view and do "print" button ,I can print it
  • johnson_alonsojohnson_alonso Member Posts: 690
    Have you checked this code :

    "ManuPrintReport.PrintProductionOrder(Rec,3);" whether it's available or not in your navision?

    Pls look in the object designer --> codeunit ---> codeunit #99000817 , if maybe there is something wrong there.

    rgds,
  • johnson_alonsojohnson_alonso Member Posts: 690
    Dear wilson,
    I forget because I am in a hurry, here as follow what I did when I find trouble to print PO from PO header after I click print --> designer --> report designer--> F9 :
    DataItem Name
    Purchase Header <Purchase Header>
    Integer CopyLoopInteger PageLoop
    Integer DimensionLoop1
    Purchase Line <Purchase Line>
    Integer RoundLoop
    Integer DimensionLoop2
    Integer VATCounter
    Integer Total
    Integer Total2
    Integer Total3

    CopyLoop - OnPreDataItem()
    NoOfLoops := ABS(NoOfCopies) + 1;
    CopyText := '';
    SETRANGE(Number,1,NoOfLoops);

    CopyLoop - OnAfterGetRecord()
    CLEAR(PurchLine);
    CLEAR(PurchPost);
    PurchLine.DELETEALL;
    VATAmountLine.DELETEALL;
    PurchPost.GetPurchLines("Purchase Header",PurchLine,0);
    PurchLine.CalcVATAmountLines(0,"Purchase Header",PurchLine,VATAmountLine);
    PurchLine.UpdateVATOnLines(0,"Purchase Header",PurchLine,VATAmountLine);
    VATAmount := VATAmountLine.GetTotalVATAmount;
    VATBaseAmount := VATAmountLine.GetTotalVATBase;
    VATDiscountAmount :=
    VATAmountLine.GetTotalVATDiscount("Purchase Header"."Currency Code","Purchase Header"."Prices Including VAT");
    TotalAmountInclVAT := VATAmountLine.GetTotalAmountInclVAT;

    IF Number > 1 THEN
    CopyText := Text003;
    CurrReport.PAGENO := 1;

    CopyLoop - OnPostDataItem()
    //IF NOT CurrReport.PREVIEW THEN
    // PurchCountPrinted.RUN("Purchase Header");


    The sign // will make me able to print PO directly from PO header. Those above mentioned code is only a comparision for you. I don't know what you are trying to print.


    rgds,
    Johnson Alonso

    "fight fire with fire"
  • kinekine Member Posts: 12,562
    of course, the problem is CurrReport.PREVIEW. If you will search Mibuso for that, you will see why... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.