I am using Telerik reporting in my application and I am using Sqllite db file, I want the connection string to change according to the user.
I found this solution :
https://www.telerik.com/support/kb/reporting/details/changing-the-connection-string-dynamically-according-to-runtime-data
but I didn't know how to use it . I don't know what is a report source and i don't have a file with extention .trdx in my solution.
(i.e where to put this code : this.reportViewer1.ReportSource = reportSource;
this.reportViewer1.RefreshReport();
thanks,
Hi,
Im having trouble displaying the data to the documentmaptext. The code below is working which I programmatically add bookmark during the event of ItemDataBound event or even in the ItemDataBinding.
This is the code below :
private void detailTextBox_ItemDataBound(object sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox currentloadeddatainTextBox = (Telerik.Reporting.Processing.TextBox)sender;
Telerik.Reporting.Processing.IDataObject idataObject;
idataObject = currentloadeddatainTextBox.DataObject;
System.Data.DataRowView datarowView = (System.Data.DataRowView)idataObject.RawData;
System.Data.DataRow dataRow = datarowView.Row;
string PageGroupDetails = dataRow.ItemArray.GetValue(0).ToString();
string PageRow = dataRow.ItemArray.GetValue(2).ToString();
if (PageGroupDetails.Contains("[BKMARK]"))
{
if (bookmarkList.Count == 0)
{
bookmarkList.Add(new BookMarkList { BookMarkID = PageGroupDetails.Replace("[BKMARK]", "").Trim() });
detailTextBox.BookmarkId = PageGroupDetails.Replace("[BKMARK]", "").Trim();
detailTextBox.DocumentMapText = PageGroupDetails.Replace("[BKMARK]", "").Trim();
}
else
{
if (!bookmarkList.Exists(bookmarkList => bookmarkList.BookMarkID.Equals(PageGroupDetails.Replace("[BKMARK]", "").Trim())))
{
bookmarkList.Add(new BookMarkList { BookMarkID = PageGroupDetails.Replace("[BKMARK]", "").Trim() });
detailTextBox.BookmarkId = PageGroupDetails.Replace("[BKMARK]", "").Trim();
detailTextBox.DocumentMapText = PageGroupDetails.Replace("[BKMARK]", "").Trim();
}
}
currentloadeddatainTextBox.Style.Font.Bold = true;
}
}
public class BookMarkList
{
public string BookMarkID { get; set; }
}
The code is tied in the textbox control. I load all data into these textbox. Once loaded, the event itemdatabound will be triggered. In these event, I added condition that it will only add bookmark that it not yet added and also to check if the specific data has the "[BKMARK]" string which means that these part will be bookmarked.
Able to run the code but, somehow it doesn't display the correct documentmaptext properly, it shows duplicate data. tried debugging but I was only adding unique bookmark id and no duplicates.
Please I need your assistance on this.
Thanks,
Hi,
I have this scenario. I have a report with a header, a detail section and a footer. Inside of detail section I added a crosstab and a picture box. I want that the Crosstab and the picture box to start on new page (the crostab should start on a new page and then when the picture is drawn, the pciture should start on a new page). The problem is that I saw that the page break option can be used only on detail section. How can I accomplish this ?
I have also tried to add to report a header, 2 detail sections and footer but the report does not accept 2 setail sections.
Thanks
Hi,
Can you please give me a sample code how I can add multiple bookmark id in the report?
Im loading data from a textfile and load it in a 1 textbox. From there, I want to add multiple bookmarks.
Please give me a sample code how I can do it? Already browsed your docs but only description are available.
Thanks,
HI,
I have a report with one sub report. On sub-report i have a list where items are aligned to horizontal. I set KeepTogheter = True and Page Break = After.I need for each project details other new page.
The problem is the "Project Number" which is populated only one time but all information for the projects are populated to report without project number. Page break doesn't work also.
I attached a print about the situation
Thank youHi,
How do I change the forecolor of specific string in a textbox in telerik reporting in code behind?
Im pretty sure that I will put the code in the databind event but how do I code there?
For example, the string data is "Change the string property of the textbox" in a textbox. Now I want to change the forecolor to of "property" and the "textbox" to yellow and I want to make it Bold.
How do I do that?
Thanks,
I have a problem after upgrade my project from Q1 2014 to Lasr version 2017 of telerik components and reporting. I solved the problems at the all components but at Reporting still have problems and i don't know why.
I have few reports which contain 2-3 subreports. After upgrade my parameters on NeedDataSource has value 0. but on sender the value is ok.
I tried few methods to extract the value but only one works.
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;<
br
>
string idUser = report.Parameters["idUser"].Value.ToString(); <
br
>
this.llDs.DataSource = new Service().GetLLGridModel((int.Parse(idUser)));
If i put: int idUser = report.Parameters["idUser"].Value or int.Parse(this.ReportParameters["idUser"]).Value.ToString()). the value will be 0 I don't understand why?
Any other solutions? because my solution it's a trick but not clean code. i made cast to string to extract a value from object and then cast from string to int to pass to function...
Thank you
Is there a way to generate barcodes by a list of numbers.
And print them directly.
I am Using C# .
Thanks!