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
Macj21004  
#1 Posted : Thursday, December 4, 2014 4:27:45 PM(UTC)
Macj21004

Rank: Newbie

Groups: Registered
Joined: 12/4/2014(UTC)
Posts: 6
India
Location: Pune

Hi,

I'm looking out for ways by which I can have a custom header.

For e.g.
I want something like this in the header
"Rancho Park Compounding Pharmacy
Employee Productivity Report"

and next to it I want the start date and end date which would come from the database.

First up, I'm unable to identify how to add a line break!

Can anyone pleaseee help, this is really urgent!!!!

Regards,
Mac
epf  
#2 Posted : Thursday, December 4, 2014 5:58:15 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)
You can customize the Display name = title by doing this:
Click on tree node Views, and edit the Display Name property: you can insert Razor Script there...so you can do a lot...

If not enough, you have to customize the Template text of the main view (which has the Report.cshtml template),
to do this, select the main view, set 'Use custom template text' to true, then edit the 'Template text' and do what you want in HTML,
this requires some CSHTML skills.

Good luck.
Macj21004  
#3 Posted : Thursday, December 4, 2014 6:13:25 PM(UTC)
Macj21004

Rank: Newbie

Groups: Registered
Joined: 12/4/2014(UTC)
Posts: 6
India
Location: Pune

Hi,

Thanks a lot for the reply, it really helps.

Just a couple of questions:

1) In the display name section, do you know, how to add a line break between two lines?
2) If not above, then I've tried the custom template option, and it seems to work, but it will take a long time to understand!
3) In case of custom template, do you know, how to display dates from the database?

I'm a little weak in HTML as well, so asking such basic questions, it will be great if you could answer them!

Regards,
Mac
Macj21004  
#4 Posted : Thursday, December 4, 2014 6:20:22 PM(UTC)
Macj21004

Rank: Newbie

Groups: Registered
Joined: 12/4/2014(UTC)
Posts: 6
India
Location: Pune

Also,

When I make any change to the custom template, the text appears in the header. But it also takes the filename, which is specified in the display name, I'm trying to keep this to null but it still takes the filename.

Is there way for me to override the display name value with whatever is there in the custom template?
epf  
#5 Posted : Thursday, December 4, 2014 7:45:11 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)
The answer is not obvious and it is always to avoid to do a custom template as you will loose compatibility for the future versions....

The header is displayed in the peace of cshtml code (from line 309):
<div style="display: inline; float: left; vertical-align: middle;">
<img src='@Report.AttachImageFile(Report.Repository.Configuration.LogoName)' title="Logo" alt="Logo" />
<span class="title">@Report.ExecutionName</span> <span id="@ReportExecution.HtmlId_processing_message" class="info_message" style="margin-left:20px; display:@(Report.PrintLayout ? "none" : "inline")">@Report.Translate("Processing...")</span>
</div>

@Report.ExecutionName is the name you have built in the display name...
You can have html tags in the Execution name (like <br> for a line break) if you use @Raw(Report.ExecutionName)

then you have to learn on HTML positioning and also CS Razor to achieve what you want, there are a lot of tutorials/documentations on these technologies.
Macj21004  
#6 Posted : Tuesday, December 9, 2014 11:33:17 AM(UTC)
Macj21004

Rank: Newbie

Groups: Registered
Joined: 12/4/2014(UTC)
Posts: 6
India
Location: Pune

Hi,

Thanks a lot.

This worked perfectly for me!!

Mac
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.