Telerik Forums
Reporting Forum
13 answers
353 views
I am calling ReportBook from ReportViewer(in silverlight). In silverlight I am passing parameter to reportbook as follows.
void ReportViewer1_RenderBegin(object sender, RenderBeginEventArgs args)
  
{
  
//single value parameter 
  
args.ParameterValues["FormNumber"] = "ABC1";
  
args.ParameterValues["FormID"] = 10;
  
}
In ReportBook I am adding reports as follows.
class ReportBook2 : Telerik.Reporting.ReportBook
  
{
  
public ReportBook2()
  
{
  
this.Reports.Add(new Report1());
  
this.Reports.Add(new Report2());
  
this.Reports[0].DocumentMapText = "Dash Board";
  
this.Reports[1].DocumentMapText = "Product Sales";
  
}
  
}

Report1 needs parameter FormNumber. Report2 needs parameter FormID.
1. How to transfer these parameter to appropriate reports from reportbook?
2. Is there any way to add reports to reportbook from client(Silverlight) with appropriate parameters?


Steve
Telerik team
 answered on 20 Feb 2012
4 answers
220 views
Hi,

I need to put a subreport in a groupfooter, and I can't seem to make it work.
So, I have a Master Report, called List, this object has several properties that have to be set on the Master report.
In the detailsection I've put an SubReport, this Detail Report contains all lines from the List.
Until here, everything works great.
In the detailreport I've added several groups, because the lines have to be grouped.

Example:

Driver A (Driver-Group)
    Customer X (Customer Group)
         Address XYZ (Address Group)
              - Line1
              - Line 2
              - Line 3
          Address XYZ Footer: SubReport with all carriers on line 1,2,3
        Address ABC
              - Line 4
              - Line 5
         Adress ABC Footer: Subreport with all carriers on line 4,5
    Customer Y
    ...
Driver B
...

So I've managed to display all lines corretly,
I've also managed to get all group-data (Driver A, Customer X, Address XYZ)
By storing it in private variable in the detail_ItemDataBound,
when I debug I see that the correct data is being fetched.

private void detail_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.DetailSection detailSection = (Telerik.Reporting.Processing.DetailSection)sender;
 
            TransportListDocument doc = (TransportListDocument)detailSection.DataObject.RawData;
 
            if (doc != null)
            {
                if( String.IsNullOrEmpty(doc.Memo))
                {
                    txtMemo.Visible = false;
                    captionMemo.Visible = false;
                }
 
                txtType.Value = Translator.Translate("_" + doc.DocumentType);
                listId = doc.TransportListId;
                driverId = doc.Driver.Id;
                customerId = doc.Customer.Id;
                addressId = doc.Address.Id;
            }
        }

private void subCarriers_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport)sender;
            if(listId > 0 && driverId > 0 && customerId > 0 && addressId > 0)
            {
                AmountOfCarriers amountOfCarriers = DataFacade.Transport.DFCarrier.GetAmountOfCarriers(listId, driverId, CustomerId, addressId, LanguageId, BranchId);
 
                if (amountOfCarriers != null && amountOfCarriers.Count > 0)
                {
                    subTLCarriers1.SetPrivateDataMembers(Translator, LanguageId);
                    subTLCarriers1.DataSource = amountOfCarriers;
                }
            }
        }


or by using the data I find for each Address-group:

private void groupFooterAddress_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.ReportSection addressGroupSection = ((Telerik.Reporting.Processing.ReportSection)sender);
            Telerik.Reporting.Processing.Group customerGroup = ((Telerik.Reporting.Processing.Group)addressGroupSection.Parent.Parent);
            Telerik.Reporting.Processing.Group driverGroup = ((Telerik.Reporting.Processing.Group)customerGroup.Parent);
            TransportListDocuments docs = (TransportListDocuments)addressGroupSection.Report.DataSource;
 
 
            int selectedAddressId = ((Address)addressGroupSection.DataObject["Address"]).Id;
            int selectedCustomerId = ((ObjectModel.Customer.Customer)(customerGroup.GroupHeader.DataObject["Customer"])).Id;
            int selectedDriverId = ((Driver)(driverGroup.GroupHeader.DataObject["Driver"])).Id;
 
            AmountOfCarriers amountOfCarriers = DataFacade.Transport.DFCarrier.GetAmountOfCarriers(docs[0].TransportListId, selectedAddressId, selectedCustomerId, selectedDriverId, LanguageId, BranchId);
 
            if (amountOfCarriers != null && amountOfCarriers.Count > 0)
            {
                subTLCarriers1.SetPrivateDataMembers(Translator, LanguageId);
                subTLCarriers1.DataSource = amountOfCarriers;
 
            }
        }

which is sufficient to me to get data for the subreport in the footer.


Only the last line of code (subTLCarriers1.DataSource = amountOfCarriers;) sets the datasource on the control on the Detail Report, not the instance of the subreport in de groupFooter, as result, I get the same subreport for ALL the groups in my Detail Report instead of a different subreport for each address-group of lines.

Could you help me find a way to set the DataSource of each instance of the subreport in the Group-Footer,
so that each Address-Group get it's own subreport in it's footer?

Any help is very much welcome since I've been struggling with this for a few days now.



Koen L
Top achievements
Rank 1
 answered on 20 Feb 2012
1 answer
262 views
How to show ellipsis to indicate text overflow in the textblock control in telerik reporting 
Steve
Telerik team
 answered on 20 Feb 2012
0 answers
94 views
Hi,

I have a problem in impleminting the following code (Which is belongs to the RadGrid ASP.NET AJAX control) uisng the Reporting Table control:
protected void MainRadGrid_PreRender(object sender, EventArgs e)
{
foreach (GridDataItem dataItem in MainRadGrid.MasterTableView.Items)
{
int previousItemIndex = dataItem.ItemIndex - 1;
if (previousItemIndex >= 0)
{
if (dataItem["Number"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Number"].Text)
{
dataItem.OwnerTableView.Items[previousItemIndex]["Number"].RowSpan = 4;
dataItem.OwnerTableView.Items[previousItemIndex]["Number"].BackColor = System.Drawing.Color.FromName("#FAF8BB");
dataItem["Number"].Visible = false;
}
if (dataItem["Color"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Color"].Text)
{
dataItem.OwnerTableView.Items[previousItemIndex]["Color"].RowSpan = 2;
dataItem.OwnerTableView.Items[previousItemIndex]["Color"].BackColor = System.Drawing.Color.FromName("#B6F1FA");
dataItem["Color"].Visible = false;
}
}
}
}

And which event should I use here: ItemDataBinding or ItemDataBoun

Please, I need your help.

Regards,
Bader
Bader
Top achievements
Rank 1
 asked on 19 Feb 2012
9 answers
362 views
Hi..
 To make invoice-report, I need put the "report Footer Section" , on bottom of last page. (its posible the invoice was multiple pages). Or other wise, is,  if its posible plase the "pageFooter-secction" only was visible on last page . ()
 
Best regards from Barcelona-Spain.






manuelmoraga
Top achievements
Rank 1
 answered on 17 Feb 2012
1 answer
219 views

Hello. I use teleric reporting for ASP.NET MVC

  I want to make visibility  of  one report's  parameter is depend from value of  another report parameter.

 If parameter "1"  is equal to "Value1" I need to specify report's conditions with parameter "2", but if  parameter "1"  is equal to "Value2"  parameter "2" is lost sense and I want to hidden it.  (parameter "1" use AvailableValues mode)

Can I implement this scenario? I didn't found parameter changed value event?  Is exist another way

Thank you.

Vladislav

Elian
Telerik team
 answered on 17 Feb 2012
3 answers
125 views
I am using Silverlight Report Viewer with UseNativePrinting = false.  If Adobe PDF plug-in is not detected then I am prompted to save the PDF file.  Is there a way of detecting this event and prompting the user that they need to install Adobe PDF plug-in?
Steve
Telerik team
 answered on 17 Feb 2012
2 answers
92 views
Hi

I want to create Telerik reports depending on the user's selection of columns from some sort of web form
where the user will select what columns he/she wants to see in the report, and then the report should be generated accordingly.
Can someone tell me if this is possible and how one will be able to do it?

I am new to Telerik reporting and would appreciate some help :)

Regards
Gregory
KobusVisagie
Top achievements
Rank 1
 answered on 17 Feb 2012
3 answers
242 views
Hello,
I'm using newest Telerik Reporting and VS2010. Also I have lib for telerik reports, and WWW separately.
In lib project I have app.config file with named connection string.
In WWW I have web.config file with same name as in lib project.
1) When I'm in designer - it works fine
2) When I run application on my pc with dev server - it works fine.
3) When I publish and move to production server it says:
Unable to establish a connection to the database. Please, verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application.
4) When I copy built application (without publishing) the error is the same

1) I don't use any tranforms, etc when publishing.
2) I use the same connection string name with BLL layer and it works fine.
3) I logged values:
sqlDataSourceForReport.ConnectionString
and
System.Configuration.ConnectionStrings

sqlDataSourceForReport.ConnectionString exist in list of connectionString

Please let me know:
- how to log (debug) exceptions like this
- what can I log to have more info about error (what Telerik was looking for, where, what was found, what missing).
- can IIS settig may have influence to this error?

Best regards, Tomasz
T
Top achievements
Rank 1
 answered on 17 Feb 2012
0 answers
99 views
Hi, I am using Version=5.1.11.713 of silverlight report viewer along with lots of rad control in my application. Many time, I am getting timeout error with a small report. Can you please confirm if there is no such problem with this version. as earlier I was working with wpf reportviewer and getting some cpu utilization issue?

Thanks,
Jai
Jai
Top achievements
Rank 1
 asked on 17 Feb 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?