I want to save report Filters in Request Form

icobaniicobani Member Posts: 70
I want to save a table all Data Items Filters with a name. But cannot get any filter filters is emty.

Filter Header Table
1 Filter ID Integer
2 Filter Name Text 100
3 USER ID Code 100
4 Report ID Integer
5 Report Name Text 100

Filter Line Table
1 Filter ID Integer
2 Line No Integer
3 Type Option
4 Source ID Integer
5 Field ID/Var. Name Text 100
6 Filter Value Text 250

See Image




Please Help Me.
Ibrahim COBANI | Dynamics-NAV Developer Team Manager
I m a Consult

E-Mail: ibrahim@imaconsult.com
My BLOG

Comments

  • DenSterDenSter Member Posts: 8,305
    If you're talking about the options tab, you can set the 'SaveValues' property to Yes, and that should store the form values in the zup file. It might also be that the report you are working on resets some values when it starts. Check out the OnInitReport trigger.
  • icobaniicobani Member Posts: 70
    I want to save some filter and use any time.
    For Example,
    I want to save Customer and Sales Header Tables filter a table Name of Test1, I want to save filter other time other filter Name of Test2 and I want to use other time Test1 or Test2 filter. My customers is some difficult.

    Can u see my request form
    Ibrahim COBANI | Dynamics-NAV Developer Team Manager
    I m a Consult

    E-Mail: ibrahim@imaconsult.com
    My BLOG
  • icobaniicobani Member Posts: 70
    Is it possible run report in form with saved filter ?
    Ibrahim COBANI | Dynamics-NAV Developer Team Manager
    I m a Consult

    E-Mail: ibrahim@imaconsult.com
    My BLOG
  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    Hi

    You just can to add to report a function for load the parameters from some configure table to options report form:

    Report.USEREQUESTFORM := FALSE;
    Report.SetProfile('Profile1');
    Report.Run;

    or

    Report.USEREQUESTFORM := TRUE;
    Report.Run;


    For example if you run this report with CurrReport.USEREQUESTFORM = TRUE then open only options form and save all parameters to table and just exit. Else load from table all parameters and run report without options form
  • icobaniicobani Member Posts: 70
    =D>
    Ok repeat thinking this idea.

    1. I create a report and add a checkbox request form for save filter. And add a text box filter name. I m saving report filter onPreReport().

    2. I add a function SetReportFilter(Filter Name Text(30))

    3. I create a form Add two two combo, user select a report and select a filter name.

    4. Click Run report button
    Report.SetReport(paramFilterName);
    Report.Run;

    Is it run ?
    Ibrahim COBANI | Dynamics-NAV Developer Team Manager
    I m a Consult

    E-Mail: ibrahim@imaconsult.com
    My BLOG
  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    Hi

    Yes but having some limits -

    For use Report functions need work with variable type REPORT not just use REPORT.RUN. So this able only for depend reports via CASE for example :(
    It's bad.


    You propose I made in my project ealy - work nice.

    Other propose -

    The user run via menu some report -> open list form with some profiles -> user select a profile and run -> report load from some table all parameters and run. On list form with profiles can be a button Edit type which run this report options form only for parameters edit purposes. The parameters can be hold in table with fields "Profile Code","Parameter Name", "Parameter Value".
  • icobaniicobani Member Posts: 70
    I have a question,

    Reports have different dataitems, I m imagine this status,
    User use this form, select a report, and select a profile and he/She want to change this parameters,

    for example :
    Customer Tab:
    Sales Persone Code parameter change 'XX.XX'

    Sales Header:
    Posting Date parameters change 01/09/2007..01/10/2007
    Document Type=Document Type::Invoice

    How can I show only used dataItems and field for each report ? Is it possible. If not possible I should think only limited report. If it is not possible. This is very expensive for customer :)




    Profile Code,Parameter Name, Parameter Value
    Ibrahim COBANI | Dynamics-NAV Developer Team Manager
    I m a Consult

    E-Mail: ibrahim@imaconsult.com
    My BLOG
  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    Hi

    The user change a profile only via options form. This form know how save and load this parameters. So you need change this reports for it.

    For example: The name this parameters may be depend from DataItems and common options have a name this options as on form. (example: "Item 1 No.", "Customer 10 Name", "IsCheck" etc).
Sign In or Register to comment.