Telerik Forums
Reporting Forum
1 answer
177 views
I have an invoicing processing that loops through and generates multiple (200-300) reports.  My report is a main report that contains 5 subreports.  My main report has 3 different background images, one on the Report Header, one on an unbound group header and then one for the Report (which displays for every page but the report header and the 1st group header).  Each image is a png file that fills a 8x11 page.

Currently I create a new report object for each invoice.  I have a shared ReportProcessor that I use to get each report as a pdf file in a memory stream and then store the document in the database.  Then I either email or fax the memory stream OR print the original report object.  I ran into problems last month where after 10-20 report I got an Argument exception and it mentioned the BackgroundImage property.  Unfortunately I cannot remember the exact error or reproduce it without printing all the reports.

Any ideas or suggestions?  Can I share a report processor like that?  Should I recreate the report each time?  I will try and re-generate the error by pausing the print queue and letting the code go through the steps.

Example code:
Dim rp as new ReportProcessor, r as InvoiceReport, ms as MemoryStream
for each itm in list( of items)
     r=New InvoiceReport
     rp.RenderReport("PDF", r, Nothing)
     'database save code
    Select itm.SendFormat
       Case email,fax
            'do email/fax processing with memory stresm
       Case paper
            rp.PrintReport(r,settings)
    End Select
    r.dispose
    ms.dispose
   
Steve
Telerik team
 answered on 10 Mar 2011
5 answers
155 views
In the silverlight report viewer, when you print and click on "Current Page" (in the "Print Range") it always prints page number one no matter what page you are on. Typing the Page number in the "Pages" selection of "Print Range" works fine (as a work around).
Using Firefox or IE 8(not tested with other browsers)
Peter
Telerik team
 answered on 10 Mar 2011
3 answers
231 views
Is there a way to use values from the main web app settings file.

I have a web and separate class files for the reporting, the web imports the reporting class.

I want to dynamicly change the logo on a report base on the value in the web appsettings.

This is how I would do it in the web:

Me

 

.imgLogo.Value = ConfigurationManager.AppSettings("TrustLogo")

But this currently doesn't work from the reporting class.

Andy

 

Andy Green
Top achievements
Rank 2
 answered on 10 Mar 2011
3 answers
137 views
Hi,

I have added a hyperlink action to a column in my report.  Is there a way to configure the action to open the link in a new browser tab or window?  Right now, it appears to open the link in the same browser tab as the report viewer.

Thanks,

Rob
Peter
Telerik team
 answered on 10 Mar 2011
1 answer
259 views

Hello,

Is there a way to use Telerik Reporting to convert HTML to PDF and/or RTF? We're using other Telerik tools - like the Editor in asp mvc - which produce nice HTML, but now we need to output that content to a printable format. abcPDF comes to mind, but we'd prefer to use our existing Telerik tools.

Thanks!

Chris

Peter
Telerik team
 answered on 10 Mar 2011
1 answer
237 views
Hi...

I have y-axis labels populated from the database and my chart is bound to one of the SQL data source field. The problem is my value labels that are populated from the database field are not fully shown. I would like to set plot area property that would change the width between the left chart margin and left plot area margin(de facto,area where labels are written.) Also, if a label is too wide to fit i would like to break in new line, and adjusting the content of the chart.For example, if my label value is "Who let the dog out" and it doesnt fit in one row, i would like it to be shown as :

Who let
the dog out

 I have attached the example as well.I would like to achieve through designer properties setting, instead of programmatically setting the values.
Yavor
Telerik team
 answered on 10 Mar 2011
3 answers
192 views
Hello.

Lets say you have a report for an Invoice.

You programmatically instantiate the report and set its Datasource to a Invoice object.

The invoice has properties like number, adress, whatever. But it also has a list of InvoiceLines.

Can the "Main" report have an invoice object as DataSource, and then have a subreport in the details-section that is bound to the List of Invoice lines?

EDIT: This is all done programatically, to be able to create a pdf. :)

Cheers,
E
Emil Einarsson
Top achievements
Rank 1
 answered on 10 Mar 2011
2 answers
164 views
Hi

I am trying to catch an exception that is being thrown in the Telerik.ReportViewer.Wpf.ReportViewerModel. 

System.Reflection.TargetInvocationException
Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Inner Exception:System.Printing.PrintSystemException
Printing was canceled. Win32 error: The specified printer has been deleted.


   at Microsoft.Internal.GDIExporter.CGDIRenderTarget.StartDocument(String printerName, String jobName, String filename, Byte[] devmode)
   at Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName, PrintTicket ticket)
   at System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o, Boolean documentPrintTicketRequired)
   at System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
   at System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject)
   at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
   at System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator)
   at System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)
   at Telerik.ReportViewer.Wpf.ReportViewerModel.OnPrintingComplete(RenderingThreadResult result, EventArgs args)

While I could handle the error at the application  level, I would like to handle the error closer to the source. The ReportViewModel does not expose any interesting methods to override, and the ReportViewer.Error event does not pick up what is basically a system level error ("The specified printer has been deleted").

Where should I catch this kind of error?

Many thanks
Jeremy
jholt
Top achievements
Rank 1
 answered on 10 Mar 2011
8 answers
136 views
Hi guys,
Anybody can help me to complete this task in Telerik Report. I have a table in sql database with three fields: Id, name, visit_date. A person may visit several times in month. I would like to get a report which is showing the person name and number of his visit in each month acccording to the selection of year as a parameter. 
I want to pass 'year' as a parameter which is selected by user.
Out put should be

Year

Name

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Total

Jeff

1

0

0

3

0

0

0

0

0

0

0

0

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Jeff visited 1 time in Jan, and 3 times in Apr in the selected year
Anybody can help me?
Thanks
Ben 
Ben
Top achievements
Rank 1
 answered on 09 Mar 2011
0 answers
138 views
I was wondering if there was a way to have the details area repeat based on a data value.

The exact circumstances are these:
I have a table of items ordered (Order_Details) with the columns (OrderDetailID, ProductID, Quantity, etc)
I have a second table with the product information (Products) with columns (ProductID, ProductName, Barcode, etc.)

What i am trying to do is create a report with the barcodes for all the items sold.  The catch is, i need the details area of the report to print once for each Quantity rather than once for each record.
E.g. if i have product #1 quantity 4, the barcode for product #1 should print 4 times, rather than once.

Is there a setting or option i'm missing, or am i going to have to do SQL magic for this one?

Thanks!

P.S. Your barcode control is fantastic!
IIJ Tech Support
Top achievements
Rank 1
 asked on 09 Mar 2011
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?