Set Parameter when Printing Report

elToritoelTorito Member Posts: 191
Hello,

i have a little Problem, when you would print a Report Like Quote, Purch. Invoice,.... then before the Report Print Out, it will appear the Form for make/set a filter.... automatically the NO. of the Quote is placed yet,

but if i would that another paramter appear (for example VendorNo.) when this Filterform are requested, what must i do?

#-o

Thanks
(Oo)=*=(oO)

Comments

  • xrivoxrivo Member Posts: 56
    Select the Data Item, from where you want to choose a new field ..go to the properties and select ReqFilterFields ..here you can select another one...
  • elToritoelTorito Member Posts: 191
    xrivo wrote:
    Select the Data Item, from where you want to choose a new field ..go to the properties and select ReqFilterFields ..here you can select another one...

    Hi,

    this is not the problem, Problem is when i am in "Quote Order" for example, i press Print, then the filter forms will open and has for "Quote No." it has default value the Number of the quote from where i was press print.

    Per haps i must say, i would set Default Values for the ReqFilterFields?

    Very difficulty writing englisch ... O:)

    thanks
    (Oo)=*=(oO)
  • kinekine Member Posts: 12,562
    When you press Print on sales quote, the current record is passed into the report and from that the report takes the filter values. If you filter this record to some new filter, this filter will be used in the report... In this way you can pass only filters for first data item in the report. If you need for another data item, you must do it through some procedure within the report and run the report through variable.

      SalesHeader.SETRANGE("Customer No.",'AAA0001');
      REPORT.RUNMODAL(reportID,true,false,SalesHeader);
    
    ----------- or
      CurrForm.SetRecFilter(SalesHeader);
      REPORT.RUNMODAL(reportID,true,false,SalesHeader);
    //if you want to print what is selected on form
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412
    Sorry to interfear ... but personally I don't think this is going to work:
    SalesHeader.SETRANGE("Customer No.",'AAA0001');
    REPORT.RUNMODAL(reportID,true,false,SalesHeader);
    

    I think you'll have to point to a certain record with a FIND or GET:
    SalesHeader.SETRANGE("Customer No.",'AAA0001');
    IF SalesHeader.FIND('-') THEN
      REPORT.RUNMODAL(reportID,true,false,SalesHeader);
    

    Correct me if I'm wrong though ...

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • kinekine Member Posts: 12,562
    Only filters are used, you don't need to read the record actually...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412
    You're right. I tested it, and the FIND('-') is NOT necessary.

    I should have tried it first ... .

    :oops:

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.