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
ezoltan  
#1 Posted : Monday, September 23, 2019 7:39:29 AM(UTC)
ezoltan

Rank: Newbie

Groups: Registered
Joined: 9/23/2019(UTC)
Posts: 1
Romania
Location: Tg Mures

Hi everyone,

My report generates a table with entries between two dates configured in the Restrictions section of the model definition.

I want my report to display something like "Report for StartDate - EndDate", where StartDate and EndDate are the dates that I select in the date picker when the report is run.

I suspect there should be some variables which hold these dates.

Two questions:
1. What are they and how can I use them?
2. How to I define a title for my report?

Thank you.
epf  
#2 Posted : Tuesday, October 1, 2019 6:21:02 AM(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)
Yes, please check first https://sealreport.org/R...es#lineDynamicChartTitle

To have the dates from the restrictions, it should be something like:

var restriction = report.Models[0].GetRestrictionByName("Order Date");
result = restriction.Date1.ToString() + "-" + restriction.Date2.ToString();

so it is pure C#, check that Date1 and Date2 are not null, and format the date as you want...
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.