logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
DharanGokul  
#1 Posted : Tuesday, November 15, 2022 11:37:28 AM(UTC)
DharanGokul

Rank: Newbie

Groups: Registered
Joined: 4/7/2022(UTC)
Posts: 4
Man
India
Location: Erode

Thanks: 1 times
Hello All,
I created the reports with 3 model 3 views then there are SQL are same but the display values are different, So I created the Enumerated list and Added to the restriction 4 types.
then I execute the report it shows every model has a separate restriction. I need to merge that. please tell me how to do?
4 types of restrictions only need to filter the data 3 models.

Screenshot: https://prnt.sc/1JL5mdOwfLDv
epf  
#2 Posted : Tuesday, November 15, 2022 12:54:32 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
1 restriction is prompted for several models if the restriction is for the same table column and the restriction names are the same.
if you want to copy restriction values on different restriction (e.g. duplicate a date value), just create a Task to do it,
there is a code sample provided:
Code:

@using System.Data
@using System.Data.Common
@{
    //Copy restriction values
    ReportTask task = Model;
    Report report = task.Report;
    //get source and destination restrictions
    var source = report.Models.First(i => i.Name == "name1").Restrictions.First(i => i.SQLColumn == "Orders.OrderDate");
    var dest = report.Models.First(i => i.Name == "name2").Restrictions.First(i => i.SQLColumn == "Employees.HireDate");
    //copy all values
    dest.CopyForPrompt(source);
    dest.Prompt= PromptType.None;

    //or copy the properties
    dest.Operator = source.Operator;
    dest.Value1 = source.Value1;
    dest.Date1 = source.Date1;
    dest.Date1Keyword = source.Date1Keyword;
    dest.Value2 = source.Value2;
    dest.Date2 = source.Date2;
    dest.Date2Keyword = source.Date2Keyword;
    dest.EnumValues = source.EnumValues.ToList();
}


Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.