Telerik Forums
Reporting Forum
1 answer
278 views
I am trying to change report definition dynamically but unable to bind datasource. Could you please help me in binding the datasource dynamically. I amusing LinqtoSQL as datasource.

 

  1. On click of a button, I am calling the constructor of my report and getting the report document and setting it to InstantReportSource's report document.
  2. I am serializing the report document to XML file and making modifying the report definition.
  3. After deserializing, how to bind the datasource before inputting the report to report viewer.

Thanks

 
 
private void button6_Click(object sender, RoutedEventArgs e)
        {
            try
            {
 
                ReportViewerWindow rvw = new ReportViewerWindow();
                Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
                instanceReportSource.Parameters.Add("ParamDivisionId", null);
                instanceReportSource.Parameters.Add("ParamStartDate", new DateTime(2014, 1, 1));
                instanceReportSource.Parameters.Add("ParamEndDate", new DateTime(2014, 2, 1).AddMinutes(-1));
                instanceReportSource.ReportDocument = new DispatchAnywhere3.Reports.Report1(_user, _repository, _adminRepo);
 
                using (System.Xml.XmlWriter xmlWriter = System.Xml.XmlWriter.Create("C:/Temp/XML/ReportInside.xml"))
                {
                    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer =
                        new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
 
                    xmlSerializer.Serialize(xmlWriter, instanceReportSource.ReportDocument);
                }
 
 
                using (System.Xml.XmlWriter xmlWriter = System.Xml.XmlWriter.Create("C:/Temp/XML/ReportInsideSecond.xml"))
                {
                    XmlDocument document = new XmlDocument();
                    document.Load("C:/Temp/XML/ReportInside.xml");
 
                    XmlNodeList nodes = document.ChildNodes;
                    foreach (XmlNode node in nodes)
                    {
                        if (node.Name == "Report")
                        {
                            XmlNodeList nodes1 = node.ChildNodes;
 
                            foreach(XmlNode node2 in nodes1)
                            {
                                if (node2.Name == "Style")
                                {
                               node2.Attributes["BackgroundColor"].Value = "Red";
                                }
                            }
                        }
                    }
 
                    document.Save(xmlWriter);
 
                }
 
                Telerik.Reporting.Report report = null;
 
                using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create("C:/Temp/XML/ReportInsideSecond.xml"))
                {
                    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer =
                        new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
 
                     report = xmlSerializer.Deserialize(xmlReader) as Telerik.Reporting.Report ;
 
                     
                     
                    
                }
          
 
                rvw.ReportViewer1.ReportSource = new InstanceReportSource { ReportDocument = report };
 
                rvw.ReportViewer1.RefreshReport();
                rvw.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
 
        }
Stef
Telerik team
 answered on 12 Feb 2016
2 answers
259 views

Hello,

I am evaluating a trial version of the Standalone Report Designer and have two reports I want to link via Drillthrough.

I believe I have followed the correct procedures to select the "interactive" field and set up the corresponding next steps:

Edit Action > Navigate To Report > Select Report Source > URL or File

Both of my reports are published to our telerik server in the same folder / category. However, when I key the URL in the source box, add proper parameters, and preview, I am receiving the following message:

 

"Unable to get report parameters.
An error has occurred.
'https://telerik.justfab.net/Report/View/LMS_DEV/Department_Overview_Report' report cannot be found."

 

This is a valid URL for the report I am trying to link to, but assuming from the error message there must be some other way to reference the URL for an existing report that already resides on our server. I tried adding .trdx extension with no success.

Please let me know the proper URL format to use when setting up simple Drillthrough connection between two reports residing on the same server.

 

Thank you!

Stef
Telerik team
 answered on 12 Feb 2016
2 answers
134 views

I'm working on a calendar report that uses a daily sub-report for each day of the month.

The issue I'm running into is that with auto-scaling, each day scales differently based on the data for that day, meaning that the sub-reports are all displayed using different scales, and so don't lend themselves to side-by-side comparison.

It's impossible to know before run-time what the maximum scale for the entire month will be, so I can't hard set the axis scales either. Is there a way to 'pass in' the required scale to the sub-report along with the other parameters? I tried to put a formula in the CoordinateSystem.YAxis.Scale.Maximum property, but it seems to only accept a hard value and not a formula.

Peadar
Top achievements
Rank 1
 answered on 12 Feb 2016
1 answer
271 views
I am using the HTML 5 report viewer and currently when the user double clicks on the page, it toggles between Zoom In, Zoom Out, and Toggle FullPage Mode.  Users want to double click to select data on the report and the zoom behavior is counter intuitive to their expected behavior.  Is it possible to disable this toggle mode?
Stef
Telerik team
 answered on 11 Feb 2016
5 answers
200 views
Hi,
  I am new to telerik reporting. I have gone through some of your videos and tutorials. I have some questions regarding what is the best way to use Telerik reporting for my purposes. Hope i get the answers here;

1. I have a requirement where at the end of each day i need to email invoices to different people(dynamic list) whose email ids should be picked from a table in the database. I understand that we can create invoicing reports in telerik. But i would like to email this report in pdf format to a list of people (and the list of email ids is fetched from the database). Can this be done? if yes, then how. Can you point me in the right direction.

based on what i have read, I think i should do the following:
1. Create a report in telerik reporting as a class library
2. Then create a c# console application which should render the above report into a pdf format and then email to people

Is this the right way to do it. Is there any other better way where we can automatically achieve this without writing any c# application.

please an any body help me on this.


Thanks
Stef
Telerik team
 answered on 11 Feb 2016
1 answer
527 views

Hi,

 In my WPF app, I have a report designed by default for A4 paper and I want to fit it to print on an A5 printer.

I have read threads on this forum about the ViewerPrintScaling (especially this one http://www.telerik.com/forums/dynamic-report-column-size#R757mvc1xkKirZXyJj7MBw) and I tried to used this option.

Here are the results :

- works fine when I generate a pdf file on disk using the ReportProcessor.RenderReport function, then print-it with right-click 

- does not work in ReportWiewer (always printed in A4)

- does not work when directly printing using the ReportProcessor.PrintReport function (always printed in A4)

Am I missing something ? When I read the comment of Stef from Telerik Team, I understand that this option is always taken in account, either when rendering or when directly printing...

 Thanks by advance for your help,

Aurélien

Hinata
Top achievements
Rank 1
 answered on 11 Feb 2016
1 answer
244 views
hello,
is it possible to overlap one element that is placed in the footer section over the detail section?
see attchments
thanks
viktor
Katia
Telerik team
 answered on 10 Feb 2016
2 answers
230 views

Hello,

I have a table that runs across multiple page in a report. What I would like to have is:
- at the beginning of the report, add a special row with an initial value.
- at the end of each page, when the table continues to the next page, have a total row of the items at this position.
- at the beginning of each page, when not at the start of the table, have a repetition of the total row of the previous page.
- at the end of the table, have a special total row, that is not the same as the total row for each page.

How can I do this with Telerik Resporting?

Patrick
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 10 Feb 2016
2 answers
1.3K+ views
I am having an extremely difficult time doing a simple task. I need to create a text box that contains both text and a decimal from my database. I want to add formatting to the decimal to remove all trailing zeros (not round, I want the full number displayed just not trailing zeros). Below is my current textbox value and the result;
='Acreage:  '+ Fields.AssignmentAcres
Acreage:  640.000000000000000000
I've tried every iteration I can think of with the format function to no avail. Below is what I assume the textbox should look like but I keep receiving errors.
='Acreage:  '+Format(Fields.AssignmentAcres, '####################.######################')
I've tried with single quotes, double quotes, no quotes, I even tried the formatting '0000.0000....'. No matter what I keep receiving errors. Please keep in mind that I am not a developer, I do not know coding very well. I've seen several answers googling this that requires quite a bit of code and I have no idea where to even put that code. I am using the "Edit Expression" dialog box to enter my field values. Thanks
Dustin
Top achievements
Rank 1
 answered on 09 Feb 2016
3 answers
186 views

Hi all,

New user here (long term crystal user...so be nice please).

 I am attempting to create a cross tab report and I am noticing a couple of things. First some background.

Local install of Microsoft SQL 2014.

Query in SQL runs in under 1 sec returning 5707 records.

Telerik is Q3 2015.

If I just put the fields on the report (no crosstab), the report is rendered in ~ 3 seconds (takes a few more seconds to get to 600 pages).

I remove all the data fields and start the CrossTab wizard. I have my Customers in as the rows, Year as the columns (limited to just 2015 via the SQL query) and the sales amounts in my summary field.

 Here are my issues:

1. I have sat for 30 minutes and it never displayed a preview.

2. I run an SQL trace and see the exact same query hitting my server every few seconds. That query is the same query I used to build the report.

 I am assuming as a new user to the system I have done something horribly wrong.

Nasko
Telerik team
 answered on 09 Feb 2016
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?