Telerik Forums
Reporting Forum
1 answer
55 views
I'm trying to dynamically create a report through a view layout, which is a custom XML definition.

I want to give the report an object as it's data source and all my data is stored through a dictionary on the class that is accessible through an indexer that returns an object.  Something like below.  Can I set up my the report binding with something like textbox1.Value = "=Fields["PersonID"]"?  It doesn't seem to work this way and I'm confused how I would set up the binding here in this case.
public class Instance
{
     private Dictionary<string, object> dictionary = new Dictionary<string,object>();
      
     public object this[string s]
     {
         get { return dictionary[s]; }
         set { dictionary[s] = value; }
     }
}
Peter
Telerik team
 answered on 30 Aug 2011
1 answer
106 views
Greetings 


Is there any way to change the location of the toggled button? 


My toggle button is working as desired, The only downside is that I need to look for the middle of the Group so I can click on it and hide the desired elements. :-(


Could you let me know if this could be done?


Thanks
Peter
Telerik team
 answered on 30 Aug 2011
1 answer
200 views
Hello,
after upgrade the version of Telerik reporting Q2 2010 to Q1 2011 the report does not work

the report:

public partial class MasterReport : Telerik.Reporting.Report
    {
        public MasterReport()
        {
            InitializeComponent();
        }


        private void MasterReport_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
            // recupere la liste ID facture
            string[] idArray;
            idFactureArray = report.Parameters["List"].Value.ToString().Split(',');


            Telerik.Reporting.Drawing.Unit unitX = Telerik.Reporting.Drawing.Unit.Inch(0);
            Telerik.Reporting.Drawing.Unit unitY = Telerik.Reporting.Drawing.Unit.Inch(0);
            SizeU size = new SizeU(Telerik.Reporting.Drawing.Unit.Inch(1), Telerik.Reporting.Drawing.Unit.Inch(0.5));
            List<LettreRappel> detailReports = new List<LettreRappel>();
            LettreRappel detailReport1;
            // 
            for (int i = 0; i < idArray.Length; i++)
            {
                detailReport1 = new LettreRappel();
                detailReport1.ReportParameters["Id"].Value = idArray[i];
                detailReports.Add(detailReport1);
            }
         
            foreach (LettreRappel detailReport in detailReports)
            {
                SubReport subReport;
                subReport = new SubReport();
                subReport.Location = new PointU(unitX, unitY);
                subReport.Size = size;
                unitY = unitY.Add(Telerik.Reporting.Drawing.Unit.Inch(0.5));
                subReport.ReportSource = detailReport;
                detail.Items.Add(subReport);
                
            }


        }
    }
Peter
Telerik team
 answered on 30 Aug 2011
1 answer
301 views
Is it possible to have the first page of my report in portrait mode, but then have each subsequent page in landscape mode?  I have a report that has a cover sheet that needs to be in portrait mode.  Then it lists details that need to be in landscape mode (due to customer requests to show an increasing amount of information).  Can the orientation be set conditional (based on the page number).  Also, is there a way to add a simple page break?  right now i have the information on my first page stretched to force the List to begin on the second page.  Thanks!
Peter
Telerik team
 answered on 30 Aug 2011
0 answers
126 views
Hello all,

Can someone please tell me how the Telerik Reporting engine infers what is static text versus what is not static text?

For example, I have a textbox included in my Report Header Section whose value is to set to some fields from the datasource the report is bound to.  That being said, during the export to CSV, this is treated as static text.  I am NOT displaying static text in the CSV export, thus this field is not showing up on the export (but I need it aka I don't want it as static text). 

So can someone please tell me the conventions this reporting engine is using to infer what is static text against what is not static text.

I am trying to avoid writing a second report just for CSV exports as well overriding any report rendering methods unless I absolutely have to.

Thanks in advance,     

Forest
 

Forest
Top achievements
Rank 1
 asked on 29 Aug 2011
1 answer
91 views
hi,

when i convert a radgrid into pdf the image button disappear in the pdf file, 
help me 


here my code


<ExportSettings IgnorePaging="false" OpenInNewWindow="true">
                        <Pdf PageHeight="270mm" PageWidth="297mm" PageTitle="Master Billing Report" PageBottomMargin="20mm"
                            PageTopMargin="20mm" PageLeftMargin="20mm" PageRightMargin="20mm" />
  </ExportSettings>   





 <telerik:GridTemplateColumn HeaderText="Image" UniqueName="imgbyte">
                                <ItemTemplate>
                                 
                                <asp:ImageButton ID="asdf" Width="90px" Height="68px" Style="border: 1px solid #000000;"
                                        runat="server" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>


cs code

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.ExportToPdfCommandName)
            isPdfExport = true;
        }
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (isPdfExport)
                FormatGridItem(e.Item);
        }

protected void FormatGridItem(GridItem item)
        {
            item.Style["color"] = "#eeeeee";


            if (item is GridDataItem)
            {
                item.Style["vertical-align"] = "middle";
                item.Style["text-align"] = "center";
            }


            switch (item.ItemType) //Mimic RadGrid appearance for the exported PDF file
            {
                case GridItemType.Item: item.Style["background-color"] = "#4F4F4F"; break;
                case GridItemType.AlternatingItem: item.Style["background-color"] = "#494949"; break;
                case GridItemType.Header: item.Style["background-color"] = "#2B2B2B"; break;
                case GridItemType.CommandItem: item.Style["background-color"] = "#000000"; break;
            }


            if (item is GridCommandItem)
            {
                item.PrepareItemStyle(); //needed to span the image over the CommandItem cells
            }


        }



Daniel
Telerik team
 answered on 29 Aug 2011
1 answer
82 views
Hello,

I have a problem using the Web ReportViewer, the issue is that the URL that is configured on the IIS where the site is running is not the same that the users employ to access the site. In other words, lets say my site address is http://www.site.com/ but the site can also be reach using http://www.clientsso.com/example/.

Now, lets say that on the homepage you can find a report using the ReportViewer, if you access the site using the http://www.clientsso.com/example/ address you are going to get a 404 when trying to export the report because the viewer is going to redirect the user to a URL starting with / which is not actually the root of the site when using that domain.

So, my question, is there any way in which I can instruct the viewer to use a given URL as the base for all redirects or requests?

Thanks in advance,

Javier
IvanDT
Telerik team
 answered on 29 Aug 2011
0 answers
71 views
Hello
I added pictures to the reportdo not appear in runtimebut the picture appears in pdfoutputdoes not faultDo you help please
Burak
Top achievements
Rank 1
 asked on 26 Aug 2011
12 answers
438 views
Has anyone had any luck using the CanShrink property to cause text boxes to move up when the textboxes above them are empty. It is described in the final example of the link below but I can't make it work.

http://www.telerik.com/help/reporting/faqshrinktextboxeswithnodata.html
Thanks,

Damian.


Michael Yereniuk
Top achievements
Rank 1
 answered on 26 Aug 2011
1 answer
111 views
Hi,

We need to make a report with on every page a barcode. This barcode is used in a postsortingmachine.
This barcode will be different depending on pagenumber. Is it possible to see on what page u are in the report?
Then we can use the pagenumber to use so logic that creates the correct barcode for that page. U can see this barcode as a secuence of stripes in a vertical way.
If i read the lifecycle then i would say it's not possible. But maybe there is a way to do this anyway.

Kind regards,
Peter
Telerik team
 answered on 26 Aug 2011
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?